Skip to content

Commit

Permalink
fix(avoidance): ignore unavoidable objects around the goal (autowaref…
Browse files Browse the repository at this point in the history
…oundation#2612) (#234)

* fix(avoidance): ignore unavoidable objects around the goal

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* Update planning/behavior_path_planner/config/avoidance/avoidance.param.yaml

* Update planning/behavior_path_planner/src/behavior_path_planner_node.cpp

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
  • Loading branch information
kosuke55 and satoshi-ota authored Jan 5, 2023
1 parent 32b8793 commit 0dc505c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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 @@ -81,6 +81,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 @@ -294,6 +294,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 @@ -286,6 +286,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

0 comments on commit 0dc505c

Please sign in to comment.