ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to remap topic in a ROS2 launch file? [closed]

asked 2021-04-22 05:23:05 -0600

g.bardaro gravatar image

Hi everyone,

I am setting up a navigation2 launch file.

I have used this one as a reference, and everything seems to work.

However, I need to remap the /cmd_vel topic. I am not sure what is the syntax to do so in a top-level launch file to have it propagated to a nested launch file.

Thanks for the help

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by shonigmann
close date 2022-10-19 13:55:48.939228

1 Answer

Sort by ยป oldest newest most voted

answered 2021-12-17 04:53:17 -0600

Richard Mark Haes Ellis gravatar image

Found an example on the ros2 tutorials (Foxy)

perform remap so both turtles listen to the same command topic

forward_turtlesim_commands_to_second_turtlesim_node = Node(
            ('/input/pose', '/turtlesim1/turtle1/pose'),
            ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'),
edit flag offensive delete link more


Invaluable for remapping RVIZ' /initial_pose, /goal_pose, and /clicked_point topics (connected to 2D Pose Estimate, 2d Goal Pose, and Publish Point buttons in RVIZ) that are otherwise permanently outside any namespace applied to an RVIZ node. Thank you!

K88 gravatar image K88  ( 2022-10-19 13:31:55 -0600 )edit

Question Tools



Asked: 2021-04-22 05:23:05 -0600

Seen: 3,534 times

Last updated: Dec 17 '21