Skip to content

Commit 6b2c53c

Browse files
committed
Add doc for occupancy_check_min_distance
Signed-off-by: Adi Vardi <adi.vardi@enway.ai>
1 parent 403b95c commit 6b2c53c

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

configuration/packages/configuring-mppic.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,18 @@ This critic incentivizes aligning with the global path, if relevant. It does not
821821
============== ===========================
822822

823823
Description
824-
Maximum proportion of the path that can be occupied before this critic is not considered to allow the obstacle and path follow critics to avoid obstacles while following the path's intent in presence of dynamic objects in the scene. Between 0-1 for 0-100%.
824+
Maximum proportion of a path segment that can be occupied before this critic is not considered to allow the obstacle and path follow critics to avoid obstacles while following the path's intent in presence of dynamic objects in the scene. Between 0-1 for 0-100%.
825+
826+
:occupancy_check_min_distance:
827+
828+
============== ===========================
829+
Type Default
830+
-------------- ---------------------------
831+
double 2.0
832+
============== ===========================
833+
834+
Description
835+
Min distance for the occupancy check's path segment. The segment length is ``min(occupancy_check_min_distance, distance_to_furthest_reached_path_point).``
825836

826837
:use_path_orientations:
827838

@@ -1208,6 +1219,8 @@ The same applies to the Path Follow and Align offsets from furthest. In the same
12081219

12091220
The Path Follow critic cannot drive velocities greater than the projectable distance of that velocity on the available path on the rolling costmap. The Path Align critic `offset_from_furthest` represents the number of path points a trajectory passes through while tracking the path. If this is set either absurdly low (e.g. 5) it can trigger when a robot is simply trying to start path tracking causing some suboptimal behaviors and local minima while starting a task. If it is set absurdly high (e.g. 50) relative to the path resolution and costmap size, then the critic may never trigger or only do so when at full-speed. A balance here is wise. A selection of this value to be ~30% of the maximum velocity distance projected is good (e.g. if a planner produces points every 2.5cm, 60 can fit on the 1.5m local costmap radius. If the max speed is 0.5m/s with a 3s prediction time, then 20 points represents 33% of the maximum speed projected over the prediction horizon onto the path). When in doubt, ``prediction_horizon_s * max_speed / path_resolution / 3.0`` is a good baseline.
12101221

1222+
If your robot's kinematics is very different than the defaults, you may need to tune ``PathAlignCritic.occupancy_check_min_distance``. This distance defines the min length of the path segment used to disable the ``PathAlignCritic``. A reasonable initial value should be the horizon's length at full speed. If the distance is too short, the robot may slow down when approaching an obstacle ahead and may even get too close to it and get stuck. If the distance is too big, the critic will be disabled too early, which may cause deviation from path (if for example, the reference point for PathFollowCritic is beyond a curve on the path).
1223+
12111224
Obstacle, Inflation Layer, and Path Following
12121225
---------------------------------------------
12131226

0 commit comments

Comments
 (0)