Read Nav2 REPs and design documents
Atlasbot · 23/8/2026 · 11 min read
The previous article discussed how to read the basic README/docs of a package. For large projects with complex architectures such as Nav2 (learned throughout the ROS2 Navigation column), there is another type of documentation that is equally important when in-depth understanding —design doc, explaining the reasoning behind architectural decisions.
Key concepts
The two types of documents serve two very different purposes:
- API doc / docs site (e.g., docs.nav2.org) — lists which parameters are available, default values, call syntax — replies "what, use how"
- Design doc / REP— explains why the architecture was designed as such, the trade - offs considered when deciding — reply "why"
How it works
When only configures/uses an available feature (e.g., changing the parameter inflation_radius learned in Tuning Costmap ), the API doc is sufficient — without understanding why Nav2 segregates local_costmap and global_costmap into two independent instances. But when it is necessary to extend/modify architecture — write a new layer costmap plugin, or understand why planner_server and controller_server are two separate nodes instead of pooling — API doc cannot answer, it is necessary to read design doc or related REP to properly understand the original design intent before adding code.
**Finally:**These two types of documents are common errors — that find the configuration parameter in the design doc will not be found (that is not its purpose), and find the reason the architecture in the API doc will not be found either (list only "what", do not explain "why"). Pinpoint the questions you're trying to answer before choosing the type of document to read.
Technical details
Parameters
| Question to Answer | Document Type | Specific examples |
|---|---|---|
| Which parameter has, what is the default | API doc / docs site | DWB/MPPI plugin parameter table on docs.nav2.org |
| Why split Planner/Controller into 2 nodes | Design doc/REP related to Nav2 architecture | Original REP or design proposal when Nav2 was designed |
| How to write a new layer costmap plugin | Design doc + source code of available layer as template | Read nav2_costmap_2d source, not only the API doc |
| How Behavior Tree Works At Low Level | Design doc BT + original BehaviorTree.CPP library | Not in the usual XML configuration doc API |
Practical applications
When Nav2 deep customization is required for a particular required AMR (e.g., adding a new recovery behavior in addition to Spin/BackUp/Wait learned in Recovery Behaviors ), the correct procedure is not to read only the API doc looking for "enabling new recovery behaviors" (no, since this is adding code, not configuring) — but to read the design doc/source code of available recovery behaviors to understand the correct interface (base class, method to override) before writing the new behavior in accordance with the designed architecture.
Practical example
Scenario: understand why Nav2 uses Behavior Trees (covered in Behavior Tree)
instead of traditional State Machines, to decide whether to write
a new custom Behavior Tree node
Look in the API documentation (docs.nav2.org, BT XML configuration):
→ only a LIST of available nodes (Sequence, Fallback, ComputePathToPose...)
→ does NOT explain why Behavior Trees were chosen over State Machines
Look in Nav2 design/architecture documentation (usually the GitHub repository,
under docs/design or the design proposal for the feature):
→ explains that Behavior Trees easily compose small behaviors into larger
ones without redrawing transitions and are easier to extend than
handwritten State Machines — the reason discussed in Behavior Tree
Conclusion: understanding design reasons helps a new custom node follow
the original philosophy (composable, reusable), so it both works
and fits the overall architecture
Common mistakes
- Find the configuration parameter in the doc— as stated, two types of documents serving two different purposes, find the wrong type of time wasting.
- Writing extensible code without prior reading of the design doc — is easy to create "live" solutions but violates the original architecture philosophy, making it difficult to maintain/integrate after the original project is updated.
- The design doc is a mandatory read-only document for the basic use of— with the majority of users just configuring/using the available features, the API doc being sufficient; the design doc is only needed when truly extensive/indepth understanding is required.
- Failing to find the design doc in the right place — with large projects such as Nav2, the design doc is often sparse (GitHub issue discusses design, own design proposal, related REP, sometimes even the author's paper/paper) — is not always concentrated in one place as the API doc.
Conclusion
The API doc and design doc answer two different questions — "what, how to use" and "why to design as such" — confusion between the two types makes the lookup ineffective. Only look for design doc when you really intend to extend/modify the architecture, not when you just need to configure available features. The next article in the column goes into the changelog and migration guide — critical documentation for upgrading ROS2, where behavior can change without the main README being updated.
Get new articles and lessons by email
When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.
Unsubscribe any time with the link in each email. See our Privacy policy.