Skip to content

Commit

Permalink
fix(start_planner): fix start planner pendulum (#3972)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
  • Loading branch information
kosuke55 committed Jun 14, 2023
1 parent 3a1c114 commit b8ddaf5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ void StartPlannerModule::processOnExit()

bool StartPlannerModule::isExecutionRequested() const
{
// Check if ego arrives at goal
const Pose & goal_pose = planner_data_->route_handler->getGoalPose();
const Pose & current_pose = planner_data_->self_odometry->pose.pose;
if (
tier4_autoware_utils::calcDistance2d(goal_pose.position, current_pose.position) <
parameters_->th_arrived_distance) {
#ifdef USE_OLD_ARCHITECTURE
is_executed_ = false;
#endif
return false;
}

has_received_new_route_ =
!planner_data_->prev_route_id ||
*planner_data_->prev_route_id != planner_data_->route_handler->getRouteUuid();
Expand Down

0 comments on commit b8ddaf5

Please sign in to comment.