Table of Contents

Docker tutorial

Docker is available for Linux, Windows, and Mac. The image is tested on Ubuntu 18.04 and Windows 10. It should work on other systems as well, but we can not guarantee that.
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 strongly recommended.

Docker installation

The official installation guide is available here. For Windows and Mac, binaries are available to be downloaded. For Linux, 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.
You can also install nvidia-docker on top of the normal installation for better GPU utilization (not needed in this course).

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

   docker pull b3m33hro/labs:tag

   docker tag b3m33hro/labs:tag <image_name>

Names must start with lowercase letter

   docker run -it -p 6080:6080 -p 8888:8888 --name <container_name> -v path_to_data_folder_host_system:/root/data <image_name>

   start-vnc-session.sh

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.

HRI

To have Pepper in Choregraphe, you will need to either: A) run sed -i 's|su -c ./naoqi-bin chore &||g' /usr/bin/choregraphe && sed -i 's|./choregraphe-bin -p 9559 --ip 127.0.0.1 --no-naoqi --no-discovery|su -c ./choregraphe-bin chore|g' /usr/bin/choregraphe and run choregraphe, or B) cd /opt/Aldebaran/bin and su -c ./choregraphe-bin chore, or C) download the newest Docker image with tag full or hri. Robot can be then changed 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

If you have problems with jupyter-notebook on Windows, please run fix_windows.sh.

   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 will “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.