Exercise09 — Nav2 Plugin Extension Lab
Estimated time: 95 to 120 minutes
Prerequisite lessons: 08 — Nav2 Recoveries Progress And Goal Checkers, 09 — Nav2 Waypoints Docking Zones And Missions, 10 — Nav2 Parameters Launch And Plugin Extension, 11 — Nav2 Debugging Observability And Bag Analysis, 12 — Nav2 Amr Failure Patterns And Capstone
Mode options:
- Simulation: compare existing Nav2 behaviors and decide whether parameters or mission logic already solve the problem.
- Log and bag review: analyze repeated incidents and decide whether a plugin extension is justified.
- Architecture review: complete the exercise as a design decision memo without writing C++ plugin code.
Validation goal: by the end of this lab you should be able to decide when Nav2 needs extension, when it only needs configuration, and when the real solution belongs outside Nav2 entirely.
Overview
Many teams reach for custom plugins too early.
That usually creates one of three problems:
- custom code is written to hide a misunderstood configuration issue
- mission or product logic is improperly forced into a Nav2 plugin
- extension points are chosen without a clear validation plan or rollback path
This lab is a decision exercise. The goal is not to implement a plugin but to justify whether one should exist at all.
Section A — Configuration, Mission Layer, or Plugin?
For each requirement, choose the most likely solution home.
| Requirement |
Best first solution home |
Why |
| custom slowdown behavior only inside a narrow map-defined zone |
? |
? |
| business rule that skips low-priority waypoints during a rush order |
? |
? |
| controller needs a new scoring term tied to trailer articulation limits |
? |
? |
| docking approach needs special final-pose acceptance logic not covered by existing checkers |
? |
? |
| operator wants a custom dashboard label when localization trust drops |
? |
? |
Answer guidance
High-quality answers resist unnecessary extension:
- zone-specific slowdown may already be solvable through zone semantics or route policy
- business-priority logic belongs in the mission layer
- a new scoring term tightly tied to motion evaluation may justify a controller extension
- special goal acceptance or docking-specific behavior may justify a custom checker or dedicated behavior if existing options are insufficient
- dashboard labels are not a plugin problem
Section B — Plugin Proposal Critique
Read the proposal below.
Proposal: create a custom planner plugin because robots sometimes wait too long near the packing zone.
Observed symptoms:
- robots slow correctly in the packing zone
- routes remain valid
- humans often block the lane for 20 to 60 seconds
- mission deadlines are sometimes missed
Rationale:
- a custom planner can make smarter business decisions about urgency
Questions:
- Why is a custom planner plugin probably the wrong first move?
- Which layer actually appears underpowered from this evidence?
- What evidence would you require before considering any Nav2 extension here?
Answer guidance
The proposal confuses route validity with business urgency. The planner can already produce a path; the harder problem is policy around waiting, rerouting, or reprioritizing missions. That belongs in mission logic unless there is concrete evidence that route generation itself is deficient.
Section C — Extension Decision Framework
Define a five-question checklist that must be answered before approving a Nav2 plugin extension.
Your checklist must include:
- proof that configuration was exhausted responsibly
- proof that the problem really lives inside Nav2
- measurable success criteria
- rollout and rollback considerations
- observability requirements
Answer guidance
Good answers usually force the team to prove the current behavior is insufficient, prove where the insufficiency lives, define a measurable win, and protect operations with rollback and telemetry.
Section D — Pick the Correct Extension Point
Choose the most plausible extension point for each scenario.
| Scenario |
Most plausible extension point |
Why |
| need a new local trajectory scoring concept |
? |
? |
| need a different criterion for declaring goal reached near a docking target |
? |
? |
| need a new route-level recovery after repeated planner failure in a special area |
? |
? |
| need custom obstacle semantics imported from warehouse operations system |
? |
? |
Possible extension points include controller critics or plugin internals, goal checker, behavior or recovery plugin, costmap layer or semantic input pipeline, or non-Nav2 mission service.
Answer guidance
The lesson here is precise ownership. A controller critic changes local motion scoring. A goal checker changes completion semantics. Semantic obstacle rules may belong in a costmap layer or upstream semantic map ingestion. Route-level business policy may belong above Nav2 unless the behavior is genuinely navigation-generic.
Section E — Validation Plan Before Code
You are tentatively approving one custom extension for a docking-related goal checker.
Task E1 — Write the Pre-Code Validation Plan
Your plan must include:
- a replay or simulation scenario set
- a baseline using current built-in behavior
- metrics for success and failure
- a rollout safety gate
Then answer:
- What would convince you that the extension should be rejected even after it is implemented?
- What telemetry would you require in production for the first rollout?
Answer guidance
Strong answers use before-and-after comparison, not intuition. The safety gate should include measurable improvement and no regression in normal navigation. Production telemetry should include checker outcomes, near-goal behavior, abort reasons, and one mission context field.
Section F — Architecture Memo
Write a concise architecture memo covering:
- the problem statement
- why configuration or mission logic is insufficient
- the chosen extension point
- how it will be validated and rolled back
- what evidence must appear in review before merge
Target length: 12 to 16 lines.
Answer guidance
The best memos read like engineering approval documents, not feature wishlists. They are explicit about boundaries, metrics, and rollback.
Section G — AMR Production Reflection
Answer briefly but concretely.
G1. Why is “we can just write a plugin” a dangerous instinct on a navigation team?
G2. Which extension points would you treat as highest operational risk, and why?
G3. If you could add one mandatory review question before any Nav2 extension lands, what would it be?
Answer guidance
Strong answers emphasize maintainability, hidden ownership drift, and the tendency for custom plugins to become product-policy dumping grounds unless the review bar is disciplined.
Deliverable Template
Requirement under review:
Current evidence:
Why configuration is or is not enough:
Why mission logic is or is not enough:
Chosen solution home:
If plugin extension:
- extension point:
- success metrics:
- rollout gate:
- rollback plan:
- required telemetry:
If not plugin:
- correct owning layer:
Open risks:
Success Criteria
You have completed this lab well if you can:
- distinguish real Nav2 extension needs from configuration or product-policy problems
- pick a plausible extension point only after proving the problem belongs there
- define measurable validation and rollback criteria before code exists
- frame plugin work as an operationally accountable design choice instead of a convenience shortcut