AnalyticalPyBulletClient.load_robot

AnalyticalPyBulletClient.load_robot(urdf_file, resource_loaders=None, concavity=False)

Create a pybullet robot using the input urdf file.

Parameters
  • urdf_file (str 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_loaders (list) – 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.

  • concavity (bool) – 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.

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.