RosClient.load_robot

RosClient.load_robot(load_geometry=False, urdf_param_name='/robot_description', srdf_param_name='/robot_description_semantic', precision=None, local_cache_directory=None)[source]

Load an entire robot instance -including model and semantics- directly from ROS.

Parameters
  • load_geometry (bool, optional) – True to load the robot’s geometry, otherwise False to load only the model and semantics.

  • urdf_param_name (str, optional) – Parameter name where the URDF is defined. If not defined, it will default to /robot_description.

  • srdf_param_name (str, optional) – Parameter name where the SRDF is defined. If not defined, it will default to /robot_description_semantic.

  • precision (float) – Defines precision for importing/loading meshes. Defaults to compas.PRECISION.

  • local_cache_directory (str, optional) – Directory where the robot description (URDF, SRDF and meshes) are stored. This differs from the directory taken as parameter by the RosFileServerLoader in that it points directly to the specific robot package, not to a global workspace storage for all robots. If not assigned, the robot will not be cached locally.

Examples

>>> from compas_fab.backends import RosClient
>>> with RosClient() as client:
...     robot = client.load_robot()
...     print(robot.name)
ur5_robot