Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(avoidance): ignore unavoidable objects around the goal #2612

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

object_check_forward_distance: 150.0 # [m]
object_check_backward_distance: 2.0 # [m]
object_check_goal_distance: 20.0 # [m]

threshold_distance_object_is_on_center: 1.0 # [m]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ struct AvoidanceParameters
// continue to detect backward vehicles as avoidance targets until they are this distance away
double object_check_backward_distance;

// if the distance between object and goal position is less than this parameter, the module ignore
// the object.
double object_check_goal_distance;

// use in judge whether the vehicle is parking object on road shoulder
double object_check_shiftable_ratio;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ AvoidanceParameters BehaviorPathPlannerNode::getAvoidanceParam()
p.threshold_time_object_is_moving = dp("threshold_time_object_is_moving", 1.0);
p.object_check_forward_distance = dp("object_check_forward_distance", 150.0);
p.object_check_backward_distance = dp("object_check_backward_distance", 2.0);
p.object_check_goal_distance = dp("object_check_goal_distance", 20.0);
p.object_check_shiftable_ratio = dp("object_check_shiftable_ratio", 1.0);
p.object_check_min_road_shoulder_width = dp("object_check_min_road_shoulder_width", 0.5);
p.object_envelope_buffer = dp("object_envelope_buffer", 0.1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ void AvoidanceModule::fillAvoidanceTargetObjects(
continue;
}

if (object_data.longitudinal + parameters_->object_check_goal_distance > dist_to_goal) {
avoidance_debug_array_false_and_push_back("TooNearToGoal");
object_data.reason = "TooNearToGoal";
data.other_objects.push_back(object_data);
continue;
}

// Calc lateral deviation from path to target object.
object_data.lateral = calcLateralDeviation(object_closest_pose, object_pose.position);
avoidance_debug_msg.lateral_distance_from_centerline = object_data.lateral;
Expand Down