PyBulletClient.load_robot

PyBulletClient.load_robot(urdf_file, resource_loaders=None, concavity=False, precision=None)[source]

Create a pybullet robot using the input urdf file.

Parameters:
urdf_filestr or file object

Absolute file path to the urdf file name or file object. The mesh file can be linked by either “package::” or relative path.

resource_loaderslist

List of compas_robots.AbstractMeshLoader for loading geometry of the robot. That the geometry of the robot model is loaded is required before adding or removing attached collision meshes to or from the scene. Defaults to the empty list.

concavitybool

When False (the default), the mesh will be loaded as its convex hull for collision checking purposes. When True, a non-static mesh will be decomposed into convex parts using v-HACD.

precisionint

Defines precision for importing/loading meshes. Defaults to compas.tolerance.TOL.precision.

Notes

By default, PyBullet will use the convex hull of any mesh loaded from a URDF for collision detection. Amending the link tag as <link concave="yes" name="<name of link>"> will make the mesh concave for static meshes (see this example). For non-static concave meshes, use the concavity flag.