Autoware Installation using Development docker image - hcn1519/ADS GitHub Wiki

Documentation Sources

Installation

  • If you want to modify Autoware source code and see the change of your modification, you need to use Autoware development image. Make sure that you need to use this image or not, because you can encounter several build issues.

Tested Version

Prerequisites

Install dependencies before you move on.

Installation

  1. Clone repository
cd username
git clone https://github.com/autowarefoundation/autoware.git
  1. Create autoware_map and download map data

Note: You can create it anywhere. Just specify that directory as an additional volume when running docker.

mkdir autoware_map

Download the map from here and locate them in the directory.

  1. Pull docker image
docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda

Note: there is a humble-latest-cuda image, but this does not work. It sounds unwieldy, but latest-cuda works in humble ROS environment.

  1. Launch docker
cd username # move where autoware, autoware_map directories are located
rocker --nvidia --x11 --user --volume ./autoware --volume ./autoware_map \
-- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
  1. Create src directory in autoware/ and import autoware.universe, simulator source code
cd somePath/autoware/
mkdir src
vcs import src < autoware.repos  
vcs import src < simulator.repos
  1. Update dependencies
sudo apt update
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
  1. Build Autoware using colcon
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
  1. Source the workspace setup script
source install/setup.bash
  1. Run sample planning
ros2 launch autoware_launch planning_simulator.launch.xml \
map_path:=../autoware_map/sample-map-planning \
vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

Tips for building Autoware

Command for running the simulator

  • Simply running Autoware simulator with a sample map
source ./install/setup.bash
ros2 launch autoware_launch planning_simulator.launch.xml \
map_path:=../autoware_map/sample-map-planning \
vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

ros2 launch autoware_launch planning_simulator.launch.xml \
map_path:=$HOME/Desktop/changnam/autoware_map/sample-map-planning \
vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

Trouble Shooting

  1. Insufficient memory for building Autoware

Building Autoware will fail if the machine lacks memory, especially building simulators. A workaround for this issue is to limit the memory usage of the build task.- The default Autoware building option needs lots of memory(more than 32GB).

MAKEFLAGS="-j4 -l3" colcon build --executor sequential --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
  1. Scenario simulator is unable to play ego car’s trajectory.

The sample scenario in Autoware (sample.yaml) reproduces three different scenarios. Autoware turns the simulator on and off each time it plays a new scenario. However, sometimes the simulator does not turn off correctly. In this case, you can use the command below to kill the remaining processes. (It will kill ros related processes.)

ps aux | grep ros | head -n -1 | awk '{ print $2 }' | xargs kill -9

AWSIM

rocker --nvidia --x11 --user --privileged --network=host --volume ./nishishinjuku_autoware_map --volume ./autoware_map/ --volume ./AWSIM_v1.1.0 --volume /tmp -- ghcr.io/tier4/online:humble-awsim-stable-prebuilt-cuda
ros2 launch autoware_launch e2e_simulator.launch.xml \
vehicle_model:=sample_vehicle \
sensor_model:=awsim_sensor_kit \
map_path:=./nishishinjuku_autoware_map

ROSbag

ros2 launch autoware_launch logging_simulator.launch.xml map_path:=../autoware_map/sample-map-rosbag vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit