> 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/nav2-bring-up-and-tuning.md).

# Nav2 Bring-up and Tuning

Bring up autonomy only after manual motion, odometry, TF, sensors, and stop behavior pass their smoke tests.

```mermaid
flowchart TD
    sensors["Sensors"] --> localization["SLAM / localization"]
    localization --> nav2["Nav2 planning and control"]
    nav2 --> safety["CAREC safety gate"]
    safety --> drive["ros2_control drive"]
```

## Activation order

1. Simulation clock, robot description, and transforms.
2. Controllers and joint-state feedback.
3. Sensor bridges and health monitoring.
4. Odometry and state estimation.
5. SLAM or map-based localization.
6. Nav2 servers and lifecycle manager.
7. CAREC safety gate and autonomy authorization.

## Wheelchair-specific tuning

| Area             | Parameters to validate                                                       |
| ---------------- | ---------------------------------------------------------------------------- |
| Footprint        | Occupied envelope, footrest, sensor mast, safety margin                      |
| Kinematics       | Differential-drive limits, minimum controllable speed, acceleration and jerk |
| Costmaps         | Inflation, obstacle persistence, clearing, unknown space                     |
| Planner          | Narrow-passage feasibility, turning space, reverse-motion policy             |
| Controller       | Tracking error, oscillation, goal approach, stop distance                    |
| Progress checker | Stuck detection without false recovery loops                                 |
| Goal checker     | Position/yaw tolerances appropriate for wheelchair use                       |
| Behavior tree    | Human-aware stop, replan, wait, assistance request, cancellation             |

Run straight-line, rotation, square-path, doorway, corridor, goal-approach, blocked-route, and manual-takeover tests before increasing speed.

{% hint style="warning" %}
Nav2 producing a path does not authorize motion. CAREC's independent mode and safety logic retains final command authority.
{% endhint %}


---

# 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/nav2-bring-up-and-tuning.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.
