No version for distro humble showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro jazzy showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro kilted showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro lyrical showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro rolling showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro galactic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro iron showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro melodic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange

No version for distro noetic showing github. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_traffic_light_compliance_checker package from autoware_universe repo

autoware_boundary_departure_checker autoware_component_interface_specs_universe autoware_cuda_dependency_meta autoware_deprecated_boundary_departure_checker autoware_fake_test_node autoware_glog_component autoware_goal_distance_calculator autoware_grid_map_utils autoware_obstacle_proximity_checker autoware_path_distance_calculator autoware_polar_grid autoware_time_utils autoware_traffic_light_compliance_checker autoware_traffic_light_recognition_marker_publisher autoware_traffic_light_utils autoware_universe_utils tier4_api_utils autoware_autonomous_emergency_braking autoware_collision_detector autoware_control_command_gate autoware_control_performance_analysis autoware_control_validator autoware_external_cmd_selector autoware_joy_controller autoware_lane_departure_checker autoware_mpc_lateral_controller autoware_obstacle_collision_checker autoware_operation_mode_transition_manager autoware_pid_longitudinal_controller autoware_predicted_path_checker autoware_pure_pursuit autoware_shift_decider autoware_smart_mpc_trajectory_follower autoware_spheric_collision_detector autoware_stop_mode_operator autoware_trajectory_follower_base autoware_trajectory_follower_node autoware_vehicle_cmd_gate autoware_tensorrt_vad autoware_control_evaluator autoware_evaluation_adapter autoware_kinematic_evaluator autoware_localization_evaluator autoware_perception_online_evaluator autoware_planning_evaluator autoware_scenario_simulator_v2_adapter autoware_diagnostic_graph_test_examples autoware_geo_pose_projector autoware_ar_tag_based_localizer autoware_landmark_manager autoware_lidar_marker_localizer autoware_localization_error_monitor autoware_pose2twist autoware_pose_covariance_modifier autoware_pose_estimator_arbiter autoware_pose_initialization_requester autoware_pose_instability_detector yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer autoware_map_tf_generator autoware_bevfusion autoware_bytetrack autoware_camera_streampetr autoware_cluster_merger autoware_compare_map_segmentation autoware_crosswalk_traffic_light_estimator autoware_detected_object_feature_remover autoware_detected_object_validation autoware_detection_by_tracker autoware_elevation_map_loader autoware_euclidean_cluster autoware_ground_segmentation autoware_ground_segmentation_cuda autoware_image_object_locator autoware_image_projection_based_fusion autoware_lidar_apollo_instance_segmentation autoware_lidar_centerpoint autoware_lidar_frnet autoware_lidar_transfusion autoware_map_based_prediction autoware_multi_object_tracker autoware_object_merger autoware_object_sorter autoware_occupancy_grid_map_outlier_filter autoware_predicted_path_postprocessor autoware_probabilistic_occupancy_grid_map autoware_ptv3 autoware_radar_fusion_to_detected_object autoware_radar_object_tracker autoware_radar_tracks_msgs_converter autoware_raindrop_cluster_filter autoware_shape_estimation autoware_simpl_prediction autoware_simple_object_merger autoware_tensorrt_bevdet autoware_tensorrt_bevformer autoware_tensorrt_classifier autoware_tensorrt_common autoware_tensorrt_plugins autoware_tensorrt_yolox autoware_tracking_object_merger autoware_traffic_light_arbiter autoware_traffic_light_category_merger autoware_traffic_light_classifier autoware_traffic_light_fine_detector autoware_traffic_light_map_based_detector autoware_traffic_light_multi_camera_fusion autoware_traffic_light_occlusion_predictor autoware_traffic_light_pipeline autoware_traffic_light_selector autoware_traffic_light_visualization perception_utils autoware_costmap_generator autoware_diffusion_planner autoware_external_velocity_limit_selector autoware_freespace_planner autoware_freespace_planning_algorithms autoware_hazard_lights_selector autoware_in_lane_mrm_planner autoware_manual_lane_change_handler autoware_minimum_rule_based_planner autoware_mission_planner_universe autoware_path_optimizer autoware_path_smoother autoware_remaining_distance_time_calculator autoware_rtc_interface autoware_scenario_selector autoware_surround_obstacle_checker autoware_trajectory_adapter autoware_trajectory_concatenator autoware_trajectory_gate autoware_trajectory_modifier autoware_trajectory_ranker autoware_trajectory_selector autoware_trajectory_validator autoware_behavior_path_avoidance_by_lane_change_module autoware_behavior_path_bidirectional_traffic_module autoware_behavior_path_direction_change_module autoware_behavior_path_dynamic_obstacle_avoidance_module autoware_behavior_path_external_request_lane_change_module autoware_behavior_path_goal_planner_module autoware_behavior_path_lane_change_module autoware_behavior_path_planner autoware_behavior_path_planner_common autoware_behavior_path_sampling_planner_module autoware_behavior_path_side_shift_module autoware_behavior_path_start_planner_module autoware_behavior_path_static_obstacle_avoidance_module autoware_behavior_velocity_blind_spot_module autoware_behavior_velocity_crosswalk_module autoware_behavior_velocity_detection_area_module autoware_behavior_velocity_intersection_module autoware_behavior_velocity_no_drivable_lane_module autoware_behavior_velocity_no_stopping_area_module autoware_behavior_velocity_occlusion_spot_module autoware_behavior_velocity_roundabout_module autoware_behavior_velocity_rtc_interface autoware_behavior_velocity_speed_bump_module autoware_behavior_velocity_template_module autoware_behavior_velocity_traffic_light_module autoware_behavior_velocity_virtual_traffic_light_module autoware_behavior_velocity_walkway_module autoware_motion_velocity_boundary_departure_prevention_module autoware_motion_velocity_dynamic_obstacle_stop_module autoware_motion_velocity_obstacle_cruise_module autoware_motion_velocity_obstacle_slow_down_module autoware_motion_velocity_obstacle_velocity_limiter_module autoware_motion_velocity_out_of_lane_module autoware_motion_velocity_road_user_stop_module autoware_motion_velocity_run_out_module autoware_planning_validator autoware_planning_validator_intersection_collision_checker autoware_planning_validator_latency_checker autoware_planning_validator_rear_collision_checker autoware_planning_validator_test_utils autoware_planning_validator_trajectory_checker autoware_bezier_sampler autoware_frenet_planner autoware_path_sampler autoware_sampler_common autoware_calibration_status_classifier autoware_cuda_pointcloud_preprocessor autoware_cuda_utils autoware_image_diagnostics autoware_image_transport_decompressor autoware_imu_corrector autoware_pcl_extensions autoware_pointcloud_preprocessor autoware_radar_objects_adapter autoware_radar_scan_to_pointcloud2 autoware_radar_static_pointcloud_filter autoware_radar_threshold_filter autoware_radar_tracks_noise_filter autoware_carla_interface autoware_dummy_diag_publisher autoware_dummy_infrastructure autoware_dummy_traffic_light_publisher autoware_fault_injection autoware_redundancy_command_selector autoware_vehicle_door_simulator tier4_dummy_object_rviz_plugin autoware_command_mode_decider autoware_command_mode_decider_plugins autoware_command_mode_switcher autoware_command_mode_switcher_plugins autoware_command_mode_types autoware_component_monitor autoware_component_state_monitor autoware_adapi_visualizers autoware_default_adapi_universe autoware_diagnostic_graph_aggregator autoware_diagnostic_graph_merger autoware_diagnostic_graph_utils autoware_driving_mode_manager autoware_duplicated_node_checker autoware_generic_service_divider autoware_hazard_status_converter autoware_mrm_comfortable_stop_operator autoware_mrm_emergency_stop_operator autoware_mrm_handler autoware_mrm_in_lane_stop_operator autoware_mrm_reset_manager autoware_mrm_steering_hold_stop_operator autoware_pipeline_latency_monitor autoware_processing_time_checker autoware_redundancy_adapi_switcher autoware_redundancy_switcher_interface autoware_redundancy_switcher_interface_plugins autoware_system_monitor autoware_topic_relay_controller autoware_topic_state_monitor autoware_velodyne_monitor autoware_accel_brake_map_calibrator autoware_external_cmd_converter autoware_raw_vehicle_cmd_converter autoware_steer_offset_estimator autoware_bag_time_manager_rviz_plugin autoware_traffic_light_rviz_plugin tier4_active_generator_rviz_plugin tier4_adapi_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_mode_rviz_plugin tier4_datetime_rviz_plugin tier4_manual_lane_change_rviz_plugin tier4_perception_rviz_plugin tier4_planning_factor_rviz_plugin tier4_state_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin

