1.5.5 Remapping
You need a second teleop node in order to control turtle2. However, if you try to run the same command as before, you will notice that this one also controls turtle1. The way to change this behavior is by remapping the cmd_vel topic.
In a new terminal, source ROS 2, and run:
ros2 run turtlesim turtle_teleop_key --ros-args --remap turtle1/cmd_vel:=turtle2/cmd_velNow, you can move turtle2 when this terminal is active, and turtle1 when the other terminal running turtle_teleop_key is active.

Last updated