AutowareV2X/docs/installation/docker-installation.md

80 lines
2.2 KiB
Markdown
Raw Normal View History

2022-10-04 04:36:54 +00:00
# Docker Installation
In order to run the simulations explained in the [Tutorials](/tutorials) section, you will need to proceed with the Docker installation.
2022-10-18 06:01:53 +00:00
!!! Note
Also refer to [Autoware's Docker Installation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/docker-installation/) for the Docker-based installation of Autoware.universe.
2022-10-04 04:36:54 +00:00
## Installing Autoware (Docker version)
For the newest documentation for the Docker installation of Autoware, see their [official documentation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/docker-installation/).
2022-12-13 15:08:18 +00:00
### Prerequisites
- git
2022-10-30 11:55:36 +00:00
### Setup
2022-10-04 04:36:54 +00:00
```bash
2022-10-30 11:55:36 +00:00
mkdir -p ~/workspace && cd ~/workspace
2022-10-04 04:36:54 +00:00
git clone https://github.com/autowarefoundation/autoware.git autoware_docker
cd autoware_docker
# Install dependencies using Ansible
./setup-dev-env.sh docker
# Make directory to store maps
2022-10-30 11:55:36 +00:00
mkdir -p ~/data/maps
```
2022-10-04 04:36:54 +00:00
2022-10-30 11:55:36 +00:00
### Launch container
```
2022-10-18 06:01:53 +00:00
# Launch Autoware container (with NVIDIA GPU)
2022-10-30 11:55:36 +00:00
rocker --nvidia --x11 --user --privileged --volume $HOME/workspace/autoware_docker --volume $HOME/data -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
2022-10-18 06:01:53 +00:00
# Launch Autoware container (without NVIDIA GPU)
2022-10-30 11:55:36 +00:00
rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --privileged --volume $HOME/workspace/autoware_docker --volume $HOME/data -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda
2022-10-04 04:36:54 +00:00
```
## Adding AutowareV2X
2022-10-30 11:55:36 +00:00
!!! Note
From here, run commands inside the container.
2022-10-04 04:36:54 +00:00
1. Move into `autoware_docker` directory.
```bash
2022-10-30 11:55:36 +00:00
cd ~/workspace/autoware_docker
2022-10-04 04:36:54 +00:00
```
2. Edit the `autoware.repos` file and add the following two repositories to the end.
```
2022-10-30 11:55:36 +00:00
v2x/autowarev2x:
2022-10-04 04:36:54 +00:00
type: git
url: https://github.com/tlab-wide/AutowareV2X.git
version: cpm-tr
2022-10-04 04:36:54 +00:00
v2x/vanetza:
type: git
url: https://github.com/yuasabe/vanetza.git
version: master
2022-10-04 04:36:54 +00:00
```
3. Update the repository
```
2022-10-18 06:01:53 +00:00
mkdir src
2022-10-04 04:36:54 +00:00
vcs import src < autoware.repos
vcs pull src
```
4. Install dependent ROS packages
```bash
sudo apt update
rosdep update
2022-10-30 11:55:36 +00:00
rosdep install --from-paths . --ignore-src --rosdistro $ROS_DISTRO -r
2022-10-04 04:36:54 +00:00
```
5. Build the workspace
```
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
```