From 6bf2f4223986d3a27cd99f97f914d696d8088723 Mon Sep 17 00:00:00 2001 From: chyoo Date: Mon, 10 Aug 2026 09:02:16 +0900 Subject: [PATCH] fix(nav2): tune mkmini simulation control --- .../config/control_2d_sim_mkmini.yaml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/control_pkg/config/control_2d_sim_mkmini.yaml b/src/control_pkg/config/control_2d_sim_mkmini.yaml index 7b48d0f..301e769 100644 --- a/src/control_pkg/config/control_2d_sim_mkmini.yaml +++ b/src/control_pkg/config/control_2d_sim_mkmini.yaml @@ -24,6 +24,8 @@ controller_server: stateful: True FollowPath: plugin: "nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController" + # Reverse remains available to Nav2 recovery behaviours, but the normal + # path follower must not alternate direction along a goal path. allow_reversing: false use_dynamic_window: false use_velocity_scaled_lookahead_dist: false @@ -32,13 +34,15 @@ controller_server: use_regulated_linear_velocity_scaling: true use_cost_regulated_linear_velocity_scaling: true - desired_linear_vel: 0.5 - min_approach_linear_velocity: 0.3 - lookahead_dist: 1.0 + # A 1 m lookahead at 0.5 m/s cuts across the 1.35 m-radius vehicle + # paths. Keep the simulated tricycle close to the planned arc. + desired_linear_vel: 0.3 + min_approach_linear_velocity: 0.15 + lookahead_dist: 0.6 cost_scaling_dist: 0.6 cost_scaling_gain: 1.0 - approach_velocity_scaling_dist: 1.5 - regulated_linear_scaling_min_radius: 1.1 + approach_velocity_scaling_dist: 1.0 + regulated_linear_scaling_min_radius: 1.35 regulated_linear_scaling_min_speed: 0.3 max_allowed_time_to_collision_up_to_carrot: 2.0 @@ -54,7 +58,8 @@ local_costmap: width: 3 height: 3 resolution: 0.05 - footprint: "[ [0.42, 0.305], [0.42, -0.305], [-0.42, -0.305], [-0.42, 0.305] ]" + # Match the MK-mini Gazebo collision bounds used by the global planner. + footprint: "[ [0.44, 0.42], [0.44, -0.42], [-0.44, -0.42], [-0.44, 0.42] ]" plugins: ["obstacle_layer", "inflation_layer"] inflation_layer: plugin: "nav2_costmap_2d::InflationLayer"