This is the Mcity-adapted version of Autoware Universe, based on the October 2023 release and extensively modified. The main branch targets ROS 2 Jazzy on Ubuntu 24.04; the autoware_ubuntu_22 branch keeps the ROS 2 Humble / Ubuntu 22.04 version. If you are looking for the most up-to-date Autoware Universe, please check out the official Documentation.
-
Hardware: A CPU based on Intel x86 architecture with at least 16 cores, at least 16 GB of system memory, and a dedicated GPU with at least 8 GB of VRAM.
-
System: Ubuntu 24.04 (native system installation rather than a virtual machine or Windows Subsystem for Linux)
-
Software: Follow the official instructions to install ROS 2 Jazzy Desktop.
sudo apt-get install libhiredis-dev libgeographiclib-dev ccache python3-rosdep python3-colcon-common-extensions ros-jazzy-rmw-cyclonedds-cppgit clone https://github.com/mcity/autoware.gitcd autowaresource /opt/ros/jazzy/setup.bashsudo rosdep init # an "already initialized" error is fine
rosdep updaterosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO -r# This may take 2–4 hours depending on hardware. You can limit the number of parallel build jobs based on your available CPU cores and memory.
MAKEFLAGS=-j6 colcon build --symlink-install --parallel-workers 6 --cmake-args -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBUILD_TESTING=OFFWe recommend running the following to automatically configure your environment each time a new terminal is opened. This ensures that ROS 2 Jazzy, Autoware, and Cyclone DDS are properly sourced and available by default.
# Source ROS 2 Jazzy setup
echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
# Source Autoware workspace setup
echo "source ~/autoware/install/setup.bash" >> ~/.bashrc
# Set Cyclone DDS as the default RMW implementation
echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc
# Required: CycloneDDS config for this machine (loopback, up to 200 participants).
# Without it most Autoware nodes fail with "Failed to find a free participant index".
echo "export CYCLONEDDS_URI=file://\$HOME/autoware/cyclonedds.xml" >> ~/.bashrcOn the Mach-E, use /etc/ros/cyclonedds.xml instead (export CYCLONEDDS_URI=file:///etc/ros/cyclonedds.xml). The
vehicle driver service (DBW, OXTS INS, lidar) uses that file, and the stack must use the same one or it will not see the
drivers' topics.
- The drivers start at boot (
ros2-autostart.service). Before engaging, check that/ins/imuruns at ~100 Hz,/ins/nav_sat_fixand/mcity/cav_poseat ~50 Hz. A slow or stalling pose feed makes the steering weave; the OXTS driver'spub_path_ratemust be 0. - Controller:
ros2 launch preview_control mache_control.launch.py. Its current Mach-E settings (speed cap 6 m/s, curve slowdown, acceleration limit 0.6 m/s^2, stop-point braking, steering smoothing) and their tuning history are in src/mcity/preview_control/CLAUDE.md. - Record every test drive with
ros2 bag recordinto~/bags(topic list in CLAUDE.md).
ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/autoware/map vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit lanelet2_map_file:=lanelet2_mcity.osmTo run a quick startup demonstration, first initialize the ego vehicle's state by selecting "2D Pose Estimate" at the top of the RViz panel, then set the destination using "2D Goal Pose". Finally, click "Auto" on the Operation Mode panel to start the vehicle. If Autoware consistently fails to plan a trajectory, See Troubleshooting for a potential fix.
Alternatively, to automate the pose initialization, goal selection, and engagement process when launching the Autoware stack, run the provided Mcity route script. The source code is available at src/mcity/mcity_route and can be customized as needed.
ros2 launch autoware_launch autoware.launch.xml map_path:=$HOME/autoware/map vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit lanelet2_map_file:=lanelet2_mcity.osmWe provide a co-simulation interface that integrates the Autoware real-car stack with the high-fidelity CARLA simulator and the traffic generation platform TeraSim. For detailed setup and usage instructions, refer to the Terasim repository.
ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$HOME/autoware/map vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit lanelet2_map_file:=lanelet2_mcity.osmIf Autoware fails to plan a trajectory after setting a "2D Goal Pose", open a new terminal, run the following command, then relaunch Autoware and try again:
ros2 run autoware_cosim autoware_dummy_grid

