diff --git a/docs/architecture.png b/docs/architecture.png new file mode 100644 index 0000000..31671d9 Binary files /dev/null and b/docs/architecture.png differ diff --git a/docs/design/index.md b/docs/design/index.md index f936956..a4a6f6d 100644 --- a/docs/design/index.md +++ b/docs/design/index.md @@ -1 +1,12 @@ -# Design \ No newline at end of file +# Design + +!!! Warning + More to come + +A V2X communication software stack called [Vanetza](https://github.com/riebl/vanetza) is integrated into the standalone autonomous driving software stack, [Autoware](https://github.com/autowarefoundation/autoware). The V2X stack and the autonomous driving stack can be decoupled, allowing other applications to utilize the V2X router as well. A high-level overview of the architecture is shown below. + +![AutowareV2X Architecture](../architecture.png) + +Autoware is responsible for the perception task, while Autoware\_V2X manages the transmission and reception of messages over the V2X channel. Services that are necessary for the integration of Vanetza into Autoware were newly developed. + +The V2XApp is responsible for managing the various facilities such as DENM, CAM, CPM, while the V2XNode handles the conversion of information between the V2X messages and ROS2 messages. \ No newline at end of file diff --git a/docs/how-to-guides/index.md b/docs/how-to-guides/index.md index 77f9949..af6ec8c 100644 --- a/docs/how-to-guides/index.md +++ b/docs/how-to-guides/index.md @@ -1 +1,4 @@ -# How-to-guides \ No newline at end of file +# How-to-guides + +!!! Warning + Under Construction \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 630fd2e..4dd0e35 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,6 +8,8 @@ It utilizes [Vanetza](https://github.com/riebl/vanetza) as the protocol suite fo We have also provided a working example of a CPM application, where Collective Perception Messages can be used to exchange perception information in Autoware. +![AutowareV2X Architecture](./architecture.png) + ## Getting started - [Installation](/installation) pages explain the installation steps of AutowareV2X and its prerequisites. diff --git a/docs/installation/.pages b/docs/installation/.pages index cb74eee..80630ce 100644 --- a/docs/installation/.pages +++ b/docs/installation/.pages @@ -1,3 +1,4 @@ nav: - index.md - - docker-installation.md \ No newline at end of file + - docker-installation.md + - source-installation.md \ No newline at end of file diff --git a/docs/installation/docker-installation.md b/docs/installation/docker-installation.md index a531cac..59fa588 100644 --- a/docs/installation/docker-installation.md +++ b/docs/installation/docker-installation.md @@ -2,6 +2,9 @@ In order to run the simulations explained in the [Tutorials](/tutorials) section, you will need to proceed with the Docker installation. +!!! 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. + ## 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/). @@ -18,8 +21,11 @@ cd autoware_docker # Make directory to store maps mkdir ~/autoware_map -# Launch Autoware container +# Launch Autoware container (with NVIDIA GPU) rocker --nvidia --x11 --user --volume $HOME/autoware_docker --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda + +# Launch Autoware container (without NVIDIA GPU) +rocker -e LIBGL_ALWAYS_SOFTWARE=1 --x11 --user --volume $HOME/autoware_docker --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda ``` ## Adding AutowareV2X @@ -46,6 +52,7 @@ v2x/vanetza: 3. Update the repository ``` +mkdir src vcs import src < autoware.repos vcs pull src ``` diff --git a/docs/installation/index.md b/docs/installation/index.md index c3c1652..e2be456 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -2,67 +2,7 @@ AutowareV2X is used as an add-on module to the open-source autonomous driving stack called [Autoware](https://autowarefoundation.github.io/autoware-documentation/main/). Therefore, in order to properly use AutowareV2X, Autoware must first be installed on the system. -## Prerequisites +You can install AutowareV2X directly onto a PC through the [Source Installation](./source-installation.md) or use it as a Docker container through the [Docker Installation](./docker-installation.md). -- OS - - Ubuntu 20.04 - - Ubuntu 22.04 -- ROS - - ROS2 Galactic - -## Installing Autoware - -Refer to the [Official Autoware Documentation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/) for the newest installation procedures. In a nutshell, you can run the following commands: - -```bash -# Clone repository -git clone https://github.com/autowarefoundation/autoware.git -cd autoware - -# Install dependencies using Ansible -./setup-dev-env.sh - -# Use vcstool to import more repositories -mkdir src -vcs import src < autoware.repos - -# Install dependent ROS packages -source /opt/ros/galactic/setup.bash -rosdep update -rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO - -# Build the workspace -colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -``` - -## Adding AutowareV2X - -1. Edit the `autoware.repos` file and add the following two repositories to the end. -``` -v2x/autoware_v2x: - type: git - url: git@github.com:tlab-wide/autoware_v2x.git - version: main -v2x/vanetza: - type: git - url: git@github.com:tlab-wide/vanetza.git - version: socktap-cpm-tr103562 - -``` - -2. Update the repository -``` -vcs import src < autoware.repos -vcs pull src -``` - -3. Install dependent ROS packages -```bash -source /opt/ros/galactic/setup.bash -rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO -``` - -4. Build the workspace -``` -colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -``` +!!! Note + In order to proceed with the [Tutorials](../tutorials/index.md), you will need to continue with the [Docker Installatioon](./docker-installation.md). \ No newline at end of file diff --git a/docs/installation/source-installation.md b/docs/installation/source-installation.md new file mode 100644 index 0000000..837b5ca --- /dev/null +++ b/docs/installation/source-installation.md @@ -0,0 +1,66 @@ +# Source Installation + +## Prerequisites + +- OS + - Ubuntu 20.04 + - Ubuntu 22.04 +- ROS + - ROS2 Galactic + +## Installing Autoware + +Refer to the [Official Autoware Documentation](https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/) for the newest installation procedures. In a nutshell, you can run the following commands: + +```bash +# Clone repository +git clone https://github.com/autowarefoundation/autoware.git +cd autoware + +# Install dependencies using Ansible +./setup-dev-env.sh + +# Use vcstool to import more repositories +mkdir src +vcs import src < autoware.repos + +# Install dependent ROS packages +source /opt/ros/galactic/setup.bash +rosdep update +rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO + +# Build the workspace +colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release +``` + +## Adding AutowareV2X + +1. Edit the `autoware.repos` file and add the following two repositories to the end. +``` +v2x/autoware_v2x: + type: git + url: git@github.com:tlab-wide/autoware_v2x.git + version: main +v2x/vanetza: + type: git + url: git@github.com:tlab-wide/vanetza.git + version: socktap-cpm-tr103562 + +``` + +2. Update the repository +``` +vcs import src < autoware.repos +vcs pull src +``` + +3. Install dependent ROS packages +```bash +source /opt/ros/galactic/setup.bash +rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO +``` + +4. Build the workspace +``` +colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release +``` diff --git a/docs/support/.pages b/docs/support/.pages index 2132a6d..df18e1a 100644 --- a/docs/support/.pages +++ b/docs/support/.pages @@ -1,2 +1,3 @@ nav: - - index.md \ No newline at end of file + - index.md + - docs-guide.md \ No newline at end of file diff --git a/docs/support/docs-guide.md b/docs/support/docs-guide.md new file mode 100644 index 0000000..88a1016 --- /dev/null +++ b/docs/support/docs-guide.md @@ -0,0 +1,20 @@ +# How to generate Documentation + +## mkdocs + +Run development server. +``` +mkdocs serve +``` + +Deploy to gh-pages. +``` +mkdocs gh-deploy +``` + + +## Doxygen + +``` +doxygen Doxyfile +``` \ No newline at end of file diff --git a/docs/tutorials/.pages b/docs/tutorials/.pages index 2132a6d..890499e 100644 --- a/docs/tutorials/.pages +++ b/docs/tutorials/.pages @@ -1,2 +1,4 @@ nav: - - index.md \ No newline at end of file + - index.md + - planning-simulation + - actual-devices \ No newline at end of file diff --git a/docs/tutorials/actual-devices/index.md b/docs/tutorials/actual-devices/index.md new file mode 100644 index 0000000..3b3b9ab --- /dev/null +++ b/docs/tutorials/actual-devices/index.md @@ -0,0 +1,4 @@ +# Running AutowareV2X on Actual Devices + +!!! Warning + Under Construction \ No newline at end of file diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index d6147fb..eac89c4 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -1,18 +1,9 @@ # Tutorials -Simulations can be an easy way of verifying the functionality of AutowareV2X before an actual field test. -Here, since we want to test both the sending and receiving of information through AutowareV2X, we will need at least two AutowareV2X instances. For this, we will use a Docker-based environment. +AutowareV2X can be first verified using [Autoware's Planning Simulator](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/). -## Using CPM in a simulation-based environment +- [Running Autoware in the Planning Simulator](./planning-simulation/index.md) -1. Create Docker networks -``` -$ docker network create --driver=bridge --subnet=10.0.0.0/16 v2x_net -o com.docker.network.bridge.name="v2x_net" -``` -# Launch Autoware container -rocker --nvidia --x11 --user --volume $HOME/autoware_docker --volume $HOME/autoware_map -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda +Then, after you are familiar with how AutowareV2X works, you can use actual devices to test AutowareV2X. -$ cd autoware_docker -$ . install/setup.bash -$ ros2 launch autoware_v2x v2x.launch.xml network_interface:=eth1 -``` \ No newline at end of file +- [Running AutowareV2X on Actual Devices](./actual-devices/index.md) \ No newline at end of file diff --git a/docs/tutorials/planning-simulation/docker-env.png b/docs/tutorials/planning-simulation/docker-env.png new file mode 100644 index 0000000..4fe856a Binary files /dev/null and b/docs/tutorials/planning-simulation/docker-env.png differ diff --git a/docs/tutorials/planning-simulation/index.md b/docs/tutorials/planning-simulation/index.md new file mode 100644 index 0000000..d41a3f7 --- /dev/null +++ b/docs/tutorials/planning-simulation/index.md @@ -0,0 +1,51 @@ +# Running AutowareV2X in the Planning Simulator + +Simulations can be an easy way of verifying the functionality of AutowareV2X before an actual field test. +We will use [Autoware's Planning Simulator](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/) here and add connectivity to it with AutowareV2X. + +!!! Note + Make sure you have completed [Autoware's Planning Simulator Tutorial](https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/planning-simulation/) before continuing. + +Here, since we want to test both the sending and receiving of information through AutowareV2X, we will need at least two AutowareV2X instances. For this, we will use a Docker-based environment. + +## The Docker environment to create + +We will be creating the Docker environment as depicted in the figure below. There will be two Docker containers, each of which includes Autoware.universe and AutowareV2X. They will both be a part of the Docker network called `v2x_net` with the subnet `10.0.0.0/24`. + +![Docker Environment](./docker-env.png) + +### Create a Docker network for V2X communication + +```bash +docker network create --driver=bridge --subnet=10.0.0.0/24 v2x_net -o com.docker.network.bridge.name="v2x_net" +``` + + +### Launch two Autoware containers + +```bash +# In one terminal, use rocker to launch container "autoware_1" +rocker --nvidia --x11 --user --volume $HOME/autoware_docker --volume $HOME/autoware_map --network=v2x_net --ip 10.0.0.2 --name autoware_1 --hostname autoware_1 -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda + +# In another terminal, use rocker to launch container "autoware_2" +rocker --nvidia --x11 --user --volume $HOME/autoware_docker --volume $HOME/autoware_map --network=v2x_net --ip 10.0.0.3 --name autoware_2 --hostname autoware_2 -- ghcr.io/autowarefoundation/autoware-universe:latest-cuda +``` + +## Run Planning Simulator + +Run the Planning Simulator in both `autoware_1` and `autoware_2`. + +``` +source ~/autoware_docker/install/setup.bash +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 +``` + + +## Run AutowareV2X + +In another terminal, connect to the `autoware_1` and `autoware_2` containers, and start AutowareV2X in both of them. + +``` +source ~/autoware_docker/install/setup.bash +ros2 launch autoware_v2x v2x.launch.xml network_interface:=eth1 +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 747fe8e..be4f1a9 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,4 @@ -site_name: AutowareV2X +site_name: AutowareV2X Documentation theme: name: material features: