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

Revision history [back]

click to hide/show revision 1
initial version


This is a nice extension to a good tutorial. If you can understand how to fix this, you're well on your way...
Can I suggest next time writing a more detailed subject? e.g. "connecting turtlesim teleop to turtlesim mimic"

Here's how to debug it:

When you run the teleop node, do:

$ rostopic list

and you'll see that it outputs to the topic:


But earlier in the tutorial, you sent a command to the turtle manually on the topic:


using the command:

rostopic pub /turtlesim1/turtle1/command_velocity turtlesim/Velocity -r 1 -- 2.0 -1.8

So therefore you need to launch the teleop node, and re-map the output from the teleop node to the command topic of the first turtle

Here's a launch file with the existing code to start two turtles, plus it launches the teleop node and remaps the teleop topic:


<group ns="turtlesim1">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>

<group ns="turtlesim2">
<node pkg="turtlesim" name="sim" type="turtlesim_node"/>

<node pkg="turtlesim" name="mimic" type="mimic">
<remap from="input" to="turtlesim1/turtle1"/>
<remap from="output" to="turtlesim2/turtle1"/>

<node pkg="turtlesim" name="teleop" type="turtle_teleop_key">
  <remap from="/turtle1/command_velocity" to="/turtlesim1/turtle1/command_velocity"/>


Would you like to add this to the end of the tutorial on the Wiki?