Skip to content

Commit

Permalink
Fix linting error (#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 Nov 17, 2023
1 parent cefce2c commit d9bea52
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -426,14 +426,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 d9bea52

Please sign in to comment.