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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

Package symbol

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange

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

autoware_generic_service_divider 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

Plugin-based generic service divider node

Maintainers

  • Makoto Kurihara
  • Tetsuhiro Kawaguchi

Authors

No additional authors.

autoware_generic_service_divider

Purpose

Autoware can be deployed in a redundant configuration, where the same set of nodes runs more than once, typically in separate ROS 2 domains (for example a main ECU and a sub ECU) so that one side can take over when the other fails.

Service calls do not fan out on their own. A topic publisher reaches every subscriber, but a service client talks to exactly one server. That is a problem for the control-plane services that must be applied to both sides at the same time, such as changing the operation mode, requesting a control mode, or resetting the diagnostic graph. Without a fan-out mechanism every caller would have to know how many redundant instances exist, hold one client per instance, call them all, and then decide what to answer when only some of them succeed.

This node advertises a single input service, forwards each incoming request to N configured output services, waits for all of them, and returns one aggregated response to the original caller. Callers stay unaware of the redundancy, and the fan-out policy is concentrated in one place.

                          +---------------------------------------+
                          |        generic_service_divider        |
 caller --request--> /system/operation_mode/change_operation_mode  |
                          |            |                          |
                          |            +--> /main/system/operation_mode/change_operation_mode
                          |            |         (primary, timeout 200 ms)
                          |            +--> /sub/system/operation_mode/change_operation_mode
                          |            |         (timeout 500 ms)
 caller <--response-- aggregated result |                          |
                          +---------------------------------------+

Inner-workings / Algorithms

Architecture

The node itself contains no service-specific logic. Everything is driven by divider plugins loaded through pluginlib.

