Switch to Docker

4/7/24

Gazebo too slow on VM (see Using Gazebo on a virtual machine : r/ROS), switched to docker container NektonDocker to run Pontus

Set Environment Variables

7/2/24

  • Set the environment variables each time a new terminal session is started by adding to ~/.bashrc
export NEKTON_DOCKER_PATH=~/projects/vip/NektonDocker
  • Source the updated .bashrc
    • To apply the changes immediately without opening a new terminal, run:
source ~/.bashrc

Running the docker container

  • open Docker Desktop
  • open a terminal (e.g. WSL Ubuntu) and cd into Nekton Docker folder
cd $NEKTON_DOCKER_PATH
./start.sh
  • Access GUI in browser
http://localhost:6080/

  • Close docker container when done
exit

Installing docker the container

Windows

  • Install WSL2
  • Install Docker Desktop
  • Clone the repos
    • Note: Instead of using NektonSoftware, for RoboSub clone Pontus instead
git clone https://github.gatech.edu/Aquabots-VIP/NektonDocker.git
git clone https://github.gatech.edu/Aquabots-VIP/NektonSoftware.git
  • Edit line 13 of docker-compose.yml file to to replace the <PATH_GOES_HERE> portion with the path to the NektonSoftware folder.
    • This will mount the directory ~/projects/mrg_wsl on the host machine to /nekton_ws/src/NektonSoftware directory within the Docker container
    • Any changes made in either directory will be reflected in both places.
# docker-compose.yml
---
version: "2"
services:
  nekton:
    image: mwoodward6/nekton:humble
    container_name: nekton
    environment:
      - DISPLAY=:1.0
      - USER=root
    volumes:
      - <PATH_GOES_HERE>:/nekton_ws/src/NektonSoftware # Replace <PATH_GOES_HERE> with the path to NektonSoftware (If you cloned it to your home directory in WSL this would be ~/NektonSoftware)
    ports:
      - 6080:80
      - 5900:5900
      - 9090:9090
      - 8080:8080
    tty: true
    restart: unless-stopped
# - ~/projects/vip/NektonSoftware:/nekton_ws/src/NektonSoftware # Replace <PATH_GOES_HERE> with the path to NektonSoftware (If you cloned it to your home directory in WSL this would be ~/NektonSoftware)
- ~/projects/mrg_wsl/dev_ws/src/Pontus:/nekton_ws/src/NektonSoftware
  • Pull the docker container
docker pull mwoodward6/nekton:humble
  • Update an existing installation
update.sh