Skip to content

Commit 3d6814e

Browse files
fix
Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
1 parent b49010a commit 3d6814e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

planning/obstacle_cruise_planner/src/planner_interface.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,12 @@ std::vector<TrajectoryPoint> PlannerInterface::generateStopTrajectory(
388388
velocity_factors_pub_->publish(makeVelocityFactorArray(planner_data.current_time, stop_pose));
389389

390390
// Publish if ego vehicle will over run against the stop point with a limit acceleration
391-
const bool will_over_run = determined_stop_obstacle->dist_to_collide_on_decimated_traj -
392-
determined_zero_vel_dist.value() <
393-
determined_desired_margin.value();
391+
392+
const bool will_over_run = determined_zero_vel_dist.value() >
393+
motion_utils::calcSignedArcLength(
394+
planner_data.traj_points, 0, planner_data.ego_pose.position) +
395+
determined_stop_obstacle->dist_to_collide_on_decimated_traj +
396+
determined_desired_margin.value();
394397
const auto stop_speed_exceeded_msg =
395398
createStopSpeedExceededMsg(planner_data.current_time, will_over_run);
396399
stop_speed_exceeded_pub_->publish(stop_speed_exceeded_msg);

0 commit comments

Comments
 (0)