Skip to content

Commit

Permalink
po
Browse files Browse the repository at this point in the history
Signed-off-by: yuki-takagi-66 <[email protected]>
  • Loading branch information
yuki-takagi-66 committed Jan 20, 2025
1 parent ae436b3 commit 4f0f928
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,10 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC
const PlannerParam & planner_param, const lanelet::BasicPolygon2d & crosswalk_polygon,
const bool is_object_away_from_path)
{
const bool is_stopped = vel < planner_param.stop_object_velocity;
const bool is_object_stopped = vel < planner_param.stop_object_velocity;

// Check if the object can be ignored
if (is_stopped) {
if (collision_state == CollisionState::IGNORE) {
return;
}

if (is_object_stopped && is_ego_yielding) {
if (!time_to_start_stopped) {
time_to_start_stopped = now;
}
Expand All @@ -214,14 +210,18 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC
planner_param.timeout_set_for_no_intention_to_walk, distance_to_crosswalk);
const bool intent_to_cross =
(now - *time_to_start_stopped).seconds() < timeout_no_intention_to_walk;
if (is_ego_yielding && !intent_to_cross && is_object_away_from_path) {
if (!intent_to_cross && is_object_away_from_path) {
collision_state = CollisionState::IGNORE;
return;
}
} else {
time_to_start_stopped = std::nullopt;
}

if (is_object_stopped && collision_state == CollisionState::IGNORE) {
return;
}

// Compare time to collision and vehicle
if (collision_point) {
// Check if ego will pass first
Expand Down

0 comments on commit 4f0f928

Please sign in to comment.