PyBulletClient.load_robot

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

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.

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, replace the OBJ files within the URDF with those generated by pybullet.vhacd.