Table of Contents

Docker tutorial

Docker is available for Linux, Windows, and Mac. The image is tested on Ubuntu 18.04, 20.04 and Windows 10. It may not work on newer Mac computers and some Windows machines.
If you prefer to have everything installed on your system, you do not need to use Docker and install everything manually (see Manual installation). However, using Docker is recommended.

Please, try to follow this instructions based on your system. Linux is recommended, but other may work. Mac computers with arm64 processors (M1, M2) will not probably work. In case of any questions, ask Lukáš Rustler (email, forum, or in some cases Discord).

Docker installation

The official installation guide is available here. For Windows and Mac, binaries are available to be downloaded. For Linux, we recommend to install only docker engine (named 'Server' in the link). You need to choose your distribution and follow the guide for installation from repository (recommended), .deb package, or with a convenience script.

In case of problems with performance on your PC, you can run the image on Gitpod. See Gitpod.
Do not forget to perform also the first post-installation steps for Linux to run Docker without sudo.

Windows users

Docker now requires WSL2. It should install automatically with Docker, but it may happen that something go wrong. If you run Docker and you still see Docker engine starting, the installation of WSL is probably not correct. In that case, open PowerShell and type wsl -l -v. If nothing happens (the output is empty) then you probably need to update to WSL2. First thing to do is wsl –set-default-version 2 (there is double dash in front of 'set'), then install this patch WSL2 kernel patch and restart docker engine.

Docker commands

Image version:

  1. VNC only version (Windows, Linux) - the programs will be redirected to VNC, which allows them to run even on Windows. Works on linux as well, and may be better for some users.
  2. VNC + Direct mode (Linux) - VNC can be used as well, but it is possible to also run programs directly without VNC. However, it may not work on some systems.

Docker commands

The commands will work on Linux terminal without any prerequisites, but on Windows and Mac you need to run the Docker Engine first and then use a command-line interface (cmd, PowerShell) for the given system.

Run the image

  1. Use our script (Linux only)
    • VNC version - run.sh
      ./run.sh link_path container_name image_name
    • VNC + Direct version - run_direct.sh
      xhost local:root && ./run_direct.sh link_path container_name image_name
    • link_path - path on your computer, which will be visible in Docker. You can use this path to easily share files to/from Docker.
      • Default: “”. However, we do recomend to use this
      • Example:
        • Linux: ./run.sh /home/my_user/data
    • container_name - name of the container, which can be used to stop, start, …
      • Default: HRO
    • image_name - name of the image to be downloaded.
      • Default: b3m33hro/labs:new
  2. Do the same by hand
    • Download the image
      docker pull b3m33hro/labs:new
    • Name your image for an easier usage. <image_name> is an arbitrary name for your image, e.g., hro_image
      docker tag b3m33hro/labs:new <image_name>
Names must start with lowercase letter

Run the programs

1. VNC (Windows, Linux) - this method runs VNC server and you can see everything in your browser

You can connect to the VNC server from another machine or even from a mobile phone by using the IP address of the host machine instead of localhost.

2. Direct (Linux only) - this runs the programs directly

HRI

To have Pepper in Choregraphe, you will need to change the robot in Edit→Preferences→Virtual robot—chose Pepper V16 robot. Next time you can run only choregraphe and Pepper will be there.

Other commands

   docker stop <container_name>
   CTRL+D
   exit

   docker start <container_name>  
   docker attach <container_name>

   docker exec -it <container_name> /bin/bash

   docker container rm <container_name>

   docker system prune -a

Functionality check

   git clone https://gitlab.fel.cvut.cz/body-schema/teaching/b3m33hro-labs.git
   cd b3m33hro-labs/lab3/tutorial_cartesian-interface/smoke-test
   ./test.sh

Gitpod

In case of problems with Docker on your computer, you can use Docker on Gitpod. Gitpod allows running Docker images on their servers for free (each registered user can use 50 hours per month).

Only files in /workspace will be saved after you stop and start the workspace again!
If you want to continue in your current workspace after you close it, open it from Dashboard. Opening the previous link again will result in creation of a new workspace.

Everything should work almost the same as in the local installation, but server resources are used. However, you can not link folder from your PC as in the case of local Docker. You can either use data only in docker, or there are several ways how to share code:

You can copy/paste things to the Gitpod workspace terminals, but you need to approve it (popup window with the question should appear after you first try to paste something).)

After your workspace gets initialized click on it or it may “load” infinitely.

FAQ

Manual installation

You need to install Robotology superbuild, GraspIt!, gpd, Python 2.7 and 3.X. Optionally, ROS is needed. You can check Dockerfile to get an idea of how everything is installed.