ROS Distro
github

Package Summary

Version 0.53.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Description
Checkout URI https://github.com/autowarefoundation/autoware_universe.git
VCS Type git
VCS Version main
Last Updated 2026-10-08
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

Library for checking trajectory compliance with traffic lights

Maintainers

  • Alqudah Mohammad
  • Maxime Clement

Authors

No additional authors.

Traffic Light Compliance Checker

The traffic_light_compliance_checker package provides a deterministic validation layer that cross-references planned vehicle trajectories against real-time perceived traffic light signals and High-Definition (HD) vector maps to enforce strict traffic compliance.

Core Features

  1. Signal State Tracking (TrafficLightStatusTracker)
    • Eliminates perception jitter and signal flickering by maintaining a temporal state history for each traffic light group ID.
    • Leverages stable duration thresholds before validating a transition to RED or AMBER.
    • Utilizes a hysteresis buffer to sustain known states during transient object occlusions.
  2. Trajectory Validation (TrafficLightComplianceChecker)
    • Scans forward trajectory segments sequentially to isolate intersection entry points.
    • Appends a physical front-bumper projection to ensure the vehicle footprint stays behind regulatory stop lines.
    • Implements a kinematic pass/stop feasibility matrix for AMBER signals based on comfortable braking and intersection clearance times.
    • Returns prioritized, chronological arrays of Violation metadata if an unvalidated stop line overshoot is detected.

