Skip to content

Commit c152fcc

Browse files
updates to mppi configuration and migration
Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com>
1 parent c5d5c2d commit c152fcc

2 files changed

Lines changed: 50 additions & 18 deletions

File tree

configuration/packages/configuring-mppic.rst

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,34 @@ 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.
55+
56+
:``<motion_model>``.min_turning_r:
57+
58+
============== ===========================
59+
Type Default
60+
-------------- ---------------------------
61+
double 0.2
62+
============== ===========================
63+
64+
Description
65+
The minimum turning radius possible for the vehicle platform (m). This is only used if ``<motion_model>``.plugin is set to "mppi::AckermannMotionModel".
4366

4467
:critics:
4568

@@ -374,19 +397,6 @@ Trajectory Visualization
374397
Description
375398
Whether to allow QoS profiles to be overwritten with parameterized values.
376399

377-
Ackermann Motion Model
378-
----------------------
379-
380-
:min_turning_r:
381-
382-
============== ===========================
383-
Type Default
384-
-------------- ---------------------------
385-
double 0.2
386-
============== ===========================
387-
388-
Description
389-
The minimum turning radius possible for the vehicle platform (m).
390400

391401
Default Optimal Trajectory Validator
392402
------------------------------------
@@ -1085,7 +1095,9 @@ Example
10851095
iteration_count: 1
10861096
temperature: 0.3
10871097
gamma: 0.015
1088-
motion_model: "DiffDrive"
1098+
motion_model: "diff_drive"
1099+
diff_drive:
1100+
plugin: "mppi::DiffDriveMotionModel"
10891101
visualize: false
10901102
critic_index_to_visualize: 0
10911103
reset_period: 1.0 # (only in Humble)
@@ -1097,8 +1109,6 @@ Example
10971109
plugin: "mppi::DefaultOptimalTrajectoryValidator"
10981110
collision_lookahead_time: 2.0
10991111
consider_footprint: false
1100-
AckermannConstraints:
1101-
min_turning_r: 0.2
11021112
critics: ["ConstraintCritic", "CostCritic", "GoalCritic", "GoalAngleCritic", "PathAlignCritic", "PathFollowCritic", "PathAngleCritic", "PreferForwardCritic"]
11031113
ConstraintCritic:
11041114
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 uses support 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)