Skip to content

Commit a3bd66f

Browse files
feat(crosswalk): update judgle time against the stopped objects (#9988)
Signed-off-by: yuki-takagi-66 <yuki.takagi@tier4.jp>
1 parent 71f616d commit a3bd66f

File tree

1 file changed

+7
-7
lines changed
  • planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src

1 file changed

+7
-7
lines changed

planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,10 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC
197197
const bool is_object_away_from_path,
198198
const std::optional<double> & ego_crosswalk_passage_direction)
199199
{
200-
const bool is_stopped = vel < planner_param.stop_object_velocity;
200+
const bool is_object_stopped = vel < planner_param.stop_object_velocity;
201201

202202
// Check if the object can be ignored
203-
if (is_stopped) {
204-
if (collision_state == CollisionState::IGNORE) {
205-
return;
206-
}
207-
203+
if (is_object_stopped && is_ego_yielding) {
208204
if (!time_to_start_stopped) {
209205
time_to_start_stopped = now;
210206
}
@@ -215,14 +211,18 @@ class CrosswalkModule : public SceneModuleInterfaceWithRTC
215211
planner_param.timeout_set_for_no_intention_to_walk, distance_to_crosswalk);
216212
const bool intent_to_cross =
217213
(now - *time_to_start_stopped).seconds() < timeout_no_intention_to_walk;
218-
if (is_ego_yielding && !intent_to_cross && is_object_away_from_path) {
214+
if (!intent_to_cross && is_object_away_from_path) {
219215
collision_state = CollisionState::IGNORE;
220216
return;
221217
}
222218
} else {
223219
time_to_start_stopped = std::nullopt;
224220
}
225221

222+
if (is_object_stopped && collision_state == CollisionState::IGNORE) {
223+
return;
224+
}
225+
226226
// Compare time to collision and vehicle
227227
if (collision_point) {
228228
auto isVehicleType = [](const uint8_t label) {

0 commit comments

Comments
 (0)