Autoware Installation using Development docker image - hcn1519/ADS GitHub Wiki
Documentation Sources
- Autoware docker - Autoware Docker Installation
- simulator - tier4 - quick start
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
- ubuntu 22.04
- ROS 2 humble
- NVIDIA cuda
Prerequisites
Install dependencies before you move on.
Installation
- Clone repository
cd username
git clone https://github.com/autowarefoundation/autoware.git
- Create
autoware_mapand 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.
- Pull docker image
docker pull ghcr.io/autowarefoundation/autoware-universe:latest-cuda
Note: there is a
humble-latest-cudaimage, but this does not work. It sounds unwieldy, butlatest-cudaworks inhumbleROS environment.
- 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
- 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
- Update dependencies
sudo apt update
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
- Build Autoware using colcon
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
- Source the workspace setup script
source install/setup.bash
- 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
- 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).
- https://github.com/ros2/rosbag2/issues/872#issuecomment-1243003227
- https://answers.ros.org/question/304300/compilling-ros2-on-rasperry-pi/?answer=304668#post-id-304668
MAKEFLAGS="-j4 -l3" colcon build --executor sequential --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
- 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