Skip to content

Commit

Permalink
fix(avoidance): fix wrong reason for unavoidable situation (#5558)
Browse files Browse the repository at this point in the history
* fix(avoidance): fix wrong reason for unavoidable situation

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

* fix(avoidance): fix misreading variable name

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

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota authored Nov 16, 2023
1 parent 854319e commit e28a501
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,13 +1010,13 @@ AvoidOutlines AvoidanceModule::generateAvoidOutline(
desire_shift_length > 0.0 ? feasible_relative_shift_length + current_ego_shift
: -1.0 * feasible_relative_shift_length + current_ego_shift;

const auto feasible =
const auto infeasible =
std::abs(feasible_shift_length - object.overhang_dist) <
0.5 * planner_data_->parameters.vehicle_width + object_parameter.safety_buffer_lateral;
if (feasible) {
if (infeasible) {
RCLCPP_WARN_THROTTLE(
getLogger(), *clock_, 1000, "feasible shift length is not enough to avoid. ");
object.reason = AvoidanceDebugFactor::INSUFFICIENT_LATERAL_MARGIN;
object.reason = AvoidanceDebugFactor::TOO_LARGE_JERK;
return boost::none;
}

Expand Down

0 comments on commit e28a501

Please sign in to comment.