Inner Workings

Main Processing Pipeline

The execution flow follows a sequential logical from signal processing & filtering down to stop line interaction evaluations:

  1. Filter signals and update status tracker: Feeds raw perception data into the status tracker to clean up transient noise and tracking dropouts.
  2. Generate Geometric Trajectory Linestring: Removes path points situated behind the ego vehicle, clamps the forward path length at max(min_lookahead_distance, comfortable_stop_distance + stop_overshoot_margin) (or until the first planned stop), and extends trajectory end to account for ego front offset.
  3. Extract and group map stop lines: Sorts overlapping intersection lines into separate evaluation queues for red and amber constraints.
  4. Evaluate Stop Line Violations: Checks the trajectory linestring against active stop lines, records detected violations and generate compliance result.
@startuml
skinparam defaultTextAlignment center
skinparam backgroundColor #WHITE

start

:Filter signals and update status tracker;<<#LightBlue>>
:Generate Trajectory Linestring\n(Cull backward points & clamp at max(min lookahead, stop distance));<<#LightBlue>>
:Extend trajectory linestring\n(Add physical front bumper footprint offset);<<#LightBlue>>
:Extract and group map stop lines\n(Categorize into RED vs. AMBER targets);<<#LightBlue>>

if (Is check_red_lights enabled?) then (yes)
  group Get red stop line violations #Lavender {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Record RED Light Violation; <<#LightPink>>
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

