Skip to content
Back to skills

Ros2 Navigation Nav2 Knowledge Patch

ASecurity

Nav2

  • 25 stars
  • 0 votes
  • 0 copies
  • 18 views
  • Added September 5, 2026
developmentgonode

Works with

  • cli

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill ros2-navigation-nav2-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ros2 Navigation Nav2 Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ros2 Navigation Nav2 Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-ros2-navigation-nav2-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-ros2-navigation-nav2-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ros2-navigation-nav2-knowledge-patch
description: Nav2
version: "1.3.12"
license: MIT
metadata:
  author: Nevaberry
---


# Nav2 configuration and migration guidance

Load this skill when configuring Nav2, migrating plugin or ROS interfaces, or
working on navigation trees, collision monitoring, costmaps, and controllers.
Use the quick references below for migration decisions and the topic files for
complete parameter details, defaults, and configuration examples.

## Reference index

| Reference | Topics |
| --- | --- |
| [Behavior trees and navigation](references/behavior-trees-and-navigation.md) | Navigator parameters, node migrations, selectors, recovery, control flow, pause/resume, multi-pose actions |
| [Collision Monitor](references/collision-monitor.md) | Velocity wiring, freshness, runtime controls, zones, observation sources, Collision Detector |
| [Costmaps and localization](references/costmaps-and-localization.md) | AMCL, footprints, layers, filters, inflation, transport, inspection, clearing |
| [Migrations and interfaces](references/migrations-and-interfaces.md) | Distribution context, lifecycle factories, ROS interfaces, custom plugins, namespaced bringup |
| [Planning, control, and smoothing](references/planning-control-and-smoothing.md) | Path handlers, server timing, checkers, planners, DWB, RPP, MPPI, Rotation Shim, smoothers |
| [Servers, behaviors, and tools](references/servers-behaviors-and-tools.md) | Routing, Behavior Server, teleoperation, docking, vector objects, following, simulation, RViz |

## Breaking changes and parameter migrations

### Navigator parameters, nodes, and ports

In Kilted, replace `error_code_names` with `error_code_name_prefixes` in
`bt_navigator`; the old key causes a startup exception. Bind each action's
`error_code_id` and `error_msg` outputs to the configured prefix's
`<prefix>_error_code` and `<prefix>_error_msg` blackboard keys.

In Lyrical, move blackboard-ID parameters into each navigator's namespace:
`goal_blackboard_id` under `navigate_to_pose`; `goals_blackboard_id` and
`waypoint_statuses_blackboard_id` under `navigate_through_poses`; and
`path_blackboard_id` under each applicable navigator.

In Lyrical, replace the BT conditions `IsStopped`, `IsPathValid`, and `IsPoseOccupied`
with `CheckStopStatus`, `ValidatePath`, and `CheckPoseOccupancy`, respectively.
These actions can return `RUNNING`. For `ValidatePath` and the `IsPathValid`
service, replace `check_full_path` with its inverse, `stop_at_first_collision`
(default `true`). Positive `max_lookahead_distance` limits validation ahead of
the robot; its default is `-1.0`.

In Lyrical, rename `TruncatePathLocal`'s `robot_frame` input to `robot_base_frame`.
Omitting the port uses `bt_navigator`'s `robot_base_frame` parameter.

### Controller configuration and custom plugin interfaces

In Lyrical, configure pruning and optional inversion or rotation handling on the
Controller Server's path handler. Remove `transform_tolerance` from DWB, RPP,
Graceful, and MPPI configs, and `max_robot_pose_search_dist` from RPP, Graceful,
and MPPI. The planning reference lists the additional DWB removals and MPPI
parameters that move into the handler.

For Lyrical custom plugins, add the transformed and pruned
`const nav_msgs::msg::Path &` argument to `GoalChecker::isGoalReached()`.
Replace `Controller::setPlan()` with
`newPathReceived(const nav_msgs::msg::Path & raw_global_path)`; add the processed
path and final `const geometry_msgs::msg::PoseStamped & global_goal` to
`computeVelocityCommands()`.

