Skip to content

min_distance_to_obstacle doesn't seem to work with use_velocity_scaled_lookahead_dist on RPP #5989

@thirteendegreees

Description

@thirteendegreees

Bug report

Required Info:

  • Operating System:
    Ubuntu 24.04
  • Computer:
    Raspberry pi 5
  • ROS2 Version:
    Rolling
  • Version or commit hash:
    Latest
  • DDS implementation:
    Cyclonedds

Steps to reproduce issue

Use min_distance_to_obstacle > 0.0 with use_velocity_scaled_lookahead_dist

Expected behavior

Robot stops as determined by min_distance_to_obstacle, like it does when use_velocity_scaled_lookahead_dist is disabled

Actual behavior

Robot stops way closer than it should

Reproduction instructions

Additional information

Hello,

I’m not sure if this is the correct place to report this, but I was advised to open an issue here.

When use_velocity_scaled_lookahead_dist is disabled, the robot consistently stops at the configured min_distance_to_obstacle (e.g., 0.7m).

However, when enabling use_velocity_scaled_lookahead_dist, the robot stops significantly closer to the obstacle (around ~0.3m), regardless of the configured min_distance_to_obstacle.

I tested multiple values for min_distance_to_obstacle, including large values (e.g., 5m), but with use_velocity_scaled_lookahead_dist = true, the robot only stops when it is very close to the obstacle.

I also tried increasing max_allowed_time_to_collision_up_to_carrot, but this did not change the behavior.

For example:

When use_velocity_scaled_lookahead_dist is disabled
(the green line is the path, the black box is a obstacle, the pink circle is mt robot)

Image

When use_velocity_scaled_lookahead_dist is enabled

Image

Sorry for the low quality images, I'll only be able to get to the lab next week, and I wanted to share this as soon as possible.

See my config below:

controller_server:
  ros__parameters:
    controller_frequency: 30.0
    min_x_velocity_threshold: 0.001
    min_y_velocity_threshold: 0.5
    min_theta_velocity_threshold: 0.001
    progress_checker_plugins: ["progress_checker"] # progress_checker_plugin: "progress_checker" For Humble and older
    goal_checker_plugins: ["goal_checker"]
    controller_plugins: ["FollowPath"]

    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.1
      movement_time_allowance: 10.0
    goal_checker:
      plugin: "nav2_controller::SimpleGoalChecker"
      xy_goal_tolerance: 0.5
      yaw_goal_tolerance: 0.75
      stateful: True
    FollowPath:
      plugin: "nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController"
      max_linear_vel: 0.3
      min_linear_vel: -0.2
      max_angular_vel: 1.2
      min_angular_vel: -1.2
      max_linear_accel: 1.0
      max_linear_decel: -1.0
      max_angular_accel: 2.0
      max_angular_decel: -2.0
      lookahead_dist: 2.5
      min_lookahead_dist: 0.3
      max_lookahead_dist: 2.5
      lookahead_time: 1.5
      rotate_to_heading_angular_vel: 1.2
      use_velocity_scaled_lookahead_dist: true
      min_approach_linear_velocity: 0.05
      approach_velocity_scaling_dist: 0.6
      use_collision_detection: true
      max_allowed_time_to_collision_up_to_carrot: 2.5
      use_regulated_linear_velocity_scaling: true
      use_fixed_curvature_lookahead: true
      curvature_lookahead_dist: 0.25
      use_cost_regulated_linear_velocity_scaling: false
      cost_scaling_dist: 0.3
      cost_scaling_gain: 1.0
      regulated_linear_scaling_min_radius: 0.9
      regulated_linear_scaling_min_speed: 0.25
      use_rotate_to_heading: false
      allow_reversing: true
      rotate_to_heading_min_angle: 0.785
      min_distance_to_obstacle: 0.7
      stateful: true
      use_dynamic_window: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions