File tree 1 file changed +6
-3
lines changed
planning/obstacle_cruise_planner/src
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,12 @@ std::vector<TrajectoryPoint> PlannerInterface::generateStopTrajectory(
388
388
velocity_factors_pub_->publish (makeVelocityFactorArray (planner_data.current_time , stop_pose));
389
389
390
390
// 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 ();
394
397
const auto stop_speed_exceeded_msg =
395
398
createStopSpeedExceededMsg (planner_data.current_time , will_over_run);
396
399
stop_speed_exceeded_pub_->publish (stop_speed_exceeded_msg);
You can’t perform that action at this time.
0 commit comments