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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

Package symbol

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange

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

autoware_mpc_lateral_controller 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_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_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_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_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_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 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-27
Dev Status UNKNOWN
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

MPC-based lateral controller

Maintainers

  • Arjun Ram
  • Kyoichi Sugahara
  • Alqudah Mohammad
  • Takumi Odashima

Authors

  • Takamasa Horibe
  • Maxime CLEMENT
  • Takayuki Murooka

MPC Lateral Controller

This is the design document for the lateral controller node in the autoware_trajectory_follower_node package.

Purpose / Use cases

This node is used to general lateral control commands (steering angle and steering rate) when following a path.

Design

The node uses an implementation of linear model predictive control (MPC) for accurate path tracking. The MPC uses a model of the vehicle to simulate the trajectory resulting from the control command. The optimization of the control command is formulated as a Quadratic Program (QP).

Different vehicle models are implemented:

  • kinematics : bicycle kinematics model with steering 1st-order delay.
  • kinematics_no_delay : bicycle kinematics model without steering delay.
  • dynamics : bicycle dynamics model considering slip angle. The kinematics model is being used by default. Please see the reference [1] for more details.

For the optimization, a Quadratic Programming (QP) solver is used and two options are currently implemented:

  • unconstraint_fast : use least square method to solve unconstraint QP with eigen.
  • osqp: run the following ADMM algorithm (for more details see the related papers at the Citing OSQP section):

Trajectory Reference Mode

The trajectory_reference_mode parameter selects how the MPC tracks the reference trajectory:

  • spatial (default): the reference trajectory is indexed by distance, and the time step of each prediction point is calculated from distance and velocity.
  • temporal: the reference trajectory’s time_from_start field is used directly, and the ego’s position along the trajectory is estimated from a predicted time (based on the previous nearest time and the control period) corrected by an observed nearest time from the current pose.

This parameter is normally declared once at the autoware_trajectory_follower_node level (see trajectory_follower_node.param.yaml) and shared with the longitudinal controller. It is also declared here with the same spatial default so that this node keeps working when run standalone (e.g. in tests). The default value keeps the existing spatial behavior unchanged.

Filtering

Filtering is required for good noise reduction. A Butterworth filter is employed for processing the yaw and lateral errors, which are used as inputs for the MPC, as well as for refining the output steering angle. Other filtering methods can be considered as long as the noise reduction performances are good enough. The moving average filter for example is not suited and can yield worse results than without any filtering.

Assumptions / Known limits

The tracking is not accurate if the first point of the reference trajectory is at or in front of the current ego pose.

Inputs / Outputs / API

Inputs

Set the following from the controller_node

  • autoware_planning_msgs/Trajectory : reference trajectory to follow.
  • nav_msgs/Odometry: current odometry
  • autoware_vehicle_msgs/SteeringReport: current steering

Outputs

Return LateralOutput which contains the following to the controller node

  • autoware_control_msgs/Lateral
  • LateralSyncData
    • steer angle convergence

Publish the following messages.

Name Type Description
~/output/predicted_trajectory autoware_planning_msgs::Trajectory Predicted trajectory calculated by MPC. The trajectory size will be empty when the controller is in an emergency such as too large deviation from the planning trajectory.

MPC class

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_mpc_lateral_controller

0.53.0 (2026-09-29)

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

  • test(autoware_mpc_lateral_controller): add characterization tests (#13356) test(autoware_mpc_lateral_controller): add characterization tests for MpcLateralController (#13356) MpcLateralController has no test of its own, so the parameter declaration, the vehicle model built from it, the steering offset compensation, the state kept between cycles and the command reset are untested. Later work moves these responsibilities between classes, and pinning the behaviour first makes a change visible. This adds 37 tests that drive the controller through LateralControllerBase and assert on LateralOutput alone. Three of them record a value or pin a behaviour that a later change is meant to break, so they carry the DISABLED_ prefix and stay out of the default run.

  • refactor(mpc_lateral_controller): decouple mpc logic from rclcpp::Node (#13090)

    * refactor(autoware_mpc_lateral_controller): decouple QPSolverOSQP from rclcpp::Logger/Clock Change QPSolverInterface::solve() to return a QPSolverResult (success flag and warning message) instead of performing RCLCPP_WARN/RCLCPP_WARN_THROTTLE internally. Logging is now done by the caller in MPC::executeOptimization, allowing QPSolverOSQP to be constructed without a logger or clock.

    * refactor(autoware_mpc_lateral_controller): use tl::expected for MPC helper return values Replace std::pair<ResultWithReason, T> in getData, executeOptimization, resampleMPCTrajectoryByTime, and updateStateForDelayCompensation with tl::expected<T, std::string>, matching the Error-as-Value pattern already used elsewhere in autoware_universe and avoiding the need to construct dummy values on failure.

    * refactor(autoware_mpc_lateral_controller): return predicted trajectory via MpcResult Merge ResultWithReason into MpcResult and add a predicted_trajectory field, so MPC::calculateMPC() returns the predicted trajectory instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): return ctrl_cmd via MpcResult Add a ctrl_cmd field to MpcResult so MPC::calculateMPC() returns the computed control command instead of writing it through an output parameter.

    * refactor(autoware_mpc_lateral_controller): move diagnostic into MpcResult Add a Float32MultiArrayStamped field to MpcResult and remove the diagnostic output parameter from calculateMPC, so callers get the diagnostic data as part of the returned result instead of via a mutable reference argument.

    * refactor(autoware_mpc_lateral_controller): move ctrl_cmd_horizon into MpcResult Add a LateralHorizon field to MpcResult and remove the ctrl_cmd_horizon output parameter from calculateMPC, so callers get the control command horizon as part of the returned result instead of via a mutable reference argument.

    • refactor(autoware_mpc_lateral_controller): change fields order

    * refactor(autoware_mpc_lateral_controller): publish Frenet predicted trajectory from MpcLateralController::run() Move the Frenet-coordinate predicted trajectory out of MPC's internal debug publisher and expose it via MpcResult::debug_msgs instead, so MpcLateralController::run() is responsible for publishing it alongside the other MPC outputs.

    * refactor(autoware_mpc_lateral_controller): publish resampled reference trajectory from MpcLateralController::run() Move the resampled reference trajectory debug message creation out of MPC::resampleMPCTrajectoryByTime and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest pose from MpcLateralController::run() Move the nearest pose debug message creation out of MPC::publishNearestDebug and into MPC::calculateMPC, exposing it via MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics.

    * refactor(autoware_mpc_lateral_controller): publish nearest segment trajectory from MpcLateralController::run() Extract the ego-nearest segment index computation and trajectory construction out of MPC::publishNearestDebug and into MPC::getData, storing the result in MPCData/MpcResult::debug_msgs so MpcLateralController::run() publishes it alongside the other debug topics. MPC::publishNearestDebug keeps only the nearest_info publish, reusing the already-computed segment indices.

    * refactor(autoware_mpc_lateral_controller): make buildNearestInfoMessage a member function returning the debug message Turn MPC::publishNearestDebug into MPC::buildNearestInfoMessage, a private member function that builds

File truncated at 100 lines see the full file

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_mpc_lateral_controller at Robotics Stack Exchange