if (Is check_amber_lights enabled?) then (yes)
  group Get amber stop line violations #LightYellow {
    if (Trajectory Intersects stop line?) then (yes)
      if (Trajectory end exceeds tolerance threshold?) then (yes)
        :Compute time_to_cross AND ego_stopping_distance; <<#LightBlue>>
        if (ego_stopping_distance< distance to stop line OR time_to_cross > crossing_time_limit?) then (yes)
          :Record Amber Light Violation; <<#LightPink>>
        else (no)
        endif
      else (no)
      endif
    else (no)
    endif
  }
else (no)
endif

:Return Compliance Check Result; <<#LightGreen>>
stop

@enduml

Signal Status Tracker Filtering

To prevent sudden, harsh emergency braking maneuvers caused by raw perception noise, the status tracker filters raw signals through three deterministic mechanisms before passing them to the validation layer:

  • State Persistence Buffering: Incoming state transitions (e.g., green to amber/red/unknown) must continuously persist for a minimum time window (stable_duration_threshold_red, stable_duration_threshold_amber, or stable_duration_threshold_unknown) before the new state is considered valid. If a signal flips color or alters elements before this duration threshold is reached, its active elements array is cleared to suppress transient sensor noise.
  • History Eviction Buffer: If a traffic light group drops out of the incoming message matrix completely, the tracker retains its record for a brief clearing window. The duration an un-updated signal persists in memory is dynamically determined by its last recorded color state: stable_duration_threshold_red for red signals, stable_duration_threshold_amber for amber signals, and stable_duration_threshold_unknown for other non-red, non-amber conditions. If the signal remains un-detected beyond this frame timeout, its stale context is permanently erased from the tracking ledger.
  • Ego-Stopped Pass-Through Gate: The tracker continuously evaluates the current motion of the ego vehicle via is_ego_stopped. When the vehicle has brought itself to a halt beneath the configured ego_stopped_velocity_threshold, the entire stability duration filtering logic is completely bypassed. This pass-through guarantees that the vehicle maintains maximum responsiveness to incoming state changes while stationary, eliminating filtering-induced latency during intersection departures.

Safety & Compliance Logic

  • Segment-by-Segment Geometric Scan: The checker evaluates trajectory segments sequentially against mapped stop lines using a localized boost::geometry::intersection check. The loop breaks immediately upon finding the first chronological intersection point, calculating the dynamic distance-to-stop-line and interpolating the exact crossing timestamp (for amber light) using autoware::interpolation::lerp.
  • Red Light Evaluation: Generates a violation if an intersection occurs, unless the trajectory makes the ego come to a complete stop within the specified stop_overshoot_margin.
  • Amber Light Evaluation: Computes the dynamic stopping distance based on current velocity, acceleration, applied deceleration, and system response latency. If the vehicle can stop safely before the line, or if it cannot clear the intersection within the crossing_time_limit, an amber violation is recorded to enforce a stop.
  • Arrow-aware amber passing: On protected turn lanes with a separate direction-arrow bulb in the map, the circle signal often goes GREEN → AMBER → RED before GREEN *_ARROW appears. While the circle is amber after a green circle, requiring a stop would be overly strict. When enable_arrow_aware_amber_passing is true, the checker skips stop-line collection (no amber/red violation) if all of the following hold:
    • ego route lane is a left or right turn lane (turn_direction)
    • the traffic light has a static arrow in the map (subtype containing arrow, or light-bulb arrow attribute)
    • the amber phase was reached from a green circle (AmberState::kFromGreen)
    • the current signal still reports an amber circle

    Transitions from red (or unknown) to amber still require a stop. A brief red circle before the green arrow is reported is also still treated as a stop (same scope as the behavior velocity traffic light module).

Structs and Interface Definitions

The interfaces pass inputs and output results through the following standard data types:

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_traffic_light_compliance_checker

