diff --git a/src/control_pkg/config/control_2d_sim_mkmini.yaml b/src/control_pkg/config/control_2d_sim_mkmini.yaml index c996d9b..41c7277 100644 --- a/src/control_pkg/config/control_2d_sim_mkmini.yaml +++ b/src/control_pkg/config/control_2d_sim_mkmini.yaml @@ -4,7 +4,9 @@ controller_server: ros__parameters: use_sim_time: True - controller_frequency: 10.0 + # Reeds-Shepp paths switch direction at cusps. A faster control loop keeps + # the simulated tricycle from overshooting those short reverse segments. + controller_frequency: 20.0 min_x_velocity_threshold: 0.001 min_y_velocity_threshold: 0.0 min_theta_velocity_threshold: 0.001 @@ -24,9 +26,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 + # Required to track reverse segments generated by the Reeds-Shepp planner. + allow_reversing: true use_dynamic_window: false use_velocity_scaled_lookahead_dist: false use_rotate_to_heading: false @@ -34,16 +35,16 @@ controller_server: use_regulated_linear_velocity_scaling: true use_cost_regulated_linear_velocity_scaling: true - # 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. + # Keep the carrot before the next direction-change cusp. A long + # lookahead makes a car-like controller cut across short reverse arcs. desired_linear_vel: 0.4 - min_approach_linear_velocity: 0.15 - lookahead_dist: 0.6 + min_approach_linear_velocity: 0.08 + lookahead_dist: 0.35 cost_scaling_dist: 0.6 cost_scaling_gain: 1.0 approach_velocity_scaling_dist: 1.0 regulated_linear_scaling_min_radius: 1.35 - regulated_linear_scaling_min_speed: 0.3 + regulated_linear_scaling_min_speed: 0.1 max_allowed_time_to_collision_up_to_carrot: 2.0 local_costmap: @@ -112,7 +113,7 @@ behavior_server: velocity_smoother: ros__parameters: use_sim_time: True - smoothing_frequency: 10.0 + smoothing_frequency: 20.0 scale_velocities: False feedback: "OPEN_LOOP" max_velocity: [0.5, 0.0, 0.5]