Skip to content

Commit

Permalink
fix(avoidance): don't set stoppable=true for objects that ego doesn't…
Browse files Browse the repository at this point in the history
… have to avoid

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed Jul 4, 2023
1 parent 0ef23ef commit 3717a69
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ MarkerArray createObjectInfoMarkerArray(const ObjectDataArray & objects, std::st
marker.id = uuidToInt32(object.object.object_id);
marker.pose = object.object.kinematics.initial_pose_with_covariance.pose;
std::ostringstream string_stream;
string_stream << std::fixed << std::setprecision(2);
string_stream << std::fixed << std::setprecision(2) << std::boolalpha;
string_stream << "ratio:" << object.shiftable_ratio << " [-]\n"
<< "lateral: " << object.lateral << " [-]\n"
<< "lateral:" << object.lateral << " [m]\n"
<< "necessity:" << object.avoid_required << " [-]\n"
<< "stoppable:" << object.is_stoppable << " [-]\n"
<< "stop_factor:" << object.to_stop_factor_distance << " [m]\n"
<< "move_time:" << object.move_time << " [s]\n"
<< "stop_time:" << object.stop_time << " [s]\n";
Expand Down
6 changes: 6 additions & 0 deletions planning/behavior_path_planner/src/utils/avoidance/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,12 @@ void fillObjectStoppableJudge(
{
if (!parameters->use_constraints_for_decel) {
object_data.is_stoppable = true;
return;
}

if (!object_data.avoid_required) {
object_data.is_stoppable = false;
return;
}

const auto id = object_data.object.object_id;
Expand Down

0 comments on commit 3717a69

Please sign in to comment.