Component File Role
GenericServiceDividerNode src/generic_service_divider_node.cpp Loads the plugins listed in the plugins parameter, calls setup_service_division() on each, and publishes the startup diagnostics.
ServiceDividerPluginBase src/service_divider_plugin_base.cpp Implements the entire fan-out flow: startup gating, request forwarding, per-output timeouts, response aggregation, and cleanup.
Divider plugins plugins/*.cpp Declare what to divide: the service type, the input service name, the output service configuration, how to judge success, and how to build an error response.
GenericService / GenericClient src/generic_service.cpp, src/generic_client.cpp Type-erased service server and client, so the base class can forward a request without being compiled against the concrete service type.
service_typesupport_helpers src/service_typesupport_helpers.cpp Resolves the introspection typesupport library from a service type string and allocates zero-initialized messages.

Because the request payload is handled as std::shared_ptr<void>, message allocation and initialization are resolved at runtime from the type string (for example autoware_system_msgs/srv/ChangeOperationMode) through rosidl_typesupport_introspection_cpp. Adding support for a new service type therefore does not require any change to the fan-out logic.

Startup gating (fail-closed)

setup_service_division() creates one GenericClient per output service and then calls try_start_input_service().

The input service is advertised only after every output service server is available. While any output server is missing, the node

  • does not advertise the input service, so callers see “service not available” instead of a request that silently reaches only a subset of the outputs,
  • retries every 500 ms with a wall timer,
  • logs Service divider: waiting for output service servers before advertising '<input>' (ready=k/n, waiting=[...]) at most once per 5 s, and
  • reports ERROR on the diagnostic status.

Once every output server is ready, the input service is advertised, the retry timer is cancelled, and the node logs Service divider: <input> -> <n> outputs (type: <service type>).

Request forwarding

For each incoming request the base class

  1. creates a pending division and registers it under an incrementing id that appears in every related log line as Service divider[<id>],
  2. forwards the unmodified request to every output service concurrently, and
  3. arms a per-output wall timer with that output’s timeout_ms.

Each output client is placed in its own MutuallyExclusive callback group, and the input service is placed in a Reentrant callback group, so concurrent input calls are tracked independently. The node executable runs on a MultiThreadedExecutor.

Whichever comes first, the response callback or the timeout timer, marks the output as completed through mark_output_completed(); the loser of that race returns without touching the state. When the last output completes, the timers are cancelled and the response is finalized.

Response aggregation

Condition Response returned to the caller
All outputs succeeded The primary output’s response, verbatim
The primary responded, but at least one output failed or timed out Error response with the message One or more output services failed or timed out
The primary did not respond (timeout or send failure) Error response with the message Primary service did not respond

Success is judged per service type by the plugin through is_response_success(), for example response.status.success or response.success. Error responses are built by the plugin through create_error_response(); for service types that carry autoware_common_msgs/msg/ResponseStatus, the code is set to ResponseStatus::SERVICE_TIMEOUT.

Inputs / Outputs

The service names below are the defaults in config/generic_service_divider.param.yaml. All of them are configurable, and a service pair exists only when its plugin is listed in the plugins parameter.

Input / Output services

Interface type Name Type Description
service /system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Input service advertised to callers
client /{main,sub}/system/operation_mode/change_operation_mode autoware_system_msgs/srv/ChangeOperationMode Output services the request is forwarded to
service /system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Input service
client /{main,sub}/system/operation_mode/change_autoware_control autoware_system_msgs/srv/ChangeAutowareControl Output services
service /control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Input service
client /{main,sub}/control/control_mode_request autoware_vehicle_msgs/srv/ControlModeCommand Output services
service /diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Input service
client /{main,sub}/diagnostics_graph/reset tier4_system_msgs/srv/ResetDiagGraph Output services
service /system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Input service
client /{main,sub}/system/redundancy_switcher/reset tier4_system_msgs/srv/ResetRedundancySwitcher Output services
publisher /diagnostics diagnostic_msgs/msg/DiagnosticArray Startup readiness of the divider

Diagnostics

The node publishes the diagnostic status service_startup_readiness with the hardware id generic_service_divider, and forces an update at 1 Hz.

| Key | Value | | ———————————— | —————————————————————- |

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_generic_service_divider

0.53.0 (2026-09-29)

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

  • feat: add autoware generic service divider (#12745)

    • feat: add node
    • style(pre-commit): autofix
    • feat: add ekf trigger node
    • fix(generic_service_divider): add log and fix trigger_node name
    • style(pre-commit): autofix
    • feat(generic_service_divider): wait all server
    • feat(generic_service_divider): add diag
    • feat(generic_service_divider): add control mode request plugins
    • style(pre-commit): autofix
    • fix: pre-commit
    • fix: refactor
    • feat: add README.md
    • fix(autoware_generic_service_divider): fix response finalization race and document known limits (#12)

    * fix(autoware_generic_service_divider): fix response finalization race and request registration order Four fixes found while reviewing the package:

    * [try_finalize_response()]{.title-ref} decided whether the division was complete from [awaiting_count]{.title-ref} alone. [mark_output_completed()]{.title-ref} releases [pending->mutex]{.title-ref} before its caller re-acquires it in [try_finalize_response()]{.title-ref}, so when the last two outputs complete on different threads both can observe [awaiting_count == 0]{.title-ref} and finalize the same request, sending a second response for the same [rmw_request_id_t]{.title-ref}. Add a [finalized]{.title-ref} flag guarded by [pending->mutex]{.title-ref} so finalization runs exactly once. This also covers the [catch]{.title-ref} path in [forward_request()]{.title-ref}, which called [try_finalize_response()]{.title-ref} without checking the [mark_output_completed()]{.title-ref} return value.

    * [GenericClient::async_send_request()]{.title-ref} called [rcl_send_request()]{.title-ref} outside [pending_requests_mutex_]{.title-ref} and only then inserted the pending entry, so a response arriving before the insert was dropped by [handle_response()]{.title-ref} and the division could only end through the timeout path. Hold the mutex across both, matching upstream [rclcpp::GenericClient]{.title-ref}.

    * Rename the [trigger_node]{.title-ref} configuration block to [ekf_trigger_node]{.title-ref}, the prefix [EkfTriggerNodeDivider]{.title-ref} actually reads. Enabling that plugin with the old block name produced a divider with no outputs, which still advertises its input service but never sends any response.

    * Align the hardcoded default for [reset_redundancy_switcher.input_service]{.title-ref} with the shipped configuration and the README. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

    * docs(autoware_generic_service_divider): document configuration pitfalls and future work Extend "Assumptions / Known limits":

    * [primaries]{.title-ref} is not validated: omitting it, or marking no output primary, makes every call return "Primary service did not respond" even when all outputs succeeded, with no startup warning.

    * A plugin whose configuration block is missing or misnamed falls back to an empty output list, advertises its input service and then never replies.

    * Output service names must be unique within a plugin, otherwise the outstanding-response counter never reaches zero and the caller hangs.

    * A total plugin load failure is reported as OK by [service_startup_readiness]{.title-ref}, so [plugin_count]{.title-ref} has to be checked against the configured list. Drop the note about the unused [trigger_node]{.title-ref} block, which is now renamed. Add a "Future work" section covering the stale entries in [GenericClient::pending_requests_]{.title-ref} and the fail-open startup diagnostics. Co-Authored-By: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>> ---------Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Makoto Kurihara <<mkuri8m@gmail.com>> Co-authored-by: Claude Opus 5 (1M context) <<noreply@anthropic.com>>

  • Contributors: Ryohsuke Mitsudome, Tetsuhiro Kawaguchi

Launch files

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_generic_service_divider at Robotics Stack Exchange