Skip to content

Commit

Permalink
adding support for rotate in place cusps (ros-navigation#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski authored and Marc-Morcos committed Jul 4, 2024
1 parent b557af3 commit d7ca038
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,20 @@ double RegulatedPurePursuitController::findVelocitySignChange(
return hypot(
transformed_plan.poses[pose_id].pose.position.x,
transformed_plan.poses[pose_id].pose.position.y);
} else if (
(hypot(oa_x, oa_y) == 0.0 &&
transformed_plan.poses[pose_id - 1].pose.orientation !=
transformed_plan.poses[pose_id].pose.orientation)
||
(hypot(ab_x, ab_y) == 0.0 &&
transformed_plan.poses[pose_id].pose.orientation !=
transformed_plan.poses[pose_id + 1].pose.orientation))
{
// returning the distance since the points overlap
// but are not simply duplicate points (e.g. in place rotation)
return hypot(
transformed_plan.poses[pose_id].pose.position.x,
transformed_plan.poses[pose_id].pose.position.y);
}

if (
Expand Down

0 comments on commit d7ca038

Please sign in to comment.