Skip to content

Commit

Permalink
feat(goal_planner): do not decelerate before path candidates generati…
Browse files Browse the repository at this point in the history
…on (#5412)

refactor(goal_planner): use updateData



upda

use getPreviousModuleOutput also in waiting approval

Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 authored Oct 26, 2023
1 parent f41abb3 commit dfc83a0
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -914,14 +914,16 @@ void GoalPlannerModule::decideVelocity()

BehaviorModuleOutput GoalPlannerModule::planWithGoalModification()
{
// if pull over path candidates generation is not finished, use previous module output
if (status_.get_pull_over_path_candidates().empty()) {
return getPreviousModuleOutput();
}

constexpr double path_update_duration = 1.0;

resetPathCandidate();
resetPathReference();

// set current road lanes, pull over lanes, and drivable lane
setLanes();

// Check if it needs to decide path
status_.set_has_decided_path(hasDecidedPath());

Expand Down Expand Up @@ -996,6 +998,11 @@ BehaviorModuleOutput GoalPlannerModule::planWaitingApproval()

BehaviorModuleOutput GoalPlannerModule::planWaitingApprovalWithGoalModification()
{
// if pull over path candidates generation is not finished, use previous module output
if (status_.get_pull_over_path_candidates().empty()) {
return getPreviousModuleOutput();
}

waitApproval();

BehaviorModuleOutput out;
Expand Down Expand Up @@ -1038,7 +1045,7 @@ BehaviorModuleOutput GoalPlannerModule::planWaitingApprovalWithGoalModification(

std::pair<double, double> GoalPlannerModule::calcDistanceToPathChange() const
{
const auto & full_path = status_.get_pull_over_path()->getFullPath();
const auto full_path = status_.get_pull_over_path()->getFullPath();

const auto ego_segment_idx = motion_utils::findNearestSegmentIndex(
full_path.points, planner_data_->self_odometry->pose.pose, std::numeric_limits<double>::max(),
Expand Down

0 comments on commit dfc83a0

Please sign in to comment.