> For the complete documentation index, see [llms.txt](https://nxp.gitbook.io/nxp-cup/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nxp.gitbook.io/nxp-cup/gazebo/milestone-2-time-to-go-fast/configuring-the-simulation.md).

# Configuring the simulation

NXP Gazebo is highly configurable. The main repository, `sim_gazebo_bringup`, uses a ROS2 launch file to boot the simulation. This launch file can be configured with a JSON file contained within the package. This page will give an overview of the "gen\_params.json" file and how to make changes to the simulation using it.

## General Parameters File Overview

The general parameters file can be found at "\~/ros2ws/src/sim\_gazebo\_bringup/config/gen\_params.json".&#x20;

{% embed url="<https://github.com/rudislabs/sim_gazebo_bringup/blob/nxp-summer/config/gen_params.json>" %}

This overview will outline each section of the JSON.

1. "setup" -  Sets up the necessary git repositories and file/folder structure.
   1. "autopilot" - This does not need to be changed. It is there for PX4 autopilot simulation, but we are not using that platform for NXP Summer camp yet.
   2. "gazebo" - Sets up Gazebo specific repositories. Car models, track models, libraries, and more.
   3. "ros2" - Sets up ROS2 specific git repositories. These are ROS2 packages.
   4. "system" - This sets up environment variables for your system so that NXP Gazebo knows where to find certain files.
2. "verbose" - This just contains two boolean values to show error logs when running the simulation.
3. "nodes" - This section contains the ROS2 nodes that should be run when the simulation is started. Each node has a few parameters that must be set, and then optional parameters typically go at the end if they exist (denoted by the "parameters" field)
4. "world\_params" - This section sets up the simulation world. You can add models to the world using this section, or even change the entire world layout (the track). Realtime factor and update rate can also be changed manually here.
5. "models" - This section outlines the car models being placed in the world. For now we only have one car model in the world, but more car models can be added. Sensors can be added to the car here as well.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://nxp.gitbook.io/nxp-cup/gazebo/milestone-2-time-to-go-fast/configuring-the-simulation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
