Rviz Configuration
Manually configuring the Rviz every time a new instance is launched can be inconvenient. We can actually provide a configuration file when launching rviz. Here is an example of the rviz config file.
Now the question is where to find the documentation about these parameters. The good news is we don't need to. After the rviz is configured, we can save the configuration.

To specify the rviz config file in a python launch file, we can use the syntax below:
rviz = Node(
package="rviz2",
executable="rviz2",
condition=IfCondition(LaunchConfiguration("rviz")),
arguments=["-d", path.join(bringup_package, "config", "slam_and_nav_v1.rviz")]
)
Last updated