Autoware
Autoware V2X
Our lab is co-leading the AutowareV2X project, and has successfully set up smart intersection devices to enhance real-world testing environments. We've incorporated scenarios involving walking pedestrians to simulate realistic urban traffic conditions. Autoware V2X project aims to innovate vehicular communication systems, focusing on improving safety and efficiency at urban intersections through vehicle-to-everything (V2X) communications.
OpenAD Kit
We are also actively involved in the OpenAD Kit project, focusing on containerizing algorithms to facilitate rapid and timely updates. The OpenAD Kit project aims to democratize autonomous driving (AD) systems by enhancing integration between cloud and edge computing, thus bringing the best practices of Software Defined Vehicle (SDV) development into real world. This approach significantly lowers the threshold for developing and deploying the related software stack, making it more accessible for broader adoption and innovation in the field of autonomous driving technology.
AutowareUniverse-CARLA Bridge
The AutowareUniverse-CARLA Bridge connects the AutowareUniverse autonomous driving system with the CARLA simulator. It enables real-time data exchange between simulation and perception/planning modules. This bridge allows testing and development of autonomous driving features in a virtual environment. It serves as a foundation for integrating simulation-based workflows with real-world autonomous software stacks.
Mac tutorial:
Let's start with installing brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
And then let's install docker through brew:
brew install cmake coreutils wget git
brew install --cask docker
brew install –cask xquartz # May not be necessary
I would suggest to use conda to create a virtual environment first.
conda create -n tutorial python==3.10 (mac doesn't support python version earlier than 3.7)
Start the docker daemon, and try this command to see if it works:
docker run hello-world
Now let's do a little bit work for forwarding visulization from inside the docker:
xhost +local:root
However, comparing with Ubuntu system, MacOS doesn't support to use CARLA docker unless built from source, but Mac doesn't have a GPU to accelerate relevant units. So we need to jump through the CARLA section.
Before we start to do the compiling work, open docker engine, and go to:
Settings - Resources - Advanced - Memory Limit, set to 16gb, otherwise the compilation will fail due to fatal error: cc1plus.
And please change the screen resolution as high as possible for better visualization.
Download the UDAutoware, Autoware_map, AutowareUniverse-Carla( but will not be used for MacOS showcase) , unzip them using:
unzip ~/Downloads/UDAutoware.zip -d ~/Desktop
unzip ~/Downloads/autoware_map.zip -d ~/Desktop
unzip ~/Downloads/AutowareUniverse-Carla.zip -d ~/Desktop
and use this command:
docker pull bytian/autoware_mac_aarch64:v1
Launch the docker with the following command (make sure to mount the UDAutoware, autoware_map from the right folders):
docker run -it --rm \
-p 6080:80 \
--security-opt seccomp=unconfined \
--shm-size=512m \
-v ~/Desktop/UDAutoware:/home/carla/UDAutoware \
-v ~/Desktop/autoware_map:/home/carla/autoware_map \
-v ~/Desktop/AutowareUniverse-Carla:/home/carla/AutowareUniverse-Carla \
bytian/autoware_mac_aarch64:v1
Start the compiling process with:
colcon build –symlink-install –cmake-args -DCMAKE_BUILD_TYPE=Release –parallel-workers 2 (short of memory)
Then after finish building autoware, you can also try to build AutowareUniverse-Carla bridge, by:
cd ../AutowareUniverse-Carla && colcon build
Don't forget to do the sourcing each time we attach to or launch the docker:
source /home/carla/UDAutoware/install/setup.bash && source /home/carla/AutowareUniverse-Carla/install/setup.bash
and start autoware using:
ros2 launch autoware_launch autoware.launch.xml map_path:=/home/carla/autoware_map/carla_map/Town10 vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
Ubuntu tutorial:
Begin by updating your package list to ensure you have the latest information on available packages:
sudo apt update
Install the necessary packages to allow apt to use repositories over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Add Docker's GPG key to your system to verify the authenticity of the packages:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the Docker repository to your system's apt sources:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update your package index to include Docker's repository:
sudo apt update
Install Docker Engine:
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Check if Docker is installed and running:
sudo systemctl status docker
Verify that Docker is working correctly by running the hello-world image:
docker run hello-world
Use command:
exit
to close this sample docker.
Install rocker for better docker launching: rocker github link
sudo apt-get install python3-rocker
Section B: CARLA and Autoware preparation and compilation
Pull CARLA docker to host machine:
docker pull carlasim/carla:0.9.15
Docker run CARLA command:
docker run --privileged --gpus all --net=host -e DISPLAY=$DISPLAY carlasim/carla:0.9.15 /bin/bash ./CarlaUE4.sh -carla-rpc-port=2000
Pull the docker image with built-in environment for Autoware compilation and launch
docker pull williamhecoin/blueice:hydrau-env
Download the required Autoware src code, Autoware_maps and AutowareUniverse-Carla, and unzip them to your $HOME directory.
Google drive link for Autoware, Autoware_map, AutowareUniverse-Carla
Now we are going to do the compilation but first you need to use this command on your terminal (for display connecting), and WHENEVER you open a terminal in this tutorial, please use this command:
xhost +local:root
Start the docker with built environments and load all the files into the docker by using this command:
rocker --x11 --nvidia --network=host --volume ~/autoware:/home/carla/autoware --volume ~/autoware_map:/home/carla/autoware_map --volume ~/AutowareUniverse-Carla:/home/carla/AutowareUniverse-Carla -- williamhecoin/blueice:hydrau-env
We need to add several python packages into the base environment of this docker:
pip3 install carla pynput pyzmq
Start compiling Autoware by cd to the directory and use:
colcon build
And then, please source install/setup.bash
Next, please cd to the AutowareUniverse-Carla directory and use:
colcon build
And then, please source install/setup.bash
Now we may bring up the Autoware GUI:
ros2 launch autoware_launch autoware.launch.xml map_path:=/home/carla/autoware_map/carla_map/Town10 vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
Open a new terminal, and use these command first:
xhost +local:root
docker ps
Now please check your docker ID, and fill it into this command:
docker exec -it _____ /bin/bash
Now you are attached to the current running Autoware docker, please remember to:
source /home/carla/autoware/install/setup.bash && source /home/carla/AutowareUniverse-Carla/install/setup.bash
to source the environment first.
Then please use the command:
ros2 run vehicle host_vehicle
And you may see a little vehicle spawned at a fixed point on the CARLA map, and Autoware.universe is publishing topics about surrounding environment.