In Lyrical RPP, rename `desired_linear_vel` to `max_linear_vel` (default
`0.5` m/s). Align the velocity smoother's `max_velocity`, `min_velocity`,
`max_accel`, and `max_decel` with the controller limits. Set `stateful` on the
goal checker instead of RPP; `isGoalXYReached` shares the behavior across RPP,
Graceful, and Rotation Shim.

In Lyrical, Rotation Shim's `primary_controller` is a map containing the
underlying controller's `plugin` and parameters. MPPI's `motion_model` becomes a
plugin ID with a nested class declaration, required even for the default ID
`diff_drive`:

```yaml
MPPIController:
  plugin: nav2_mppi_controller::MPPIController
  motion_model: diff_drive
  diff_drive:
    plugin: mppi::DiffDriveMotionModel
```

In Kilted Graceful Controller configs, replace `motion_target_dist` with
`min_lookahead` and `max_lookahead`, and `final_rotation` with
`prefer_final_rotation`. The Controller Server's loop frequency can no longer
be changed through a dynamic parameter update in Kilted.

### ROS interfaces, actions, and bringup

For Lyrical custom plugins and servers, depend on `nav2_ros_common` and use
`nav2::LifecycleNode`. Its factories provide publisher/subscription QoS
overrides through `allow_parameter_qos_overrides` and service/action
introspection through `introspection_mode`. Subscriptions take the callback
before optional QoS; topics default to reliable, volatile QoS with depth 10.

Service clients use `async_call()` in place of `async_send_request()`.
Service callbacks take an `rmw_request_id_t` header before request and response.
Remove `action_server_result_timeout` from Lyrical action-server configurations.
Custom `BaseGlobalPlanner` implementations must add the
`std::vector<geometry_msgs::msg::PoseStamped>` viapoints argument to
`createPath()` for `ComputePathToPose`.

Kilted multi-pose action arrays become `nav_msgs/msg/Goals` messages with a
header: populate `goal.poses.goals` for `NavigateThroughPoses` and
`goal.goals.goals` for `ComputePathThroughPoses`.

Remove `use_namespace` from Kilted bringup calls and pass `namespace` directly
(default `/`). Use relative topic names in shared Nav2 and RViz configs for
per-robot topics. Move Kilted Static Layer `map_topic` under the layer's plugin
ID; the costmap node's own key was removed.

### Docking and smoother migrations

In Kilted, replace server-level `dock_backwards` with each plugin's
`dock_direction: backward` or `forward` (default). In Lyrical, custom
`ChargingDock` and `NonChargingDock` plugins must implement
`startDetectionProcess` and `stopDetectionProcess`, returning `true` when no
detector work is needed.

Lyrical simple dock plugins apply external-detection offsets in X, Y, Z order
using `setRPY()`. Recalibrate offsets combining nonzero yaw with nonzero roll
or pitch; older releases used Z, X, Y order.

Retune Constrained Smoother weights in Lyrical: the objective uses each weight
times squared cost, replacing squared weight times the fourth power of cost.

## Behavior-tree execution and navigation

The default navigation tree provides topic-based plugin selectors. Pass planner
and controller outputs to `ComputePathToPose.planner_id` and
`FollowPath.controller_id`. Register path handlers under `path_handler_plugins`
on `controller_server` and select a loaded handler or goal checker through `FollowPath`'s
`path_handler_id` or `goal_checker_id`.

The default `NavigateToPose` tree reuses its path near the goal only when the
goal is unchanged, `IsGoalNearby` succeeds, and validation succeeds on the
forward remainder. Contextual recoveries use `WouldAPlannerRecoveryHelp` for
global costmap clearing and `WouldAControllerRecoveryHelp` for local clearing,
with one retry each. Wire `error_code_id` to the matching `error_code` input.

`NonblockingSequence` re-ticks successful children and can restart actions;
all children must succeed on the same tick. `PersistentSequence` preserves
`current_child_idx` across halts: initialize it to zero for a fresh run and
preserve it on resume. Lyrical `RoundRobin` defaults to `wrap_around="false"`
and fails when the last child fails; set `wrap_around="true"` to preserve wrapping.

In Lyrical, `bt_search_directories` supports tree selection by ID or filepath
and subtrees from multiple files; give each tree a unique ID for ID selection
or multi-file subtrees. `bt_navigator.default_cancel_timeout` defaults to
`50` ms for action cancellation during halts.

