Skip to content

Commit

Permalink
check collision when search start pose
Browse files Browse the repository at this point in the history
Signed-off-by: kyoichi-sugahara <[email protected]>
  • Loading branch information
kyoichi-sugahara committed Dec 26, 2023
1 parent 8afbca4 commit d55775a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -886,9 +886,13 @@ std::vector<Pose> StartPlannerModule::searchPullOutStartPoseCandidates(
{
std::vector<Pose> pull_out_start_pose_candidates{};
const auto start_pose = planner_data_->route_handler->getOriginalStartPose();
const auto local_vehicle_footprint = createVehicleFootprint(vehicle_info_);
const auto pull_out_lanes = start_planner_utils::getPullOutLanes(
planner_data_, planner_data_->parameters.backward_path_length + parameters_->max_back_distance);

const auto stop_objects_in_pull_out_lanes =
filterStopObjectsInPullOutLanes(pull_out_lanes, parameters_->th_moving_object_velocity);

// Set the maximum backward distance less than the distance from the vehicle's base_link to the
// lane's rearmost point to prevent lane departure.
const double current_arc_length =
Expand Down Expand Up @@ -918,6 +922,12 @@ std::vector<Pose> StartPlannerModule::searchPullOutStartPoseCandidates(
continue;
}

if (utils::checkCollisionBetweenFootprintAndObjects(
local_vehicle_footprint, *backed_pose, stop_objects_in_pull_out_lanes,
parameters_->collision_check_margin)) {
break; // poses behind this has a collision, so break.
}

pull_out_start_pose_candidates.push_back(*backed_pose);
}
return pull_out_start_pose_candidates;
Expand Down

0 comments on commit d55775a

Please sign in to comment.