Skip to content

Commit

Permalink
Merge pull request #4 from Field-Robotics-Lab/update2024
Browse files Browse the repository at this point in the history
  • Loading branch information
woensug-choi authored Dec 7, 2023
2 parents 9e287d2 + e744b7e commit 5ae3096
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 153 deletions.
233 changes: 128 additions & 105 deletions contents/dave_sensors/Multibeam-Forward-Looking-Sonar.md

Large diffs are not rendered by default.

45 changes: 28 additions & 17 deletions contents/installation/Build-Dave-Environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,52 @@ parent: Installation

Now that you've set up your development environment and obtained the source code, you can build the project by running:

```bash
cd ~/uuv_ws
catkin_make
```
Here, [catkin_tools](https://catkin-tools.readthedocs.io/en/latest/installing.html) is used to build the project. It compiles in parallel using number of cores in the machine. It supports all the options of `catkin_make` and can be used as a replacement for `catkin_make` in most cases as it is a drop-in replacement for `catkin_make`.

When the build is finished, source your new `setup.bash`:
```bash
source ~/uuv_ws/devel/setup.bash
```
Optionally, you may wish to add `source ~/uuv_ws/devel/setup.bash` to your `.bashrc` file.
First install, catkin tools to use `catkin build`

### Experimental
- If using Docker, you don't need this part. You already have `catkin build` available.

An alternative to `catkin_make` is to use the newer `catkin build`:
```
sudo apt-get update
sudo apt-get install python3-catkin-tools
```bash
# Install build tool catkin_tools
pip3 install -U catkin_tools

# Optionally, you can configure to install the packages
catkin config --install
```

Then build the source code (this may take upto about 10 minutes)

- If using Docker, below commands should be typed inside the docker environment after `./run.bash dockwater:noetic` or `./run.bash -c dockwater:noetic`.

# Build
```bash
cd ~/uuv_ws
catkin build
```

When the build is finished, source your new `setup.bash`:
```bash
source ~/uuv_ws/devel/setup.bash
# Source devel/setup.bash or install/setup.bash depending on whether you used the installation option
```
Optionally, you may wish to add `source ~/uuv_ws/devel/setup.bash` to your `.bashrc` file so that you do not have to source the setup file in every new terminal window.

This is experimentally supported until all the CMake dependencies and installations in our packages have been tested.

If fails, use `catkin_make` instead.
```bash
# remove previous build
cd ~/uuv_ws
rm -rf build devel install
catkin_make
```

## Test your Installation
Test that the installation is working by running one of the Dave demos
```
```bash
roslaunch dave_demo_launch dave_demo.launch
```
If the simulator does not close promptly with Ctrl-C, you can use the command `pkill gzclient && pkill gzserver` in another terminal window to force immediate shutdown.
If the simulator does not close promptly with Ctrl-C, first try hitting Ctrl-C multiple times. If it still doesn't close you can use the command `pkill gzclient && pkill gzserver` in another terminal window to force immediate shutdown.

![uuv_reference_view](../images/uuv_reference_view.png)

Expand Down
16 changes: 9 additions & 7 deletions contents/installation/Clone-Dave-Repositories.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 06/11/2021
last_modified_date: 29/11/2023
layout: default
title: Get Source Codes
nav_order: 4
Expand All @@ -13,15 +13,18 @@ Project Dave consists of this repository along with other UUV components availab
### Clone Dave

Clone this repository and other relevant repositories provided under Field-Robotics-Lab:
```bash
mkdir -p ~/uuv_ws/src
cd ~/uuv_ws/src
git clone https://github.com/Field-Robotics-Lab/dave.git
```
```bash
mkdir -p ~/uuv_ws/src
cd ~/uuv_ws/src
git clone https://github.com/Field-Robotics-Lab/dave.git
```

### Use `vcs` to clone source dependencies

If not already installed - [install vcstool](http://wiki.ros.org/vcstool).
```bash
sudo pip3 install -U vcstool
```

Use `vcs` to read the input file and clone required dependencies

Expand All @@ -39,7 +42,6 @@ rm -rf dockwater ds_msgs ds_sim eca_a9 rexrov2 uuv_manipulators uuv_simulator
vcs import --skip-existing --input dave/extras/repos/dave_sim.repos .
```

### OPTIONAL: GPU Multibeam sonar
```diff
- DO NOT INCLUDE THIS if you are not using multibeam sonar.
Expand Down
44 changes: 40 additions & 4 deletions contents/installation/Docker-Development-Image.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,45 @@ parent: Installation

This guide explains how to set up a Docker-based development environment for building and developing Dave repository and related software.

## Step 1: [Install Dependencies](https://github.com/Field-Robotics-Lab/dockwater/wiki/Install-Dependencies)
## Step 1: [Install Dependencies]
Follow these steps to install required utilities on your host system.

### [Install Docker] (https://field-robotics-lab.github.io/dave.doc/contents/installation/System-Requirements/#docker)

### Install Rocker
Check pip version with, `pip --version`, if it's based on python version 2, then install pip3 with `sudo apt install python3-pip`

- Install Rocker (the Open Robotics Docker CLI)
```bash
# Install rocker
pip3 install rocker
# Double check rocker installation to be the latest version
pip3 install --force-reinstall git+https://github.com/osrf/rocker.git@main
# Add path of pip3 installation to PATH
echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc
# Load new PATH
source ~/.bashrc
# Check rocker version
rocker --verion
```

## Step 2: Build and run
Once you've installed the dependencies, you can build your Docker development environment with the following commands:
```
```bash
# Start from wherever you want (Recommend your home directory)
# Clone dockwater package which contains configurations to run Dave in Docker environment with Rocker CLI
git clone https://github.com/Field-Robotics-Lab/dockwater.git
cd dockwater
# Build the Docker image for the ROS Noetic environment (this may take a while, upto 20 or more minutes)
./build.bash noetic
# Run the Docker image for the ROS Noetic environment (this may take a while, upto 5 minutes)
./run.bash dockwater:noetic
# When done, you are now in a Docker container with the ROS Noetic environment running Ubuntu 22.04 Focal LTS. Check with,
lsb_release -a
# You can now run ROS commands, e.g.
rosversion -d
# You can also run Gazebo, e.g.
gazebo --version
```
If the above is successful, you should end up with a command prompt opened into the Docker container. Your user information will be the same and your home directory will be mounted and accessible within the container.

Expand All @@ -28,10 +57,17 @@ If the above is successful, you should end up with a command prompt opened into
```
For instructions and plugin details : [Multibeam Forward-Looking Sonar](/dave.doc/contents/dave_sensors/Multibeam-Forward-Looking-Sonar)
```bash
git clone -b cuda https://github.com/Field-Robotics-Lab/dockwater.git
# Clone docker package with CUDA support
# if you have already cloned dockwater package, skip this step
git clone -b cuda-dev https://github.com/Field-Robotics-Lab/dockwater.git
cd dockwater
# Change to cuda-dev branch which contains configurations to run Dave in Docker environment with CUDA support
git checkout cuda-dev
# Build the Docker image for the ROS Noetic environment (this may take a while, upto 30 or more minutes. It takes long to download and install CUDA libraries)
./build.bash noetic
./run.bash noetic:latest
# Run the Docker image for the ROS Noetic environment (this may take a while, upto 5 minutes)
./run.bash -c dockwater:noetic
# When done, you are now in a Docker container with CUDA support
```

### Notes
Expand Down
22 changes: 15 additions & 7 deletions contents/installation/Install-on-Windows-using-WSL2.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
---
last_modified_date: 13/08/2021
last_modified_date: 29/11/2023
layout: default
title: Install on Windows using WSL2
nav_exclude: true
---

# Overall Process
We will install WSL on top of Windows and install Ubuntu 22.04 Jammy LTS (which is a default installation of WSL) on top of WSL. In Ubuntu 22.04 Jammy LTS, we will run ROS Noetic, Gazebo 11, UUV Simulator and DAVE on Docker environment (the virtual environment running Ubuntu 20.04 Focal LTS) on top of Ubuntu 22.04 Jammy LTS.

If you want, you can install Ubuntu 20.04 Focal LTS on top of WSL and install ROS Noetic, Gazebo 11, UUV Simulator and DAVE run directly. But, I recommend docker installation method.

# Enroll in Windows Insider Program (Dev channel) and install WSL2 at Windows

(2023/11/29)
Currently, WSL Version 2 is fully integrated to the windows 11 and Windows 10 version 21H2 or higher. You don't need to enroll in Windows Insider Program. Just install Windows 11 and enable WSL2.

(2021/7/30)
Currently, the `beta` channel includes updates what is needed here. the beta channel of windows 10 will be installing Windows 11. For some old hardware, windows 11 cannot be installed ([Windows 11 requirement checker](https://github.com/rcmaehl/WhyNotWin11/releases/latest/download/WhyNotWin11.exe)).

Expand All @@ -20,9 +28,9 @@ In order to install Windows 10 build 21364 or higher, you have to enroll in Wind

run Win Logo + R and type 'winver' to check if windows version is above Build 21364. Otherwise, enroll Windows Insider Program and run windows update.

## Install WSL 2 with Ubuntu 20.04 LTS
## Install WSL 2 with Ubuntu 22.04 LTS

[https://docs.microsoft.com/en-us/windows/wsl/install-win10](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
[Install WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install)

If you already have WSL installed, all you need to do is run wsl --update and you’ll be set to use GUI apps.

Expand All @@ -36,12 +44,12 @@ README for WSL OpenGL Support : https://github.com/microsoft/wslg
- [INTEL GPU driver for WSL](https://downloadcenter.intel.com/download/30579/Intel-Graphics-Windows-DCH-Drivers)
- [AMD GPU driver for WSL](https://community.amd.com/t5/radeon-pro-graphics-blog/announcing-amd-support-for-gpu-accelerated-machine-learning/ba-p/414185)



## Install Dave project
Thanks to the great design of WSL2 system architecture. Just follow ordinary instruction

**Linux Host** [Configure Your Host Machine](/dave.doc/contents/installation/Install-Directly-on-Host): Instructions to install ROS Noetic, Gazebo 11, UUV Simulator and DAVE directly on your Ubuntu 20.04 host machine.
**Docker** [Use a Docker Image](/dave.doc/contents/installation/Docker-Development-Image): Instructions to install Docker and use a Docker image to build and run DAVE. Utilizing CUDA NVIDIA capability on Docker, you may read [GPU CUDA in WSL](https://learn.microsoft.com/ko-kr/windows/ai/directml/gpu-cuda-in-wsl)

**Linux Host** [Configure Your Host Machine](/dave.doc/contents/installation/Install-Directly-on-Host): Instructions to install ROS Noetic, Gazebo 11, UUV Simulator and DAVE directly on your Ubuntu 20.04 Focal on WSL.

- You may be tempted to git clone repositories at windows hosted directories (e.g. /mnt/c/users). DO NOT. it's painfully slow compared to accessing data inside the local folder (e.g. /home/$USER).

Expand Down Expand Up @@ -77,5 +85,5 @@ Reference : https://github.com/microsoft/wslg/issues/86

## Screenshot : Almost 60 fps, comparable to direct Linux host installation

![install_on_wsl_part1](../images/install_on_wsl_part1f.png)
![install_on_wsl_part1](../images/install_on_wsl_part1.png)
![install_on_wsl_part2](../images/install_on_wsl_part2.png)
15 changes: 8 additions & 7 deletions contents/installation/Installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 29/07/2021
last_modified_date: 29/11/2023
layout: default
title: Installation
nav_order: 2
Expand All @@ -10,26 +10,27 @@ has_children: true
This guide explains how to build and run the Dave simulation environment. Make sure to review the [System Requirements](/dave.doc/contents/installation/System-Requirements) before you begin.

## Step 1: Set up Your Development Environment
To build the Dave software, you need a development environment with the necessary dependencies installed (these include ROS, Gazebo and some utilities). There are two ways to do this:
To build the Dave software, you need a development environment with the necessary dependencies installed (these include ROS, Gazebo and some utilities). There are three ways to do this (Native install on Host Machine, Using Docker Virtual Environment, and Windows WSL2). Choose one of the following options:

### Option A: [Configure Your Host Machine](/dave.doc/contents/installation/Install-Directly-on-Host)
Set up your host machine as your development environment.
* This involves installing all dependencies directly on the host itself.
* This is the simplest option provided you are willing to set up your machine to use the specific version of Ubuntu/ROS/Gazebo listed in the [System Requirements](/dave.doc/contents/installation/System-Requirements).
* But this option may not be available if you have Ubuntu version 22.04 Jammy LTS (check with `lsb_release -a`) where this Option requires you to have Ubuntu 20.04 Focal.

### Option B: [Use a Docker Image](/dave.doc/contents/installation/Docker-Development-Image)
Set up a Docker container with the necessary dependencies.
* This involves installing Docker, then installing dependencies into a Docker image.
* The image functions like a lightweight virtual machine that allows you to build and run Dave.
* This option is a little more complex conceptually, but has the advantage of leaving the configuration of your host machine (mostly) undisturbed.
* This option is a little more complex conceptually, but has the advantage of leaving the configuration of your host machine (mostly) undisturbed. Also possible to run on different host OS (e.g. Ubuntu 22.04 Jammy Jellyfish)
* Use this option if you are using the same host for multiple development projects that make use of different software environments (for example, different ROS versions), or just prefer not to install packages on your host system.

## Option C: [Install on Windows using WSL2](/dave.doc/contents/installation/Install-on-Windows-using-WSL2)
As listed in the system requirements, Dave expects to be run on Ubuntu Linux, and we officially support Ubuntu 20.04/Noetic/Gazebo11. However, users who want to test on Windows without installing linux may use WSL2. This is a native-like method to install Ubuntu on Windows 10 or 11. This is the most complex option, but it is the only option that allows you to run Dave on Windows without installing a virtual machine.


## Step 2: [Get the Source Code](/dave.doc/contents/installation/Clone-Dave-Repositories)
After completing either Option A or B above, follow this tutorial to clone the Dave repositories.

## Step 3: [Build the Dave Simulation Environment](/dave.doc/contents/installation/Build-Dave-Environment)
Finally, build and run the Dave software itself.

## Experimental
As listed in the system requirements, Dave expects to be run on Ubuntu Linux, and we officially support Ubuntu 20.04/Noetic/Gazebo11. However, users who want to test experimental Windows support may be interested in the following tutorial:
* [Install on Windows using WSL2](/dave.doc/contents/installation/Install-on-Windows-using-WSL2): Native-like methods to install on Windows 10 or 11
19 changes: 14 additions & 5 deletions contents/installation/System-Requirements.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
last_modified_date: 29/09/2021
last_modified_date: 29/11/2023
layout: default
title: System Requirements
nav_order: 1
Expand All @@ -17,6 +17,7 @@ parent: Installation
## Software
- Recommended
* Ubuntu Desktop 20.04 Focal (64-bit)
* If you're system is other than 20.04 (e.g. 22.04 Jammy Jellyfish), you can use Docker to run the Dave environment which will run 20.04 in docker environment. Check the Docker Requirements below and proceed. Installing dicrectly on host requires much more work.

- Legacy mode
* Ubuntu Desktop 18.04 Bionic (64-bit)
Expand All @@ -26,13 +27,21 @@ parent: Installation
### Nvidia Driver
Our tutorials assume you have an Nvidia graphics card configured to use the proprietary driver.
* There are many online guides for configuring the Nvidia driver correctly on Ubuntu.
* Here's [one example with graphical and command-line options](https://www.linuxbabe.com/ubuntu/install-nvidia-driver-ubuntu-18-04).
* Here's [one example with graphical and command-line options](https://linuxhint.com/update-nvidia-drivers-ubuntu-22-04-lts/).
* You may test your driver installation by running `nvidia-smi` in a terminal. If the command is not found, the driver is not installed correctly. Also test 3D Rendering with `glxgears` which can be used after installing the `mesa-utils` package with `sudo apt install mesa-utils`.
* Last tested version for multibeam sonar is, `Ubuntu 22.04`, `NVIDIA nvidia-driver-535`, `CUDA 12.2`. The default install of Ubuntu 22.04 which can be chcked with `nvidia-smi` command on the terminal. When you change NVIDIA driver, please restart.

### Docker
Running Docker is optional. If you choose to use the container-based installation instructions, the following are required:
Running Docker is optional but it's more trustworthy if you are not so familiar with installation process. If you choose to use the container-based installation instructions, the following are required:
* Docker v19.03 or higher ([installation instructions](https://docs.docker.com/engine/install/ubuntu/))
* Make sure to also complete the Linux post-install instructions linked at the bottom of the page.
* nvidia-container-toolkit ([installation instructions](https://github.com/NVIDIA/nvidia-docker))
* Make sure to also complete the [Linux post-install instructions](https://docs.docker.com/engine/install/linux-postinstall/) linked at the bottom of the page.
* To use NVIDIA GPUs with Docker, you will need to install the following:
* nvidia-container-toolkit ([installation instructions](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html))
* We are using Docker as a container runtime engine
* Make sure to restart docker after installation of nvidia-container-toolkit `sudo systemctl restart docker`
```
* Check [Dockwater prerequisites NVIDIA driver versions](https://github.com/osrf/rocker#nvidia-settings) to see which NVIDIA driver versions are supported for your system Ubuntu versions.
* Tested with Docker Installation method at Ubuntu 22.04 6.2.0-37-generic with nvidia-535 driver worked fine
## Peripherals
We also recommend a gamepad for testing the UUV and its arm and sensor devices. In the examples we use a Logitech F310 ([Walmart](https://www.walmart.com/ip/Logitech-F310-GamePad/16419686)).
2 changes: 1 addition & 1 deletion contents/integrated_world/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Lastly, featuring multiple UUVs teleoperated using separate joysticks and arms c
# Usage

To launch the demo world

- This takes quite some time to launch to load since it needs to download models from [Ignition Fuel](https://app.gazebosim.org/dashboard) online model library
```bash
roslaunch dave_demo_launch dave_integrated_demo.launch
```
Expand Down

0 comments on commit 5ae3096

Please sign in to comment.