Skip to content

Commit

Permalink
fix(occlusion_spot): set proper condition on optional value (autoware…
Browse files Browse the repository at this point in the history
…foundation#6301)

Signed-off-by: Maxime CLEMENT <[email protected]>
  • Loading branch information
maxime-clem authored and zulfaqar-azmi-t4 committed Feb 6, 2024
1 parent 9ccee02 commit 3fd7d65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ bool generatePossibleCollisionsFromGridMap(
const auto pc = generateOneNotableCollisionFromOcclusionSpot(
grid, occlusion_spot_positions, offset_from_start_to_ego, base_point, path_lanelet, param,
debug_data);
if (pc) continue;
if (pc == std::nullopt) continue;
const double lateral_distance = std::abs(pc.value().arc_lane_dist_at_collision.distance);
if (lateral_distance > distance_lower_bound) continue;
distance_lower_bound = lateral_distance;
Expand Down

0 comments on commit 3fd7d65

Please sign in to comment.