Skip to content

Commit

Permalink
Fix linting error (ros-navigation#3969)
Browse files Browse the repository at this point in the history
* Fix linting error

* Update regulated_pure_pursuit_controller.cpp
  • Loading branch information
SteveMacenski authored and Marc-Morcos committed Jul 4, 2024
1 parent d6e35db commit 171fe3a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,16 @@ double RegulatedPurePursuitController::findVelocitySignChange(
return hypot(
transformed_plan.poses[pose_id].pose.position.x,
transformed_plan.poses[pose_id].pose.position.y);
} else if (
}

if (
(hypot(oa_x, oa_y) == 0.0 &&
transformed_plan.poses[pose_id - 1].pose.orientation !=
transformed_plan.poses[pose_id].pose.orientation)
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))
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)
Expand Down

0 comments on commit 171fe3a

Please sign in to comment.