Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Takagi <[email protected]>
  • Loading branch information
yuki-takagi-66 committed May 28, 2024
1 parent b49010a commit 3d6814e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions planning/obstacle_cruise_planner/src/planner_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,12 @@ std::vector<TrajectoryPoint> PlannerInterface::generateStopTrajectory(
velocity_factors_pub_->publish(makeVelocityFactorArray(planner_data.current_time, stop_pose));

// Publish if ego vehicle will over run against the stop point with a limit acceleration
const bool will_over_run = determined_stop_obstacle->dist_to_collide_on_decimated_traj -
determined_zero_vel_dist.value() <
determined_desired_margin.value();

const bool will_over_run = determined_zero_vel_dist.value() >
motion_utils::calcSignedArcLength(
planner_data.traj_points, 0, planner_data.ego_pose.position) +
determined_stop_obstacle->dist_to_collide_on_decimated_traj +
determined_desired_margin.value();
const auto stop_speed_exceeded_msg =
createStopSpeedExceededMsg(planner_data.current_time, will_over_run);
stop_speed_exceeded_pub_->publish(stop_speed_exceeded_msg);
Expand Down

0 comments on commit 3d6814e

Please sign in to comment.