lbr_ros2_control

Note

General

This package implements:

  1. A hardware_interface::SystemInterface for ros2_control integration: Hardware Plugin

  2. Dedicated ros2_controllers for various command modes and the state: Controller Plugins

A simplified overview of lbr_ros2_control is shown below (click to expand):

lbr_ros2_control

New starters are often confused by ros2_control. Everything in ros2_control is a plugin, refer pluginlib.

Hardware components and controllers are loaded as plugins (components) by the controller_manager::ControllerManager during runtime. Therefore, hardware and controllers communicate over shared memory in the same process, not topics!

The controller_manager::ControllerManager has a node, the controller_manager.

  • Hardware plugins are read from the robot_descritption parameter of the robot_state_publisher node and loaded at runtime.

  • Parameters, such as update_rate, the configured controllers, are simply set as node parameters, see e.g. hardware.yaml.

Hardware Plugin

lbr_ros2_control::SystemInterface

The lbr_ros2_control::SystemInterface plugin implements a hardware_interface::SystemInterface and utilizes the lbr_fri_ros2 package for communication with the robot. Overview below (click to expand):

lbr_ros2_control_detailed
  • The controller_manager::ControllerManager loads the correct plugin from the <ros2_control> tag in the robot_description: lbr_system_interface.xacro

  • FRI relevant parameters are forwarded to the lbr_ros2_control::SystemInterface plugin from lbr_system_config.yaml

The lbr_ros2_control::SystemInterface is spun with the controller_manager node at a rate set by the update_rate parameter. The communication to the robot is run asynchronously at a rate set by the robot’s sample time.

Why asynchronously? KUKA designed the FRI that way, by adhering to this design choice, we can support multiple FRI versions, see fri!

Controller Plugins

Simple controller plugins for exposing the robot commands and states as topics. Utilizes lbr_fri_idl message definitions.

lbr_fri_ros2::LBRJointPositionCommandController

Exposes the robot command in POSITION client command mode as LBRJointPositionCommand message.

  • Supported control modes:

    • POSITION_CONTROL

    • JOINT_IMPEDANCE_CONTROL

    • CARTESIAN_IMPEDANCE_CONTROL

  • Topic: command/lbr_joint_position_command

lbr_fri_ros2::LBRTorqueCommandController

Expose the robot command in TORQUE client command mode as LBRTorqueCommand message.

  • Supported control modes: TORQUE_CONTROL

  • Topic: command/lbr_torque_command

lbr_fri_ros2::LBRWrenchCommandController

Expose the robot command in WRENCH client command mode as LBRWrenchCommand message.

  • Supported control modes: CARTESIAN_IMPEDANCE_CONTROL

  • Topic: command/lbr_wrench_command

lbr_fri_ros2::LBRStateBroadcaster

Exposes the robot state as LBRState message.

  • Any client command mode

  • Any control mode

  • Topic: state