Skip to content

Commit e05e657

Browse files
Update documentation for pluginized motion models (#905)
* updates to mppi configuration and migration Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com> * restored AckermannMotionModel parameter section Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com> * remove extra spaces Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com> --------- Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com>
1 parent bcbab4b commit e05e657

2 files changed

Lines changed: 43 additions & 9 deletions

File tree

configuration/packages/configuring-mppic.rst

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,23 @@ MPPI Parameters
3535
============== ===========================
3636
Type Default
3737
-------------- ---------------------------
38-
string "DiffDrive"
38+
string "diff_drive"
3939
============== ===========================
4040

4141
Description
42-
The desired motion model to use for trajectory planning. Options are ``DiffDrive``, ``Omni``, or ``Ackermann``. Differential drive robots may use forward/reverse and angular velocities; Omni add in lateral motion; and Ackermann adds minimum curvature constraints.
42+
The desired motion model plugin to use for trajectory planning. The plugin type is required to be specified in the corresponding namespace.
43+
44+
:``<motion_model>``.plugin:
45+
46+
============== ===========================
47+
Type Default
48+
-------------- ---------------------------
49+
string N/A
50+
============== ===========================
51+
52+
Description
53+
The plugin to use for the motion model constraints of the MPPI planner.
54+
Supported motion model plugins include "mppi::DiffDriveMotionModel", "mppi::OmniMotionModel", and "mppi::AckermannMotionModel" for differential drive, omnidirectional, and Ackermann robots respectively.
4355

4456
:critics:
4557

@@ -374,10 +386,10 @@ Trajectory Visualization
374386
Description
375387
Whether to allow QoS profiles to be overwritten with parameterized values.
376388

377-
Ackermann Motion Model
378-
----------------------
389+
AckermannMotionModel
390+
--------------------
379391

380-
:min_turning_r:
392+
:``<motion_model>``.min_turning_r:
381393

382394
============== ===========================
383395
Type Default
@@ -386,7 +398,7 @@ Ackermann Motion Model
386398
============== ===========================
387399

388400
Description
389-
The minimum turning radius possible for the vehicle platform (m).
401+
The minimum turning radius possible for the vehicle platform (m). This is only used if ``<motion_model>``.plugin is set to "mppi::AckermannMotionModel".
390402

391403
Default Optimal Trajectory Validator
392404
------------------------------------
@@ -1085,7 +1097,9 @@ Example
10851097
iteration_count: 1
10861098
temperature: 0.3
10871099
gamma: 0.015
1088-
motion_model: "DiffDrive"
1100+
motion_model: "diff_drive"
1101+
diff_drive:
1102+
plugin: "mppi::DiffDriveMotionModel"
10891103
visualize: false
10901104
critic_index_to_visualize: 0
10911105
reset_period: 1.0 # (only in Humble)
@@ -1097,8 +1111,6 @@ Example
10971111
plugin: "mppi::DefaultOptimalTrajectoryValidator"
10981112
collision_lookahead_time: 2.0
10991113
consider_footprint: false
1100-
AckermannConstraints:
1101-
min_turning_r: 0.2
11021114
critics: ["ConstraintCritic", "CostCritic", "GoalCritic", "GoalAngleCritic", "PathAlignCritic", "PathFollowCritic", "PathAngleCritic", "PreferForwardCritic"]
11031115
ConstraintCritic:
11041116
enabled: true

migration/Kilted.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,3 +945,25 @@ Global planner plugin natively accepts viapoints
945945
`PR #5995 <https://github.com/ros-navigation/navigation2/pull/5995>`_ updates the ``createPath`` API for the ``BaseGlobalPlanner`` to include a vector ``std::vector<geometry_msgs::msg::PoseStamped>`` argument that takes in a list of intermediate points and passes them to the planner plugin implementation.
946946

947947
The function signature for ``createPath`` must be updated accordingly for all custom planner plugins inheriting from the ``BaseGlobalPlanner``. This change does not alter the behavior of ``ComputePathThroughPoses`` that connects consecutive segments end-to-end but does upgrade the ``ComputePathToPose`` action.
948+
949+
MPPI motion models use plugin-based configuration
950+
--------------------------------------------------
951+
952+
`PR #6076 <https://github.com/ros-navigation/navigation2/pull/6076>`_ adds support for plugin-based configuration of motion models in MPPI.
953+
954+
Motion model now has to be set up by specifying plugin to use:
955+
956+
.. code-block:: yaml
957+
958+
MPPIController:
959+
plugin: "nav2_mppi_controller::MPPIController"
960+
motion_model: "diff_drive"
961+
diff_drive:
962+
plugin: "mppi::DiffDriveMotionModel"
963+
964+
Supported motion model plugins are:
965+
- ``mppi::DiffDriveMotionModel`` : replaces ``motion_model: DiffDrive``
966+
- ``mppi::OmniMotionModel`` : replaces ``motion_model: Omni``
967+
- ``mppi::AckermannMotionModel`` : replaces ``motion_model: Ackermann``
968+
969+
While "diff_drive" is the default value for ``motion_model`` parameter, it is still required to specify the plugin for it, as shown above.

0 commit comments

Comments
 (0)