Skip to content

Software installation

Kristian Sem edited this page Sep 21, 2021 · 40 revisions

Vortex-AUV installation

Prerequisites

Step 1: Create a ROS workspace

  1. creating a workspace:
    mkdir -p ~/vortex_ws/src && cd ~/vortex_ws

Step 2: Download the required repositories and dependencies

  1. Enter the folder where you want to clone the repository:

     cd ~/vortex_ws/src
  2. Clone the main repository:

      git clone https://github.com/vortexntnu/Vortex-AUV.git
  3. Enter the main repo

    cd Vortex-AUV
    
  4. Fetch apt-package dependencies

    xargs -a packages.txt sudo apt-get install
    
  5. Install python dependencies

    pip install -r requirements.txt
    
  6. Fetch the other required repositories

    cd ~/vortex_ws/src
    vcs import --skip-existing --input Vortex-AUV/dependencies.repos
    

Build and source the workspace

  1. Build the workspace:

    cd ~/vortex_ws
    catkin build
  2. Add automatic sourcing of the workspace when opening a terminal window:

    echo "source ~/vortex_ws/devel/setup.bash" >> ~/.bashrc
  3. close the current terminal.

Step 4 (IF USING CAMERA): Install the ZED-ROS-Wrapper

Official documentation

  1. Download and install ZED SDK

    1. Download from Stereolabs
    2. Enter the directory with the file:
     cd path/to/download/folder
    1. Make the file executable:
     chmod +x ZED_SDK_Ubuntu18_v3.0.run
    
    1. Run the installer:
     ./ZED_SDK_Ubuntu18_v3.0.run
    
  2. Enter the catkin workspace:

     cd ~/vortex_ws/src
  3. Clone the zed-ros-wrapper and zed-ros-interfaces repos:

     git clone https://github.com/stereolabs/zed-ros-wrapper.git
      git clone https://github.com/stereolabs/zed-ros-interfaces.git
     ```
    
  4. Jump up to parent directory:

     cd ../
  5. Install dependencies:

     rosdep install --from-paths src --ignore-src -r -y
  6. Build the package:

     catkin build
  7. Source the package:

     source ./devel/setup.bash

Vortex-Simulator installation

Prerequisites

  • Ubuntu 20
  • ROS noetic
  • Vortex-AUV must be installed

Installation (docker)

1. Installation

Install Docker and docker-compose:

sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io
 sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

2. Build and run the container

Once Docker and docker-compose is installed, you can clone the repo and build the container that the simulator runs in:

git clone -b master_containerized https://github.com/vortexntnu/Vortex-Simulator/
cd ./Vortex-Simulator && sudo docker-compose build
sudo docker-compose up -d vortex-simulator
sudo docker-compose exec vortex-simulator /bin/bash

You are now inside the container, and may build the simulator.

cd ~/sim_ws && catkin build

Installation (non-docker)

  1. Enter the folder where you want to clone the repository:

    cd vortex_ws/src
  2. Clone the repository:

    git clone https://github.com/vortexntnu/vortex-simulator.git
  3. Compile the code by running "catkin build" inside the workspace:

    cd ~/vortex_ws/
    catkin build

Additional notes

Dependencies for ROS Noetic in case of upgrade:

sudo apt install protobuf-compiler ros-noetic-rosbridge-server ros-noetic-message-to-tf ros-noetic-geographic-msgs ros-noetic-move-base ros-noetic-move-base-msgs python3-osrf-pycommon python3-openpyxl python-yaml python-enum34 python3-pip python3-catkin-tools libgeographic-dev

then

pip3 install pyquaternion smbus scipy websocket-client adafruit_pca9685 rospkg bluerobotics-ping

To get rid of any pesky python2 errors still left behind, run:

sudo apt remove python2
sudo apt autoremove
sudo apt install python-is-python3

Note that this removes python2 from your system entirely!