lbr_ros2_control
Note
Refer to lbr_demos for exemplary usage
Also refer to the official ros2_control documentation
General
This package implements:
A
hardware_interface::SystemInterfaceforros2_controlintegration: Hardware PluginDedicated
ros2_controllersfor various command modes and the state: Controller Plugins
A simplified overview of lbr_ros2_control is shown below (click to expand):
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_descritptionparameter of therobot_state_publishernode 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):
The
controller_manager::ControllerManagerloads the correct plugin from the<ros2_control>tag in therobot_description: lbr_system_interface.xacroFRI relevant parameters are forwarded to the
lbr_ros2_control::SystemInterfaceplugin 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_CONTROLJOINT_IMPEDANCE_CONTROLCARTESIAN_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_CONTROLTopic:
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_CONTROLTopic:
command/lbr_wrench_command
lbr_fri_ros2::LBRStateBroadcaster
Exposes the robot state as LBRState message.
Any client command mode
Any control mode
Topic:
state