ROS 2 Lyrical lab 08 · 2–3 hours
ros2_control and diagnostics
Connect a simulated arm to controller_manager, command a trajectory and record evidence.
Before you start
- Lab 07 complete
- Industrial Robots access for model-specific work
Files you will touch
src/training_arm_description/urdf/training_arm.ros2_control.xacrosrc/training_arm_bringup/config/controllers.yaml
Step 1
Set up
sudo apt install ros-lyrical-ros2-control ros-lyrical-ros2-controllers
ros2 control list_hardware_interfaces
ros2 control list_controllersStep 2
Create the file
controller_manager:
ros__parameters:
update_rate: 100
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
arm_controller:
type: joint_trajectory_controller/JointTrajectoryControllerStep 3
Build, run and inspect
ros2 run controller_manager spawner joint_state_broadcaster
ros2 run controller_manager spawner arm_controller
ros2 control list_controllers
ros2 bag record /joint_states /arm_controller/controller_stateProof that it works
- Both controllers report active
- Command and state interfaces are claimed correctly
- The bag records joint state and controller state topics
Recovery notes
- Use mock hardware until stop, limit and recovery behavior are proven.
- A robot_description change requires restarting controller_manager; live URDF reload is not supported.