Skip to content

Commit f8d2f2d

Browse files
authored
fix(autoware_behavior_velocity_planner_common): fix unusedScopedObject bug (#7570)
Signed-off-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
1 parent d2d45f2 commit f8d2f2d

File tree

1 file changed

+2
-2
lines changed
  • planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/src/utilization

1 file changed

+2
-2
lines changed

planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/src/utilization/util.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ double findReachTime(
418418
return j * t * t * t / 6.0 + a * t * t / 2.0 + v * t - d;
419419
};
420420
if (f(min, j, a, v, d) > 0 || f(max, j, a, v, d) < 0) {
421-
std::logic_error("[behavior_velocity](findReachTime): search range is invalid");
421+
throw std::logic_error("[behavior_velocity](findReachTime): search range is invalid");
422422
}
423423
const double eps = 1e-5;
424424
const int warn_iter = 100;
@@ -450,7 +450,7 @@ double calcDecelerationVelocityFromDistanceToTarget(
450450
const double current_velocity, const double distance_to_target)
451451
{
452452
if (max_slowdown_jerk > 0 || max_slowdown_accel > 0) {
453-
std::logic_error("max_slowdown_jerk and max_slowdown_accel should be negative");
453+
throw std::logic_error("max_slowdown_jerk and max_slowdown_accel should be negative");
454454
}
455455
// case0: distance to target is behind ego
456456
if (distance_to_target <= 0) return current_velocity;

0 commit comments

Comments
 (0)