Skip to content

Commit

Permalink
update documents
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
Kenji Miyake committed Feb 4, 2022
1 parent 5a7f1a9 commit cfa4963
Show file tree
Hide file tree
Showing 11 changed files with 208 additions and 739 deletions.
3 changes: 1 addition & 2 deletions docs/installation/autoware/.pages
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
nav:
- index.md
- local-installation.md
- docker-installation.md
- source-installation.md
100 changes: 98 additions & 2 deletions docs/installation/autoware/docker-installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,101 @@
# Docker installation

!!! warning
## Prerequisites

Under Construction
- [Git](https://git-scm.com/)

## How to set up a development environment

1. Clone `autowarefoundation/autoware` and move to the directory.

```bash
git clone https://github.com/autowarefoundation/autoware.git
cd autoware
```

2. Install the dependencies.

```bash
./setup-dev-env.sh docker
```

## How to set up a workspace

1. Launch a Docker container

```bash
rocker --nvidia --x11 --user \
--volume $HOME/autoware \
-- ghcr.io/autowarefoundation/autoware-universe:latest
```

See [here](https://github.com/autowarefoundation/autoware/tree/main/docker/README.md) for more advanced usage.

After that, move to the workspace in the container:

```bash
cd autoware
```

2. Create the `src` directory and clone repositories into it.

```bash
mkdir src
vcs import src < autoware.repos
```

3. Build the workspace.

```bash
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
```

## Troubleshooting

Here are solutions for a few specific errors:

### Error - "forward compatibility was attempted on non supported hw" when starting ADE

When starting `ade` with GPU support enabled for NVIDIA graphics, you may sometimes receive the following error:

```bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:432: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: cuda error: forward compatibility was attempted on non supported hw\\\\n\\\"\"": unknown.
ERROR: Command return non-zero exit code (see above): 125
```

This usually indicates that a new NVIDIA graphics driver has been installed (usually via `apt`) but the system has not yet been restarted. A similar message may appear if the graphics driver is not available, for example because of resuming after suspend.

To fix this, restart your system after installing the new NVIDIA driver.

## Tips

### Non-native arm64 System

This section describes a process to run `arm64` systems on `amd64` systems using [`qemu-user-static`](https://github.com/multiarch/qemu-user-static).

Initially, your system is usually incompatible with `arm64` systems.
To check that:

```sh-session
$ docker run --rm -t arm64v8/ubuntu uname -m
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error
```

Installing `qemu-user-static` enables us to run `arm64` images on `amd64` systems.

```sh-session
$ sudo apt-get install qemu-user-static
$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run --rm -t arm64v8/ubuntu uname -m
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
aarch64
```

To run specify `arm64` architecture for Autoware's Docker images, add the suffix `-arm64`.

```sh-session
$ docker run --rm -it ghcr.io/autowarefoundation/autoware-universe:latest-arm64
WARNING: The requested image's platform (linux/arm64) does not match the detected host platform (linux/amd64) and no specific platform was requested
root@5b71391ad50f:/autoware#
```
5 changes: 0 additions & 5 deletions docs/installation/autoware/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/installation/autoware/local-installation.md

This file was deleted.

68 changes: 68 additions & 0 deletions docs/installation/autoware/source-installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Source installation

## Prerequisites

- [Ubuntu 20.04](https://releases.ubuntu.com/20.04/)
- [Git](https://git-scm.com/)
- [Registering SSH keys to GitHub](https://github.com/settings/keys) is preferable.

```bash
sudo apt-get -y update
sudo apt-get -y install git
```

## How to set up a development environment

1. Clone `autowarefoundation/autoware` and move to the directory.

```bash
git clone https://github.com/autowarefoundation/autoware.git
cd autoware
```

2. Install the dependencies.

We use [Ansible](https://www.ansible.com/) to simplify the steps.
Please see the Ansible playbooks and roles if you want to know exactly what packages are installed.

> Note: Before installing NVIDIA libraries, confirm and agree with the licenses.
- [CUDA](https://docs.nvidia.com/cuda/eula/index.html)
- [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/sla/index.html)
- [TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/sla/index.html)

```bash
./setup-dev-env.sh
```

## How to set up a workspace

Suppose that you've installed a development environment.

1. Create the `src` directory and clone repositories into it.

Autoware uses [vcstool](https://github.com/dirk-thomas/vcstool) to construct workspaces.

```bash
mkdir src
vcs import src < autoware.repos
```

2. Install dependent ROS packages.

Autoware requires some ROS 2 packages in addition to the core components.
The tool `rosdep` allows an automatic search and installation of such dependencies.

```bash
source /opt/ros/galactic/setup.bash
rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO
```

3. Build the workspace.

Autoware uses [colcon](https://colcon.readthedocs.io/en/released/index.html) to build workspaces.
Refer to the documentation for more advanced options.

```bash
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release
```
53 changes: 41 additions & 12 deletions docs/installation/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,49 @@
# Installation

The supported environments are specified in [target-environments](target-environments.md).
## Target platforms

The recommended method for installation is through the use of [ADE](https://ade-cli.readthedocs.io/en/latest/),
a Docker-based tool to ensure that all developers in a project have a common, consistent development
environment. It comes with a pre-built version of Autoware.Auto, so that you will not need to compile it yourself
if you do not want to.
Autoware targets the platforms listed below. It may change in future versions of Autoware.

- [installation-ade](installation-ade.md)
- [installation-ade-arm64](installation-ade-arm64.md)
The Autoware Foundation provides no support on other platforms than those listed below.

Autoware.Core can also be built without the use of [ADE](https://ade-cli.readthedocs.io/en/latest/)
for cases where a more granular control of the installation environment is needed.
### Architecture

- [installation-no-ade](installation-no-ade.md)
- amd64
- arm64

A prerequisite for running the full software stack with simulation is the LGSVL simulator:
### ROS version

- [lgsvl](lgsvl.md)
- ROS 2 Galactic (**active development**)
- ROS 2 Humble (**will be supported in 2022**)

Refer to [REP-2000](https://www.ros.org/reps/rep-2000.html) for the system dependencies.

## Installation steps of Autoware

There are two ways to set up Autoware. Choose one according to your preference.

### 1. Docker installation

Docker can ensure that all developers in a project have a common, consistent development environment.
It is recommended for beginners, light users, people who do not use Ubuntu.

See [here](autoware/docker-installation.md) for the detailed steps.

### 2. Source installation

Source installation is for the cases where more granular control of the installation environment is needed.
It is recommended for skilled users or people who want to customize the environment.
Note that some problems may occur depending on your local environment.

See [here](autoware/source-installation.md) for the detailed steps.

## Installation steps of tools for users

Some other tools are required depending on the evaluation you want to do.
For example, if you run E2E simulation, you need to install a simulator for that.

They are explained [here](tools-for-users).

## Installation steps of tools for developers

Settings for developers, such as Shells or IDEs, are explained [here](tools-for-developers).
123 changes: 0 additions & 123 deletions docs/installation/installation-ade-arm64.md

This file was deleted.

Loading

0 comments on commit cfa4963

Please sign in to comment.