autowarefoundation / autoware-documentation

https://autowarefoundation.github.io/autoware-documentation/
Apache License 2.0
75 stars 140 forks source link

Add video tutorial of autoware installation #270

Closed cyn-liu closed 1 year ago

cyn-liu commented 1 year ago

Checklist

Description

I plan to add the Autoware installation video tutorial in here, but the Autoware installation tutorial document is relatively complex. Even the Docker based installation tutorial requires a lot of additional dependencies, which is very unfriendly to beginners.

Autoware Universe now mostly provides images of the prebuilt version (image link). Based on this image, you do not need to download the source code of Autoware, and you can run Autoware without compiling. So can I record Autoware installation videos based on the prebuilt version images?

Autoware installation documentation (here) needs to be updated?

@kenji-miyake Do you have any suggestion?

Purpose

Add video of Autoware installation tutorial.

Possible approaches

Add video of Autoware installation tutorial.

Definition of done

TO DO.

kenji-miyake commented 1 year ago

@cyn-liu cc @mitsudome-r @xmfcx

So can I record Autoware installation videos based on the prebuilt version images?

Sure. FYI, there is a Japanese tutorial video by @yukkysaito. (recorded about a half year ago) https://www.youtube.com/watch?v=iW-a7cKUxuY

I think a similar composition is good.

Autoware installation documentation (here) needs to be updated?

Do you mean you want to put the tutorial video on the documentation page? In that case, yes, I think it's a good idea.

xmfcx commented 1 year ago

image

I am actually preparing such video series.

Here is some docs as I'm working on it: https://gist.github.com/xmfcx/aeee631ea819ddfc734da26f98c6ee0e

So far I've recorded till planning simulator demo and will publish tomorrow. And start working on the rest.

I've only covered the source installation for this series but maybe if you want to cover the docker installation, we can add it too, what do you think @cyn-liu ?

cyn-liu commented 1 year ago

Do you mean you want to put the tutorial video on the documentation page?

Yes, but I only want record video of docker installation of autoware.

cyn-liu commented 1 year ago

@xmfcx Good job! I only want record video about docker installation, but I find the document of docker installation is complex. If use prebuilt image, we don't need to install so many dependencies.

xmfcx commented 1 year ago

@xmfcx Good job! I only want record video about docker installation, but I find the document of docker installation is complex. If use prebuilt image, we don't need to install so many dependencies.

Thanks, sure, go ahead and create a tutorial video, we can put it to the place you've proposed.

cyn-liu commented 1 year ago

I think the document of Docker installation should be divided into two branches. One is to use the non-prebuilt version image installation method and the other is to use the prebuilt version image installation method.

The second method is very friendly for beginner to run Autoware. @kenji-miyake what's your opinion?

I wrote a draft about Autoware docker installation use prebuilt version image . my draft:

Autoware installation

Docker installation (prebuit version)

Install docker

curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo groupadd docker sudo usermod -aG docker $USER newgrp docker

Install nvidia container toolkit

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && curl -s -L https://nvidia.github.io/libnvidia-container/gpgkey | sudo apt-key add - \ && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

sudo apt-get update sudo apt-get install -y nvidia-docker2

sudo systemctl restart docker test install: sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi

Install rocker

sudo apt update && sudo apt install curl gnupg lsb-release sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

sudo apt update sudo apt install python3-rocker

Pull image

docker pull ghcr.io/autowarefoundation/autoware-universe:humble-latest-prebuilt (Autoware Foundation registry)

Create the autoware_map directory for map data later.

mkdir ~/autoware_map

NOTE: Please put your map files in this directory.

run containner

rocker --nvidia --x11 --privileged --user --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:humble-latest-prebuilt

run autoware

e.g., running planning simulator: ros2 launch autoware_launch planning_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-planning vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

NOTE: The Autoware code located in the /autoware directory in the container , if you want to modify the code, please enter this directory.

Build the workspace

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

kenji-miyake commented 1 year ago

The second method is very friendly for beginner to run Autoware. @kenji-miyake what's your opinion?

@cyn-liu I agree. I think that should be like a quick start and can be on the introduction or README.

cyn-liu commented 1 year ago

@kenji-miyake Do you mean to put this installation tutorial on the introduction page as a quick start?

kenji-miyake commented 1 year ago

