Ask Your Question

Starting a controller in the same namespace as the controller_manager

asked 2017-06-21 06:07:26 -0600

SorinV gravatar image

updated 2017-06-21 07:07:38 -0600

I have a problem when trying to start controllers for multiple robots that they cannot find the controller_manager

[WARN] [1498038782.062813, 84.949000]: Controller Spawner couldn't find the expected controller_manager ROS interface.

I am using the plugin in the .xacro file like so:

    <plugin name="gazebo_ros_control" filename="">

and then launching each robot in a group with a different namespace.

What am I doing wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-21 07:01:09 -0600

SorinV gravatar image

updated 2019-02-26 14:38:48 -0600

Minutes after posting this question I managed to resolve it:

First of all you have to remove the namespace tag from the .xacro/urdf file in order for the robots to get a namespace you specify, like so:

    <plugin name="gazebo_ros_control" filename="">

Second, you have to specify the namespace almost everywhere even if you have the group tag, and I'll give an example for one robot:

<group ns="/robot1">
  <param name="tf_prefix" value="atlas1" />
   <rosparam file="$(find YOUR_PACKAGE)/config/control.yaml" command="load" ns="/robot1" /> 
   <param name="/robot1/robot_description" command="$(find xacro)/xacro --inorder $(arg model)"/>
      <node name="urdf_spawner_1" pkg="gazebo_ros" type="spawn_model"
        args="-z 1.0 -unpause -urdf -model robot1 -param robot_description " respawn="false" output="screen">

      <node pkg="robot_state_publisher" type="robot_state_publisher"  name="robot_state_publisher_1">
        <param name="publish_frequency" type="double" value="30.0" />

      <node name="robot1_controller_spawner" pkg="controller_manager" type="spawner" 
        --shutdown-timeout 3">

      <node name="rqt_robot_steering1" pkg="rqt_robot_steering" type="rqt_robot_steering">
        <param name="default_topic" value="/robot1/tri_wheel_controller/cmd_vel"/>

And so on for another robot. Keep in mind that I redefined the robot_description each time in order for the controller to find it in the same namespace. It didn't work for me to define it outside and the use it in the group like /robot_description

tf_prefix is used in order to see all the robots in rviz. I am not sure how does it work without it, or how to use something else as tf_prefix is deprecated. For now it does not work to see it in rviz so I figured it does not calculate the tf for the link. I don't know how to solve this

edit flag offensive delete link more


I was unable to connect my Rviz model to my elaborate...

upon running demo_gazebo.launch from the MSA, a model would spawn in Rviz and be capable of planning, but the gazebo model that would also spawn would be erratic and I was receive the WARNING at the top of this page.

Removing the namespace from the gazebo plugin tag "synced" (probably not the right word) my Rviz model and my gazebo model. Now my rviz model is in the same position as my gazebo model so its a step in the right direction.

Thanks @SorinV

matthewmarkey gravatar image matthewmarkey  ( 2020-05-12 05:30:01 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-06-21 06:07:26 -0600

Seen: 3,454 times

Last updated: Feb 26 '19