Unable to connect to controller_manager ROS interface

asked 2022-12-28 16:02:50 -0600

distro gravatar image

My launch file fails to find controller manager ROS interface:

<launch>

  <!-- Load joint controller configurations from YAML file to parameter server -->
  <rosparam file="$(find ros_ship_control)/config/wam-v_controller.yaml" command="load"/>

  <!-- load the controllers -->
  <node name="controller_spawner" pkg="controller_manager" type="spawner" output="screen"
    args="joint_state_controller right_motor_controller left_motor_controller right_driving_force_controller left_driving_force_controller" ns="wam_v">
  </node>

  <!-- convert joint states to TF transforms for rviz, etc -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen" ns="wam_v">
  </node>

  <node name="cmd_pub_left" pkg="rostopic" type="rostopic" args="pub -r 100 /wam_v/ship_controller/left_driving_force std_msgs/Float64 -- 1" output="screen" respawn="true">
  </node>

  <node name="cmd_pub_right" pkg="rostopic" type="rostopic" args="pub -r 100 /wam_v/ship_controller/right_driving_force std_msgs/Float64 -- 1" output="screen" respawn="true">
  </node>

</launch>

This error:

[INFO] [1672264488.260346]: Controller Spawner: Waiting for service controller_manager/load_controller
[WARN] [1672264518.537671]: Controller Spawner couldn't find the expected controller_manager ROS interface.

I believe I installed all neccsearry packages:

sudo apt-get install ros-kinetic-ros-control ros-kinetic-joint-state-controller ros-kinetic-effort-controllers ros-kinetic-position-controllers ros-kinetic-velocity-controllers ros-kinetic-ros-controllers ros-kinetic-gazebo-ros ros-kinetic-gazebo-ros-control
edit retag flag offensive close merge delete