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 know this question is for ROS1 but for ROS2 you use the example contained in nav2_bringup/launch/rviz_launch.py. The function ReplaceString allows you to replace a template string in your rviz with your namespace. For the purpose of remapping transforms, when launching the rviz node you can pass the following:

 remappings = [('/tf', 'tf'),
    ('/tf_static', 'tf_static')]

description.append(Node(
    package='rviz2',
    executable='rviz2',
    name='rviz',
    remappings=remappings,
))