[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 controllerstate:
`ros2 control setcontroller_state
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, ros2control tags in the xacro files and the config files too. This same config works in Galactic (with `ros2 control loadcontroller --set_state` syntax changed to 'start').
Anyone else seeing this? Any help with this?
Asked by Avi on 2022-07-22 16:09:31 UTC
Answers
Something broke during ROS2 humble migration. I fixed this issue by
- Removing gazebo_ros2_control apt pkg
- Cloning gazebo_ros2_control and building from source.
Asked by Avi on 2022-08-10 19:30:11 UTC
Comments
To be precise, for gazebo classic, this commit and maybe this commit is needed, and for gz/ign gazebo, this commit and maybe this commit is needed. Not sure what the cause was.
Asked by Rufus on 2022-09-07 16:24:23 UTC
Comments