Robots in ROS

Note

The following examples use the ROS backend and the MoveIt! planner for UR5 robots. Before running them, please make sure you have the ROS backend correctly configured and the UR5 Demo started.

Once ROS is running and MoveIt! planner has started with a robot, we can start interacting with the robot model. There are two basic ways to work with a robot model that is loaded in ROS.

Load model from ROS

This is the easiest and preferable way to load a robot model: request the full model to be loaded from ROS.

from compas_fab.backends import RosClient

with RosClient() as client:
    robot = client.load_robot()
    robot.info()

    assert robot.name == 'ur5_robot'