## Velocity commands and collision monitoring

From Kilted, update the base driver and simulator for
`geometry_msgs/msg/TwistStamped` on existing velocity-command topics. To retain
`Twist`, set `enable_stamped_cmd_vel: false` on every participating Nav2 publisher
and subscriber. Collision Monitor defaults to `TwistStamped` from Kilted and
`Twist` in Jazzy and older releases.

Collision Monitor's `cmd_vel_in_topic` defaults to `cmd_vel_smoothed` from Jazzy
and `cmd_vel_raw` before Jazzy; `cmd_vel_out_topic` defaults to `cmd_vel`.
An enabled source stale for `source_timeout` (default `2.0` s) stops the robot.
Set it to `0.0` to skip freshness checks at that scope. `stop_pub_timeout`
defaults to `1.0` s of continued zero-velocity publication after stopping.

`min_points` is inclusive and defaults to `4`; migrate Humble `max_points` by
adding one. `trigger_consecutive_points` and `release_consecutive_points`
require consecutive cycles at/above and below the threshold, respectively;
both default to one cycle. Velocity-dependent polygons use the first match;
put a polygon covering the full command range last as a fallback.

## Planning, goal checking, and control

`costmap_update_timeout` bounds the wait for a current costmap: `1.0` s on
`planner_server` for the global costmap and `0.3` s on `controller_server` for
the local costmap. Controller `failure_tolerance` defaults to `0.0`, aborting
`FollowPath` on the first failure to compute velocity; `-1.0` permits indefinite
retries. `search_window` limits closest-point search along the path (default
`2.0` m).

Kilted `PositionGoalChecker` can accept position alone. `AxisGoalChecker` uses
the last path segment for separate along-path and cross-track tolerances.
Lyrical symmetric yaw tolerance can accept a heading 180 degrees from the
requested one for robots with equivalent forward and reverse orientations.

In Lyrical, `allow_partial_planning: true` accepts a path ending at the last
reachable input pose; inspect `last_reached_index` in `ComputePathThroughPoses`.
Multiple Smac planner instances can coexist for runtime selection. State Lattice
detects `motion_model: "omni"` in primitives metadata and disables
`allow_reverse_expansion` while using holonomic analytic expansion and smoothing.

Lyrical MPPI validates its winning trajectory through `OptimalTrajectoryValidator`;
the default `DefaultOptimalTrajectoryValidator` checks collisions. Set
`open_loop: true` to initialize velocity from the last command. Axis delay
settings and per-critic visualization are detailed in the planning reference.

## Costmaps, localization, and server features

AMCL `random_seed` accepts a nonnegative integer for repeatable sampling;
negative values, including default `-1`, seed from the clock. Set
`always_reset_initial_pose: true` to require an initial pose on reset, supplied
on `initial_pose` or through the parameters with `set_initial_pose: true`.

Costmap `filters` run after ordinary `plugins` layers are combined. Lyrical
selective clearing accepts `plugins: [obstacle_layer]`; an empty list clears
all eligible layers, and any unknown or non-clearable ID fails the whole request.
Lyrical SpeedFilter's `enable_path_lookahead: true` applies the strictest limit inside
a velocity-dependent window along the path instead of only at the current pose.

Behavior Server `simulate_ahead_time` controls collision lookahead for Spin,
BackUp, and DriveOnHeading. BackUp and DriveOnHeading use positive acceleration,
negative deceleration, and positive `minimum_speed` under their behavior IDs.

Use route tracking for progress feedback or operations on node/edge entry and
exit. Lyrical Route Server `smooth_corners: true` uses `smoothing_radius` for
tangent circular arcs, skipping nearly straight transitions and arcs extending
beyond either adjacent edge.

Files in this skill

  • SKILL.md9.3 KB
  • coverage.json1 KB
  • references/behavior-trees-and-navigation.md5.9 KB
  • references/collision-monitor.md5.3 KB
  • references/costmaps-and-localization.md4.3 KB
  • references/migrations-and-interfaces.md7.5 KB
  • references/planning-control-and-smoothing.md7.7 KB
  • references/servers-behaviors-and-tools.md4.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.