[ROS2 Humble, Gazebo, ROS2 Control]: Can't activate controller. Command interface with does not exist
We recently migrated to Humble and started noticing that our gazebo classic sim has started throwing this error:
[gzserver-1] [ERROR] [1658521442.995648735] [controller_manager]: Can't activate controller 'steering_front_right': Command interface with 'steering_front_right_joint/position' does not exist
I'm posting snippets from various files to build context. (Can add more if needed.)
A load_controllers.launch.py
has the following piece:
load_front_right_steering_controller = ExecuteProcess(
cmd=[
"ros2",
"control",
"load_controller",
"--set-state",
"configured",
"steering_front_right",
],
output="screen",
)
A gazebo_controllers.yaml
file has the controller config:
controller_manager:
ros__parameters:
update_rate: 100
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
steering_front_right:
type: position_controllers/JointGroupPositionController
Some debugging steps with ROS2 Control CLI:
- Checking HW interfaces:
ros2 control list_hardware_interfaces
command interfaces steering_front_right_joint/position [unavailable] [unclaimed]
on running ros2 control list_hardware_interfaces
, all simulated HW interfaces show up as [unclaimed]
and [unavailable]
.
- Checking controllers :
ros2 control list_controllers
joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] inactive steering_front_right[position_controllers/JointGroupPositionController] inactive
All controllers show up as inactive
even though while launching the gazebo sim, I see this message (it loads successfully) [ros2-8] Sucessfully loaded controller steering_front_right into state active
- Manually setting controller_state:
ros2 control set_controller_state <controller-name> active
.
This throws the error:
[gzserver-1] [ERROR] [1658521442.995648735] [controller_manager]: Can't activate controller 'steering_front_right': Command interface with 'steering_front_right_joint/position' does not exist
I've checked and double checked URDF files, ros2_control tags in the xacro files and the config files too. This same config works in Galactic (with ros2 control load_controller --set_state
syntax changed to 'start').
Anyone else seeing this? Any help with this?