dave with Docker - Field-Robotics-Lab/dave GitHub Wiki

The dave repository includes scripts for creating a Docker container that can be used to develop and run the dave simulation software. In this setup, the required functionality is divided between the host and the Docker container as follows:

  • All required software dependencies are installed in the container.
  • The simulation is run from inside the container.
  • Source repositories live on the host and are mounted into the container.
  • Source can be edited and version control can be managed from either the container or the host.

This approach has the advantage of providing a clean, isolated, portable and consistent runtime environment for running and testing the simulation, while remaining compatible with most choices of development tools.

Host setup

  1. First, make sure your system meets the hardware and software requirements.
    • Note: You will need to follow the optional instructions to install Docker and nvidia-container-toolkit.
  2. Create your uuv_ws workspace:
    mkdir -p ~/uuv_ws/src
    
  3. Clone repositories

Build docker container

Run the build.bash script that is located in the dave repository:

cd ~/uuv_ws/src/dave/docker/
./build.bash .

The first time this script is run it will take a while to build the image.

Run the container

cd ~/uuv_ws/src/dave/docker/
./run.bash dave_nvidia

If the container runs successfully, you should see some configuration messages before being dropped into a prompt as user developer. E.g.

developer@b4929dceab85:~$

Open Additional Terminals

To open additional terminals with this prompt, open a new terminal on the host and run the join.bash script in the docker directory:

cd ~/uuv_ws/src/dave/docker/
./join.bash dave_nvidia

Build the environment

From one of the developer prompts in the container, run the following:

cd ~/uuv_ws
catkin_make
source devel/setup.bash

Run a test

E.g.,

roslaunch uuv_dave uuv_dave.launch

Note that this launch file currently requires a controller to be connected (see issue #36).