smarts.core.utils.pybullet module

class smarts.core.utils.pybullet.BulletClientMACOS(bullet_connect_mode=1)[source]

This wrapper class is a hack for macOS where running PyBullet in GUI mode, alongside Panda3D segfaults. It seems due to running two OpenGL applications in the same process. Here we spawn a process to run PyBullet and forward all calls to it over unix pipes.

N.B. This class can be directly subbed-in for pybullet_utils’s BulletClient but your application must start from a,

if __name__ == “__main__:”:

# https://turtlemonvh.github.io/python-multiprocessing-and-corefoundation-libraries.html import multiprocessing as mp mp.set_start_method(‘spawn’, force=True)

static consume(bullet_connect_mode, connection: Connection)[source]

Builds a child pybullet process. :param bullet_connect_mode: The type of bullet process. :param connection: The child end of a pipe.

class smarts.core.utils.pybullet.SafeBulletClient(connection_mode=None)[source]

A wrapper for pybullet to manage different clients.