Skip to content

Commit

Permalink
Update document
Browse files Browse the repository at this point in the history
  • Loading branch information
TakanoTaiga committed Nov 10, 2023
1 parent fb45bee commit f981701
Show file tree
Hide file tree
Showing 29 changed files with 61 additions and 143 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ crashlytics-build.properties
# JetBrains
/.idea/

# macOS
.DS_Store
7 changes: 0 additions & 7 deletions docs/DeveloperGuide/Contact/index.md

This file was deleted.

15 changes: 6 additions & 9 deletions docs/DeveloperGuide/Documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ This document uses [Material for MkDocs](https://squidfunk.github.io/mkdocs-mate

1 Install Material for `MkDocs`.
```
$ pip install mkdocs-material
python3 -m pip install mkdocs-material
```
2 Hosting on localhost.
```
$ cd AWSIM
$ mkdocs serve
$ cd CoRE.SIM
$ python3 -m mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
INFO - Documentation built in 0.16 seconds
Expand All @@ -28,19 +28,16 @@ For further reference see [Material for MkDocs - Getting started](https://squidf
## MkDocs files
Use the following `/docs` directory and `mkdocs.yml` for new documentation files.
```
AWSIM
CoRE.SIM
├─ docs/ // markdown and image file for each document.
└─ mkdocs.yml // mkdocs config.
```
Create one directory per document. For example, the directory structure of this "Documentation" page might look like this.
```
AWSIM
CoRE.SIM
└─ docs/ // Root of all documents
└─ DeveloperGuide // Category
└─ Documentation // Root of each document
├─ index.md // Markdown file
└─ image_0.png // Images used in markdown file
```

## Deploy & Hosting
When docs are pushed to the main branch, they are deployed to GitHub Pages using GitHub Actions. See also [Material for MkDocs - Publishing your site](https://squidfunk.github.io/mkdocs-material/publishing-your-site/)
```
39 changes: 0 additions & 39 deletions docs/DeveloperGuide/HowToContribute/index.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/GettingStarted/QuickStartDemo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Please make sure that your machine meets the following requirements in order to
|Required PC Specs||
|:--|:--|
|OS|Ubuntu 22.04|
|CPU|6cores and 12thread or higher|
|GPU|RTX2070 or higher|
|CPU|4cores and 8thread or higher|
|GPU|GTX 1070 or higher|
|NVIDIA Driver (Ubuntu 22)|>=515.43.04|


Expand Down Expand Up @@ -79,27 +79,27 @@ To run the simulator, please follow the steps below.
3. Download and Run CoRE.SIM Demo binary.
1. Download `CoRE.Auto-rc1.zip`.
1. Download `CoRE.SIM.zip`.
[Download CoRE.SIM Demo for ubuntu](https://github.com/StrayedCats/CoRE.SIM/releases/download/v0.1.0/CoRE.Auto-rc1.zip){.md-button .md-button--primary}
[Download CoRE.SIM Demo for ubuntu](https://github.com/StrayedCats/CoRE.SIM/releases){.md-button .md-button--primary}
2. Unzip the downloaded file.
3. Make the `CoRE.Auto-rc1.x86_64` file executable.
3. Make the `CoRE.Sim.x86_64` file executable.
Rightclick the `CoRE.Auto-rc1.x86_64` file and check the `Execute` checkbox
Rightclick the `CoRE.SIM.x86_64` file and check the `Execute` checkbox
![](Image_1.png)
or execute the command below.
```
chmod +x <path to CoRE.SIM folder>/CoRE.Auto-rc1.x86_64
chmod +x <path to CoRE.SIM folder>/CoRE.SIM.x86_64
```
4. Launch `CoRE.SIM_demo.x86_64`.
4. Launch `CoRE.SIM.x86_64`.
```
./<path to CoRE.SIM folder>/CoRE.Auto-rc1.x86_64
./<path to CoRE.SIM folder>/CoRE.SIM.x86_64
```
!!! warning
Expand Down
Binary file removed docs/GettingStarted/SetupUnityProject/image_0.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_1.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_10.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_11.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_12.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_13.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_2.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_3.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_4.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_5.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_6.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_7.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_7_.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_8.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_9.png
Binary file not shown.
Binary file removed docs/GettingStarted/SetupUnityProject/image_9_.png
Binary file not shown.
120 changes: 44 additions & 76 deletions docs/GettingStarted/SetupUnityProject/index.md
Original file line number Diff line number Diff line change
@@ -1,116 +1,84 @@
# Setup Unity Project [WIP]
# Setup Unity Project

!!! info

It is advised to checkout the [Quick Start Demo](../QuickStartDemo) tutorial before reading this section.

This page is a tutorial for setting up a AWSIM Unity project.
This page is a tutorial for setting up a CoRE.SIM Unity project.

## Environment preparation

### System setup

=== "Ubuntu 22"
1. Make sure your machine meets the [required hardware specifications](../QuickStartDemo/#pc-specs).
- *NOTE: PC requirements may vary depending on simulation contents which may change as the simulator develops*
2. Prepare a desktop PC with Ubuntu 22.04 installed.
2. Install [Nvidia drivers and Vulkan Graphics API](../QuickStartDemo/#running-the-awsim-simulation-demo).
3. Install [git](https://git-scm.com/).
**Ubuntu 22**

=== "Windows"
1. Make sure your machine meets the [required hardware specifications](../QuickStartDemo/#pc-specs).
- *NOTE: PC requirements may vary depending on simulation contents which may change as the simulator develops*
2. Prepare a desktop PC with Windows 10 or 11 (64 bit) installed.
3. Install [git](https://git-scm.com/).
1. Make sure your machine meets the [required hardware specifications](../QuickStartDemo/#pc-specs).
- *NOTE: PC requirements may vary depending on simulation contents which may change as the simulator develops*
2. Prepare a desktop PC with Ubuntu 22.04 installed.
2. Install [NVIDIA drivers and Vulkan Graphics API](../QuickStartDemo/#running-the-awsim-simulation-demo).
3. Install [git](https://git-scm.com/).

### Unity installation

!!! info

AWSIM's Unity version is currently **2021.1.7f1**
### Unity Hub Installation
Follow the instructions on [this page](https://docs.unity3d.com/hub/manual/InstallHub.html#install-hub-linux).

Follow the steps below to install Unity on your machine:
1. To add the public signing key, execute the following command in the terminal:
```bash
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
```

1. Install UnityHub to manage Unity projects. Please go to [Unity download page](https://unity3d.com/get-unity/download) and download latest `UnityHub.AppImage`.
![](image_1.png)
2. Install Unity 2021.1.7f1 via UnityHub.
- Open new terminal, navigate to directory where `UnityHub.AppImage` is download and execute the following command:
```
./UnityHub.AppImage
```
- To install Unity Editor please proceed as shown on the images below
![](image_2.png)
![](image_3.png)
![](image_4.png)
- At this point, your Unity installation process should have started.
2. To include the Unity Hub repository, you must create an entry in `/etc/apt/sources.list.d`. Use this command to add the Unity Hub repository:
```bash
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
```

=== "Ubuntu 22"
- *NOTE: If the installation process has not started after clicking the green button (image above), please copy the hyperlink (by rightclicking the button and selecting `Copy link address`) and add it as a argument for Unity Hub app. An example command:
```
./UnityHub.AppImage unityhub://2021.1.7f1/d91830b65d9b
```
3. Refresh the package cache and install Unity Hub with these commands:
```bash
sudo apt update
sudo apt install unityhub
```

- After successful installation the version will be available under the `Installs` tab in Unity Hub.
![](image_5.png)
4. Launch Unity Hub and acquire a license. For most users, the Personal license will be sufficient.

### Open AWSIM project
### Open CoRE.SIM project

To open the Unity AWSIM project in Unity Editor:
1. Make sure you have the AWSIM repository cloned
To open the Unity CoRE.SIM project in Unity Editor:
1. Make sure you have the CoRE.SIM repository cloned
```
git clone git@github.com:tier4/AWSIM.git
git clone https://github.com/StrayedCats/CoRE.SIM.git
```

2. Launch UnityHub.
```
./UnityHub.AppImage
```

3. Open the project in UnityHub
- Click the `Open` button
![](image_6.png)
- Click the `Add` button

![](pic-0.png)

- Navigate the directory where the CoRE.SIM repository was cloned to

- install Unity edtitor

- Navigate the directory where the AWSIM repository was cloned to
![](image_7.png)
![](pic-1.png)

- The project should be added to `Projects` tab in Unity Hub. To launch the project in Unity Editor simply click the `AWSIM` item
![](image_8.png)
![](pic-2.png)

- The project is now ready to use
![](image_9.png)

![](pic-3.png)

!!! warning

If you get the safe mode dialog when starting UnityEditor, you may need to install openssl.

1. download libssl
`$ wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb`
`wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb`
2. install
`sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb`
### Import external packages
To properly run and use AWSIM project in Unity it is required to download map package which is not included in the repository.
1. Download and import `Japan_Tokyo_Nishishinjuku.unitypackage`
[Download Map files (unitypackage)](https://github.com/tier4/AWSIM/releases/download/v1.1.0/Japan_Tokyo_Nishishinjuku.unitypackage){.md-button .md-button--primary}
2. In Unity Editor, from the menu bar at the top, select `Assets -> Import Package -> Custom Package...` and navigate the `Japan_Tokyo_Nishishinjuku.unitypackage` file.
![](image_10.png)
![](image_11.png)
3. `Nishishinjuku` package has been successfully imported under `Assets/AWSIM/Externals/`directory.
![](image_12.png)
!!! info
The Externals directory is added to the `.gitignore` because the map has a large file size and should not be directly uploaded to the repository.
## Run the demo in Editor
`sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb`

The following steps describe how to run the demo in Unity Editor:
### Run CoRE.SIM

1. Open the `AutowareSimulation.unity` scene placed under `Assets/AWSIM/Scenes/Main` directory
1. Open the `OutdoorScene.unity` scene placed under `Assets/CoRE/` directory
2. Run the simulation by clicking `Play` button placed at the top section of Editor.
![](image_13.png)
![](pic-5.png)
<br><br><br><br>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/GettingStarted/SetupUnityProject/pic-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/GettingStarted/SetupUnityProject/pic-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/GettingStarted/SetupUnityProject/pic-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/GettingStarted/SetupUnityProject/pic-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/GettingStarted/SetupUnityProject/pic-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,5 @@ nav:
- ROS2 For Unity: Components/ROS2/ROS2ForUnity/index.md

- Developer guide:
- How to Contribute: DeveloperGuide/HowToContribute/index.md
- Trouble shooting: DeveloperGuide/TroubleShooting/index.md
- Documentation: DeveloperGuide/Documentation/index.md
- License : DeveloperGuide/License/index.md
- Contact : DeveloperGuide/Contact/index.md

0 comments on commit f981701

Please sign in to comment.