Skip to content

RPP cusp not detected for in-place rotation (for reversing) #3089

@automech-rb

Description

@automech-rb

Bug report

Required Info:

  • Operating System:
    • Docker 20.04 Ubuntu
  • ROS2 Version:
    • rolling
  • Version or commit hash:
  • DDS implementation:
    • rmw_cyclonedds_cpp

Steps to reproduce issue

Use SMAC-lattice planner with in-place rotation on
and set use_rotate_to_heading: false and allow_reversing: true in RPP

  FollowPath:
      plugin: "nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController"
      desired_linear_vel: 0.8
      lookahead_dist: 0.4
      min_lookahead_dist: 0.4
      max_lookahead_dist: 0.8
      lookahead_time: 1.0
      rotate_to_heading_angular_vel: 0.5
      transform_tolerance: 0.1
      use_velocity_scaled_lookahead_dist: false
      min_approach_linear_velocity: 0.05
      approach_velocity_scaling_dist: 0.8
      max_allowed_time_to_collision_up_to_carrot: 1.0
      use_regulated_linear_velocity_scaling: true
      use_cost_regulated_linear_velocity_scaling: false
      regulated_linear_scaling_min_radius: 0.9
      regulated_linear_scaling_min_speed: 0.2
      use_rotate_to_heading: false
      allow_reversing: true
      rotate_to_heading_min_angle: 0.785 #45degree
      max_angular_accel: 0.5
      max_robot_pose_search_dist: 10.0
      use_interpolation: false

image
The above figure shows a cusp with in-place rotation.

Expected behavior

The lookup should first be till the cusp and after robot arrives at cusp it should lookup to next point.

Actual behavior

Cusp is not detected and robot lookup directly crosses the cusp even when robot has not arrived to the cusp pose.

Additional information

This is due to cusp being detected by negative dot product of consecutive pose on this line. As the in-place rotation have multiple consecutive pose at same location, the dot product is zero and cusp is not detected.

Maybe instead of dot product < 0, changing it to <= 0 may help. But it will bring along additional bugs such as

  • When path starts with in-plane rotation: this will lead to lookup stuck at start (tested)
  • false cusp detection in below case (confirmed SMAC-lattice produce such paths sometimes).
    image
    Sorry for my bad drawing skills!

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