ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

So the turtlesim package tells you that it is subscribing to turtleX/cmd_vel (geometry_msgs/Twist). That means that it gets Messages of Type geometry_msgs/Twist at the Topic named turtleX/cmd_vel. The X is a placeholder for the current number of the turtle.

On the other hand we have the teleop node which is publishing to a Topic named turtle1/cmd_vel of type geometry_msgs/Twist by default. So what I don't know where you got <remap from="turtlebot_teleop_keyboard/cmd_vel" to="cmd_vel_mux/input/teleop"/> from. But normally with remap you can change a topic name. For example you can change the topicname from turtle1/cmd_vel to turtle2/cmd_vel with <remap from="turtle1/cmd_vel" to="turtle2/cmd_vel"/>.

So just to explain how it is working.

Another thing what you currently doing is <group ns="turtlesim1"> So this puts all the topics of the nodes you have in this group like f.e. the topic turtleX/cmd_vel in a group namespace. So in your case the topic name changes to turtlesim1/turtleX/cmd_vel.

And thats your current problem. By default the teleop is publishing to turtle1/cmd_vel. Your turtlesim subscribes after doing the namespace to turtlesim1/turtle1/cmd_vel. And this actually doesn't match!

I do not know if I should give you now the concrete solution. Perhaps you can try it on your own after this explaining and if you have further problems we can talk about it.

Didnt mentioned or checked the correctness of mimic by now. We talk abut this later too.