Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
Signed-off-by: Takagi, Isamu <[email protected]>
  • Loading branch information
isamu-takagi committed Jun 12, 2024
1 parent c0f7821 commit 31c61ac
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 151 deletions.
2 changes: 1 addition & 1 deletion docs/development/images/docker/eval.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 19 additions & 13 deletions docs/development/installation.ja.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 環境構築

### aptパッケージ等のインストール
## aptパッケージ等のインストール

まずは諸々最初に必要なパッケージをインストールします。

```bash
Expand All @@ -10,7 +11,8 @@ sudo apt install -y git python3-pip ca-certificates curl gnupg libvulkan1
sudo ubuntu-drivers autoinstall
```

### Dockerのインストール
## Dockerのインストール

[公式ドキュメント](https://docs.docker.com/engine/install/ubuntu/)通りに以下のコマンドでインストールします。

```bash
Expand All @@ -28,15 +30,17 @@ sudo usermod -aG docker $USER
```

以下のコマンドで正常にインストールされているか確認してください。
```

```bash
sudo docker run hello-world
```

`Hello from Docker!`と表示されれば正常にインストール出来ています。

ここまで出来たら一度再起動します。

### rockerのインストール
## rockerのインストール

rockerはDockerコンテナのGUIアプリを簡単に起動できるようにするツールです。

[公式README](https://github.com/osrf/rocker?tab=readme-ov-file#debians-recommended)ではaptからのインストールが推奨されていますが、手順と環境をシンプルにするためにここではpipからインストールします。
Expand All @@ -46,12 +50,14 @@ pip install rocker
```

デフォルト設定ではrockerの実行ファイルへのパスが通っていないので、以下のコマンドで`.bashrc`に追加しておきます。
```

```bash
echo export PATH='$HOME/.local/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```

## autoware環境のDockerイメージのpull

AIチャレンジで使用するautoware環境のDockerイメージを取得します。

Dockerイメージは10GB程度のサイズがあり、ダウンロードには時間が掛かるため有線LANでのダウンロードを推奨します。
Expand All @@ -61,29 +67,29 @@ docker pull ghcr.io/automotiveaichallenge/autoware-universe:humble-latest
```

以下のコマンドでダウンロードできているか確認します。

```bash
docker images
```

Dockerイメージがダウンロードできていれば以下のような出力が得られます。
```
# REPOSITORY TAG IMAGE ID CREATED SIZE
# ghcr.io/automotiveaichallenge/autoware-universe humble-latest 30c59f3fb415 13 days ago 8.84GB
```

```txt
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/automotiveaichallenge/autoware-universe humble-latest 30c59f3fb415 13 days ago 8.84GB
```

## AIチャレンジの大会用リポジトリの準備と実行
## 大会用リポジトリのダウンロード

### 大会用リポジトリのダウンロード
リポジトリをクローンします。ここではホームディレクトリにクローンしますが、お好きなディレクトリに入れていただいても構いません。

```bash
cd ~
git clone https://github.com/AutomotiveAIChallenge/aichallenge-2024.git
```

### AWSIMのダウンロード
## AWSIMのダウンロード・起動確認
## AWSIMのダウンロード

1. [Google Drive(あとでリンク変える)](https://drive.google.com/drive/) から最新の `AWSIM_GPU.zip` をダウンロードし、`aichallenge-2024/aichallenge/simulator` に展開します。

2. パーミッションを図のように変更します。
Expand Down
13 changes: 7 additions & 6 deletions docs/development/visible-simulation.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html)(GPU非搭載の方はスキップ)

### NVIDIAドライバのインストール
## NVIDIAドライバのインストール

```bash
# リポジトリの追加
Expand All @@ -37,7 +37,7 @@ nvidia-smi

![nvidia-smi](./images/installation/nvidia-smi.png)

#### NVIDIA Container Toolkit
## NVIDIA Container Toolkit

```bash
# インストールの下準備
Expand Down Expand Up @@ -91,19 +91,19 @@ sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu2

![パーミッション変更の様子](./images/installation/permmision.png)


実行ファイルが`aichallenge-2024/aichallenge/simulator/AWSIM_GPU/AWSIM.x86_64`に存在していることを確認してください。

# Dockerコンテナの起動
## Dockerコンテナの起動

描画有りのシミュレーション推奨環境を満たしており、
NVIDIA関連のinstallが済んでいる方は上記のコマンドではなく、以下のコマンドでコンテナを起動してください。

```bash
cd aichallenge-2024
./docker_run.sh dev gpu
```

### AutowareのビルドとSimulatorの起動
## AutowareのビルドとSimulatorの起動

コンテナを起動したターミナル(コンテナ内)で以下を実行します。

Expand All @@ -113,6 +113,7 @@ cd /aichallenge
```

Autowareのビルド後、run_simulator.bashを変更します

```bash
#!/bin/bash

Expand All @@ -132,4 +133,4 @@ sudo ip link set multicast on lo

以下のような画面が現れたら成功です。

![](./images/AWSIM%26Autoware.png)
![AWSIM-Autoware](./images/AWSIM%26Autoware.png)
24 changes: 15 additions & 9 deletions docs/development/workspace.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,40 @@
- 16GB以上(推奨)
- SSD: 60GB以上


## 大会用リポジトリのビルド・実行

大会用リポジトリでは、実際の動作環境はすべてDocker内で完結して提供されています。リポジトリの利用は以下の流れで行います。

1. 大会環境のDockerイメージのビルド
2. Dockerコンテナ上でのAutowareのビルド
3. Dockerコンテナ上でのAutowareとシミュレータの同時起動

## 大会環境のDockerイメージのビルド

大会用リポジトリに入ります。
```

```bash
cd ~/aichallenge-2024
```

Dockerイメージのビルドを行います。
```

```bash
./docker_build.sh dev
```

```
```bash
docker images
```

で以下のイメージが生成されていることを確認しましょう。
```

```txt
aichallenge-2024-dev latest df2e83a20349 33 minutes ago 8.9GB
```

## Dockerコンテナ上でのAutowareのビルド

以下を実行してDockerコンテナを立ち上げます。

```bash
Expand Down Expand Up @@ -69,15 +76,14 @@ Autowareのビルド後、以下のコマンドを実行します。
下記の様な画面が表示されたら起動完了です。終了するにはターミナル上でCTRL + Cを入力します。
![autoware](./images/installation/autoware.png)


A. Dockerイメージのビルドをお願いします。

#### ワークスペースの構成
### ワークスペースの構成

**docker-dev**
docker-dev

![dev](./images/docker/dev.drawio.svg)

**docker-eval**
docker-eval

![eval](./images/docker/eval.drawio.svg)
43 changes: 34 additions & 9 deletions docs/faq.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Environment Setup

#### <u>The communication between AWSIM and Autoware is unstable.</u>
### <u>The communication between AWSIM and Autoware is unstable.</u>

When testing locally, setting `ROS_LOCALHOST_ONLY=1` on all terminals improves communication speed. Add the following lines to your .bashrc:

```bash
Expand All @@ -20,38 +21,44 @@ For this competition, we are considering configurations with two PCs: Windows+Li
In that case, set `ROS_LOCALHOST_ONLY=0`.

Note:

- After the OS starts, you will be prompted for a password when opening a terminal, and the initial `sudo ip link set lo multicast on` is required.
- If you forget to change the .bashrc as described above, it will always be applied, so be sure to check for changes with `echo $ROS_LOCALHOST_ONLY`.
- Communication between containers cannot occur if `ROS_LOCALHOST_ONLY=1` and `ROS_LOCALHOST_ONLY=0` are mixed.
- Note that `ROS_LOCALHOST_ONLY` is specified in the executable file.

---

#### <u>ros2 topic list is not displayed.</u>
### <u>ros2 topic list is not displayed.</u>

Make sure that the `ROS_DOMAIN_ID` of your machine matches. (There is no problem if you have not set the `ROS_DOMAIN_ID`.)
Also, please ensure that ROS2 is sourced.

---

#### <u>Using AWSIM on Windows and Autoware on Ubuntu, the $ ros2 topic list is not displayed.</u>
### <u>Using AWSIM on Windows and Autoware on Ubuntu, the $ ros2 topic list is not displayed.</u>

Allow communication through the Windows Firewall.
Also, execute `ros2 daemon stop` and `ros2 daemon start` to check if any unnecessary processes remain, and restart.

---

#### <u>Rocker does not start.</u>
### <u>Rocker does not start.</u>

First, check if rocker is installed.
If it is installed but does not start, check your permissions. There have been reports that it cannot be executed if the account type/permissions differ between the account that built the image and the account that runs it.

---

#### <u>AWSIM terminates with a core dump.</u>
### <u>AWSIM terminates with a core dump.</u>

If AWSIM terminates with a core dump immediately after startup, the GPU memory may be insufficient. Therefore, check if the GPU memory usage has reached its limit with `nvidia-smi`.
It is recommended to have more than 11GB of GPU memory.

---

#### <u>Only a Windows PC with a GPU is available.</u>
### <u>Only a Windows PC with a GPU is available.</u>

Since the support for this competition is based on the configuration described on the HP, detailed guidance cannot be provided, but the following methods are generally possible.

The problem is setting up the Autoware environment to participate.
Expand All @@ -65,39 +72,48 @@ Therefore, the key is to prepare an environment to run Autoware, and there may b

---

#### <u>AWSIM is displayed after setting up the environment on AWS, but Rviz shows a black screen.</u>
### <u>AWSIM is displayed after setting up the environment on AWS, but Rviz shows a black screen.</u>

There have been reports that `sudo apt upgrade` resolved the issue, so please check and try it.
Also, there was a similar question in a [past Issue](https://github.com/ros2/rviz/issues/948), so please check it as well.

---

## Operations

### ROS
#### <u>When creating a package in python, a "no module named *" error occurs at runtime.</u>

#### <u>When creating a package in python, a "no module named \*" error occurs at runtime.</u>

Please refer to [this](https://zenn.dev/tasada038/articles/5d8ba66aa34b85#setup.py%E3%81%ABsubmodules%E3%81%A8%E3%81%97%E3%81%A6%E3%83%91%E3%83%83%E3%82%B1%E3%83%BC%E3%82%B8%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B).

---

#### <u>How can I check the type of a topic?</u>

To check the type of a topic, use `ros2 topic info -v fuga_topic` or if you can identify the node, use `ros2 node info hoge-node`.
If you want to find more information about ROS, searching "ROS2 commands" on the internet might be helpful.

---

### Autoware

#### <u>Maps and routes are not displayed on Rviz.</u>

Make sure that the map data you are using is placed in the appropriate location and is correct.

---

#### <u>I don't know how to modify Autoware to participate.</u>

There are ways such as adjusting node parameters, modifying, or replacing nodes in Autoware.
The basic configuration of Autoware is summarized in another tab on this site and [here](https://automotiveaichallenge.github.io/aichallenge2023-integ/customize/index.html), so please make use of it.
Also, although it is an external article, [this](https://qiita.com/h_bog/items/86fba5b94b2148c4d9da) might be helpful.

---

#### <u>Tell me about behavior path/motion planner route generation.</u>

The behavior planner is primarily designed for driving on general roads (ODD3 and above), considering traffic rules that should not be broken (e.g., stop lines, crosswalks, signal stops).
Therefore, avoidance is also rule-based and not optimized.
On the other hand, motion is designed for driving in limited areas or limited spaces (ODD2 and below) and does not handle information such as signals or map information.
Expand All @@ -106,15 +122,18 @@ It is responsible for necessary functions such as obstacle avoidance, stopping,
---

#### <u>Tell me about Autoware's avoidance behavior.</u>

There are two types of avoidance: behavior path and obstacle avoidance.
By default, obstacle avoidance is off, and only path smoothing is performed.
Additionally, by default, behavior path is set to avoid, but only cars and trucks are the target objects.

---

#### <u>Tell me about the center point.</u>

The center point detects vehicles, trucks, and pedestrians, but it cannot detect items like cardboard boxes that are not tagged.
However, currently, Autoware does not function unless it receives objects in the planning stage, and using the default configuration with the center point can cause the following issues:

1. Planning cannot generate a path if the center point fails.
2. Clustering-based obstacle detection results are erased by data association.

Expand All @@ -124,24 +143,30 @@ Therefore, the perception configuration of autoware mini is ideal, but understan
---

### AWSIM

#### <u>How can I reset the car to its initial position?</u>

Currently, the only way is to restart AWSIM.

---

#### <u>AWSIM's operation is unstable.</u>

One of the causes can be insufficient GPU performance.
If using a high-performance GPU is difficult, setting the time scale to around 0.5 with the slider at the bottom of the AWSIM screen may stabilize the operation.

---

#### <u>I want to tune the mpc, but are the model parameters (lag and time constants) used in AWSIM disclosed?</u>

The lag and time constants are not measured or disclosed, but the basic specifications are available [here](https://automotiveaichallenge.github.io/aichallenge-documentation-2024/specifications/simulator/).

---

## General Competition
#### <u>Is it possible to add additional sensors?</u>

### <u>Is it possible to add additional sensors?</u>

To tackle the tasks under the same conditions and difficulty, adding new sensors is not allowed.

---
Loading

0 comments on commit 31c61ac

Please sign in to comment.