Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions configuration/packages/configuring-mppic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,18 @@ MPPI Parameters
============== ===========================

Description
Whether to publish debugging trajectories for visualization. This can slow down the controller substantially (e.g. 1000 batches of 56 size every 30hz is a lot of data).
Whether to publish debugging trajectories for visualization and critic statistics. When enabled, candidate trajectories are colored by cost (green to red gradient, magenta for collisions) and a ``nav2_msgs::msg::CriticsStats`` message is published on the ``~/critics_stats`` topic. This can slow down the controller substantially (e.g. 1000 batches of 56 size every 30hz is a lot of data).

:critic_index_to_visualize:

============== ===========================
Type Default
-------------- ---------------------------
int 0
============== ===========================

Description
Selects which critic to visualize the color-scheme of when ``visualize`` is true publishing Marker messages for visualization in rviz. ``0`` shows the total cost across all critics, ``1..N`` selects an individual critic by index (in the order listed in the ``critics`` parameter).

:publish_optimal_trajectory:

Expand Down Expand Up @@ -305,17 +316,6 @@ MPPI Parameters
Description
Whether to regenerate noises each iteration or use single noise distribution computed on initialization and reset. Practically, this is found to work fine since the trajectories are being sampled stochastically from a normal distribution and reduces compute jittering at run-time due to thread wake-ups to resample normal distribution.

:publish_critics_stats:

============== ===========================
Type Default
-------------- ---------------------------
bool false
============== ===========================

Description
Whether to publish statistics about each critic's performance. When enabled, publishes a ``nav2_msgs::msg::CriticsStats`` message containing critic names, whether they changed costs, and the sum of costs added by each critic for all trajectory samples. Useful for debugging and tuning critic behavior but should not be enabled for generic runtime use.

:open_loop:

============== ===========================
Expand Down Expand Up @@ -1087,6 +1087,7 @@ Example
gamma: 0.015
motion_model: "DiffDrive"
visualize: false
critic_index_to_visualize: 0
reset_period: 1.0 # (only in Humble)
regenerate_noises: false
TrajectoryVisualizer:
Expand Down
8 changes: 8 additions & 0 deletions migration/Kilted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -860,3 +860,11 @@ See:

- :ref:`configuring_collision_monitor_node`
- :ref:`configuring_collision_detector_node`

MPPI per-critic trajectory cost visualization
---------------------------------------------

`PR #6036 <https://github.com/ros-navigation/navigation2/pull/6036>`_ enhances MPPI trajectory visualization with per-critic cost coloring.
When ``visualize`` is enabled, candidate trajectories are now rendered as cost-colored lines using a green-to-yellow-to-red gradient, with collision trajectories shown in magenta.
A new ``critic_index_to_visualize`` parameter (default ``0``) selects which critic's costs to display: ``0`` shows the total cost across all critics, while ``1..N`` selects an individual critic by index.
The ``publish_critics_stats`` parameter has been removed; critic statistics (``~/critics_stats`` topic) are now published automatically when ``visualize`` is enabled.
Loading