> For the complete documentation index, see [llms.txt](https://carec.gitbook.io/carec-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://carec.gitbook.io/carec-docs/documentation/simulation/workspace-and-package-layout.md).

# Workspace and Package Layout

The simulator should be a first-class part of the CAREC repository, not a separate demonstration that drifts from the robot software.

```
carec_ws/src/
  carec_description/       URDF/Xacro, meshes, collision geometry, TF
  carec_control/           ros2_control configuration and drive limits
  carec_simulation/        Gazebo worlds, models, plugins, launch files
  carec_sensors/           sensor definitions, bridges, noise profiles
  carec_localization/      SLAM and localization parameters
  carec_navigation/        Nav2 behavior trees, planners, controllers
  carec_safety/            supervisor, mode logic, stop and fault handling
  carec_scenarios/         scenario definitions, assertions, fixtures
  carec_bringup/           composed system launch and configuration
  carec_interfaces/        project messages, services, and actions
  carec_test/              integration tests, reports, and test utilities
```

## Stable command contract

The repository should converge on these command responsibilities even if final launch-file names change:

| Command responsibility | Required behavior                                                                |
| ---------------------- | -------------------------------------------------------------------------------- |
| Build                  | Resolve dependencies and build from a clean workspace                            |
| Smoke launch           | Start a small headless world, robot, controllers, sensors, and safety supervisor |
| Desktop launch         | Add Gazebo GUI, RViz, teleoperation, and diagnostics                             |
| Navigation launch      | Start localization or SLAM plus Nav2                                             |
| Scenario runner        | Accept scenario ID, seed, timeout, and output directory                          |
| Test command           | Produce machine-readable and human-readable results                              |

Every launch argument needs a default, description, type, and ownership package. Configuration belongs in version-controlled YAML; launch files should assemble components rather than hide large parameter dictionaries.


---

# 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://carec.gitbook.io/carec-docs/documentation/simulation/workspace-and-package-layout.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.
