# 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](https://github.com/gazebosim/ros_gz_project_template/blob/main/ros_gz_example_bringup/config/diff_drive.rviz) 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.

<figure><img src="/files/tigJPGNx2llbA11rZRUd" alt=""><figcaption></figcaption></figure>

To specify the rviz config file in a python launch file, we can use the syntax below:

```python
rviz = Node(
    package="rviz2",
    executable="rviz2",
    condition=IfCondition(LaunchConfiguration("rviz")),
    arguments=["-d", path.join(bringup_package, "config", "slam_and_nav_v1.rviz")]
)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.learnros2.com/ros/ros2-building-blocks/configurations/rviz-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
