Skip to content

Commit

Permalink
fix(autoware_behavior_velocity_planner_common): fix unusedScopedObjec…
Browse files Browse the repository at this point in the history
…t bug (autowarefoundation#7570)

Signed-off-by: Ryuta Kambe <[email protected]>
Signed-off-by: Simon Eisenmann <[email protected]>
  • Loading branch information
veqcc authored and simon-eisenmann-driveblocks committed Jun 26, 2024
1 parent 9213dc5 commit 6466bd2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ double findReachTime(
return j * t * t * t / 6.0 + a * t * t / 2.0 + v * t - d;
};
if (f(min, j, a, v, d) > 0 || f(max, j, a, v, d) < 0) {
std::logic_error("[behavior_velocity](findReachTime): search range is invalid");
throw std::logic_error("[behavior_velocity](findReachTime): search range is invalid");
}
const double eps = 1e-5;
const int warn_iter = 100;
Expand Down Expand Up @@ -450,7 +450,7 @@ double calcDecelerationVelocityFromDistanceToTarget(
const double current_velocity, const double distance_to_target)
{
if (max_slowdown_jerk > 0 || max_slowdown_accel > 0) {
std::logic_error("max_slowdown_jerk and max_slowdown_accel should be negative");
throw std::logic_error("max_slowdown_jerk and max_slowdown_accel should be negative");
}
// case0: distance to target is behind ego
if (distance_to_target <= 0) return current_velocity;
Expand Down

0 comments on commit 6466bd2

Please sign in to comment.