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

I'm not quite sure what the topics involved here are, but you should be able to use topic remapping to do what you're talking about, once you figure out which topic you need to remap.

I would start by looking at the topics that the turtle teleop node is publishing by running it, and running rosnode info turtle_teleop_key in another terminal. You should be able to find the relevant output topic; it will have type geometry_msgs/Twist. From there, simply run the turtle_teleop_key node and remap that topic your desired output topic: /turtle1/cmd_vel

I'm not quite sure what the topics involved here are, but you should be able to use topic remapping to do what you're talking about, once you figure out which topic you need to remap.

I would start by looking at the topics that the turtle teleop node is publishing by running it, and running rosnode info turtle_teleop_key in another terminal. You should be able to find the relevant output topic; it will have type geometry_msgs/Twist. From there, simply run the turtle_teleop_key node and remap that topic your desired output topic: /turtle1/cmd_vel

If the current output topic is /turlte1/cmd_vel and the desired output topic is /turtle2/cmd_vel, your remapping argument would be:

rosrun turtlesim turtle_teleop_key /turtle1/cmd_vel:=/turtle2/cmd_vel