0.53.0 (2026-09-29)

  • Merge remote-tracking branch 'origin/main' into prepare-0.53.0-changelog

  • feat(traffic_light_compliance_checker): improve compliance checker stability and amber handling (#13371)

    • modify tl compliance checker to detect stop attempts at amber light and (optionally) add tl id to force rejection buffer
    • update traffic_light_stop params in modifier
    • update traffic_light filter params in validator
    • update modifier and validator parameter structs
    • implement logic to detect stops at ember light and optionally add to force rejection buffer
    • update & refactor traffic_light filter tests
    • refactor tl compliance checker
    • update amber rejection hystory while checking for violations instead of post process
    • apply allow_if_cannot stop check while checking for violations instead of post process

    * improve crossig time limit logic compute dynamic time limit for amber light based on tracked tl duration instead of using fixed value param

    • check the flag reject_if_stop_detected before adding tl to amber_rejection_history_
    • add test cases to traffic_light_stop and traffic_light_filter
    • minor refactor
    • fix(traffic_light_stop): floor scan length with min_lookahead_distance and wire stop time step (#3232)

    * fix(traffic_light_stop): check full traj horizon and wire stop time step At low ego speed the compliance checker capped the scan by comfortable stopping distance (~0.5 m), missing red stop lines ahead. Also assign trajectory_time_step_ so the existing 3-point stop fallback uses the configured step. Co-authored-by: Cursor <<cursoragent@cursor.com>>

    * fix(traffic_light): floor scan length with min_lookahead_distance Restore the comfortable-stop scan cap but floor it at 20 m so creeping ego still sees nearby stop lines, without rejecting far lights in the shared traffic_light_filter path. Co-authored-by: Cursor <<cursoragent@cursor.com>> ---------Co-authored-by: Cursor <<cursoragent@cursor.com>>

    • fix cherry-pick errors
    • implement arrow aware amber tl compliance check
    • Track YellowState (kNotYellow / kFromGreen / kFromNonGreen) in TrafficLightStatusTracker from raw Green Circle → Amber transitions
    • Skip stop-line collection for arrow-aware amber when enable_arrow_aware_yellow_passing, turn lane, mapped static arrow, and kFromGreen all hold
    • Keep Red→Amber / unknown-origin amber as stop (no override)
    • Add shared utils (is_equal, has_*_circle, has_static_arrow, is_arrow_aware_amber_pass) used by tracker and checker
    • Add enable_arrow_aware_yellow_passing (default true) and wire it through trajectory_modifier traffic_light_stop and trajectory_validator traffic_light_filter (params, schema, config)
    • Document arrow-aware amber behavior in the compliance checker README
    • Add unit tests for yellow-transition tracking and end-to-end arrow-aware amber cases
    • hold last stable TL status while gated states settle
    • Track current candidate and last stable signal separately in TrafficLightStatusTracker
    • Emit the last stable status while red/amber/unknown are below their stable-duration thresholds instead of clearing elements
    • Update YellowState only when the accepted stable status changes, avoiding single-frame false detections
    • Pass through raw signals when ego is stopped for responsiveness, while still updating stable history
    • Accept candidate states with duration >= threshold (including immediate green)
    • replace yellow usage by amber
    • fix test
    • rename test file and extend test cases for compliance checker
    • improve TL compliance checker to prevent chattering behavior
    • refactor TrafficLightStatusTracker::filter_signals to emit all stable statuses in the history, not only the ones in this frame
    • keep a history of violation arc lengths per id
    • use previous violation arc lengths to floor current frame lookahead distance
    • use current frame collected stop lines to cleanup the history of violation arc lengths

    * Update common/autoware_traffic_light_compliance_checker/include/autoware/traffic_light_compliance_checker/utils.hpp Co-authored-by: Maxime CLEMENT <<78338830+maxime-clem@users.noreply.github.com>>

    • feat(traffic_light_stop, traffic_light_compliance_checker): fix inconsistent amber rejection behavior

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_traffic_light_compliance_checker at Robotics Stack Exchange