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 (#7570)

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored Jun 20, 2024
1 parent d2d45f2 commit f8d2f2d
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 f8d2f2d

Please sign in to comment.