@cyn-liu Sorry for my unclear sentence. I meant just putting the link to a quick start there. I think it's good to put the content on https://autowarefoundation.github.io/autoware-documentation/main/tutorials/quickstart (a new page). What do you think? cc @xmfcx

cyn-liu commented 1 year ago

@xmfcx

xmfcx commented 1 year ago

I think the document of Docker installation should be divided into two branches. One is to use the non-prebuilt version image installation method and the other is to use the prebuilt version image installation method.

https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/docker-installation/

Here I think installing the dependencies is common for both methods. I think you should improve existing dependency installation methods instead of rewriting them.

And I agree that you can split the prebuilt and non-prebuilt. Please make 2 pages under Docker installation for them.

So user goes: Docker installation -> sets up environment, installs dependencies -> There are 2 options to continue: prebuilt and non-prebuilt.

Is this ok with you @cyn-liu ?

I think it's good to put the content on https://autowarefoundation.github.io/autoware-documentation/main/tutorials/quickstart (a new page).

@kenji-miyake I think it's better to keep them together as they are 2 branches of a common source.

kenji-miyake commented 1 year ago

@xmfcx Thank you for your comments. The reason why I said we should split pages is that the target readers of the pages are different. quickstart is for beginners or runtime-only users and the existing docker-installation is for developers. It's okay for me to write both information on the docker-installation page, but I believe it's better to have another quickstart page for beginners. Is that not good?

xmfcx commented 1 year ago

@kenji-miyake I think developers can use prebuilt version to edit & compile autoware too, as @cyn-liu shared in the post:

Build the workspace

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

And our docker documentation also have:

  1. Build the workspace. colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

It would be confusing to have these 2 pages in different sections since they both achieve the same result.

kenji-miyake commented 1 year ago

@xmfcx The prebuilt version will be simplified in the future by https://github.com/autowarefoundation/autoware/pull/2922. After that, developers cannot use it for development because the image has only runtime dependencies. I imagined that.

xmfcx commented 1 year ago

@kenji-miyake I will comment there to separate prebuilt and release containers.

doganulus commented 1 year ago

I think Autoware documentation should deliberately avoid any suggestion or recommendation to install Autoware on the local system. Let's put our effort to prepare an Autoware devel image (aka devcontainer).

Let the user pull the development image and mount Autoware source folder. The current image comes with source as far as remember. Encourage the developer as much as possible to work inside the container.

xmfcx commented 1 year ago

I think Autoware documentation should deliberately avoid any suggestion or recommendation to install Autoware on the local system. Let's put our effort to prepare an Autoware devel image (aka devcontainer).

Let the user pull the development image and mount Autoware source folder. The current image comes with source as far as remember. Encourage the developer as much as possible to work inside the container.

@doganulus There are many core developers of the project who uses native installation method exclusively due to performance and simplicity reasons. Not everyone wants the overhead and added complexity of dealing with containers.

We have a docker image and instructions to use it, if you have an issue with how it works, how it is constructed or how it can be improved, please create a separate issue for it.

doganulus commented 1 year ago

An experienced user can always install Autoware on their local system. I do not think we can prevent that. But this issue is about everyone else, especially the newcomer. Therefore let's focus on the people who want to start developing Autoware.

Still developing inside the container is very valuable for experienced core developers, I believe.

cyn-liu commented 1 year ago

And I agree that you can split the prebuilt and non-prebuilt. Please make 2 pages under Docker installation for them.

So user goes: Docker installation -> sets up environment, installs dependencies -> There are 2 options to continue: prebuilt and non-prebuilt.

I agree that. I think it's better to keep them together as they are 2 branches of a common source.

cyn-liu commented 1 year ago

The prebuilt version will be simplified in the future by autowarefoundation/autoware#2922. After that, developers cannot use it for development because the image has only runtime dependencies. I imagined that.

@xmfcx @kenji-miyake I have confirmed this problem. The image of the future prebuild version can only run Autoware, and cannot use it for development.

I plan to divide the docker installation into two files. One is the docker installation with prebuild image, and the other is the docker installation with devel image, and explain the usage scenarios of the two methods.

xmfcx commented 1 year ago

@cyn-liu I've created this training video series: https://github.com/orgs/autowarefoundation/discussions/3141

I didn't cover docker parts, I hope you will cover them here (`・ω・´)

stale[bot] commented 1 year ago

This pull request has been automatically marked as stale because it has not had recent activity.