Skip to content

Incorrect mpc_lateral_controller behavior #12398

@smk-robotics

Description

@smk-robotics

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I'm convinced that this is not my fault but a bug.

Description

In the latest releases (0.50.0, 0.49.0, and 0.48.0), we found that the actual predicted trajectory produced by the autoware_mpc_lateral_controller is incorrect and does not follow the reference trajectory in corners. Because of this, all of the safety checks for a predicted trajectory are triggered, including the lane departure check, as well as the control and planning validator checks.

An additional problem is that the visualization in RViz for the predicted trajectory is incorrect. It visualizes a debug predicted trajectory in the Frenet coordinate system, which is not actually used anywhere in the stack.

Image
Screencast.from.31.03.2026.14.22.08.webm

Expected behavior

The /control/trajectory_follower/lateral/predicted_trajectory is optimized to follow the reference trajectory at all times, not just for the first couple of meters before straightening out.

Actual behavior

The predicted trajectory from the /control/trajectory_follower/lateral/predicted_trajectory topic, which is used everywhere in the stack, is not following the reference trajectory in corners. This is triggering the lane departure and control validator safety checks.

Only the predicted trajectory in Frenet coordinates, which is used solely for debug visualization purposes, is actually following the reference trajectory perfectly for some reason. You can see the worst-case scenario on the image below. For some reason, the predicted trajectory just gives up on following the reference trajectory after a few meters. This is incorrect behavior for the model predictive lateral controller.

Image

Steps to reproduce

  1. Pull the latest universe-cuda image (ghcr.io/autowarefoundation/autoware:universe-cuda).
  2. Download the standard Autoware sample map.
  3. Launch the docker container with the stack
    docker run -it --rm --gpus all \ -e DISPLAY=$DISPLAY \ -e QT_X11_NO_MITSHM=1 \ -e NVIDIA_DRIVER_CAPABILITIES=all \ -e NVIDIA_VISIBLE_DEVICES=all \ -e XAUTHORITY=/tmp/.docker.xauth \ -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -v /tmp/.docker.xauth:/tmp/.docker.xauth:ro \ -v /home/map:/autoware/map \ ghcr.io/autowarefoundation/autoware:universe-cuda \
  4. Fix issue with the missing trajectoris and paths visualization by installing the ros-humble-rviz-2d-overlay-plugins package (Missing Trajectories and Paths visualization in latest docker image autoware#6971).
  5. Launch the planning simulator
    ros2 launch autoware_launch planning_simulator.launch.xml map_path:=/autoware/map
  6. Fix the visualization in RViz. Go to "Displays" panel in RViz and open: Control -> Predicted Trajectory.
    Switch the topic from: "/control/trajectory_follower/controller_node_exe/debug/predicted_trajectory_in_frenet_coordinate" to: "/control/trajectory_follower/lateral/predicted_trajectory". It's even better to visualize both of them at the same time and the reference trajectory.
  7. Check the deviation in 90 degree turns. The predicted trajectory is going outside of the lane.

Versions

  • OS: Ubuntu 22.04
  • ROS: ROS2 Humble:
  • Autoware: 0.50.0, 0.49.0, 0.48.0

Possible causes

  • Removed current steering angle component from the mpc state matrix.
  • Other changes in the mpc processing pipeline.

Additional context

When the prediction horizon becomes bigger, the problem is getting way worse. The predicted trajectory goes outside of the current lane in 100% cases in turns which is triggering the lane departure checker safety check and basically any other check for a predicted trajectory.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:controlVehicle control algorithms and mechanisms. (auto-assigned)

    Type

    No type

    Projects

    Status

    To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions