Search
At labs (e.g., E130, E132), Robot Operating System (ROS) is available through Singularity containers.
For Ubuntu 18.04 + ROS Melodic, run: singularity shell --nv /opt/singularity/robolab/melodic (--nv is needed for graphical output, e.g. RViz) Then source common aro catkin workspace: source /opt/ros/aro/setup.bash or, your own workspace: source ~/workspace/aro/devel/setup.bash
singularity shell --nv /opt/singularity/robolab/melodic
--nv
source /opt/ros/aro/setup.bash
source ~/workspace/aro/devel/setup.bash
For Ubuntu 16.04 + ROS Kinetic, run: singularity shell --nv /opt/ros (--nv is needed for graphical output, e.g. RViz) Then a catkin workspace has to be sourced, e.g. the system one: source /opt/ros/kinetic/setup.bash or your own workspace: source ~/workspace/aro/devel/setup.bash
singularity shell --nv /opt/ros
source /opt/ros/kinetic/setup.bash
All images from Docker Hub are available too, e.g.: singularity shell --nv docker://ros:kinetic-robot-xenial singularity shell --nv docker://ros:melodic-robot-bionic Note however that the images are quite large and download to your home (with limited space) by default: So one may need to switch the cache directory somewhere else, e.g.: mkdir -p /tmp/$USER/singularity ln -s /tmp/$USER/singularity ~/.singularity
singularity shell --nv docker://ros:kinetic-robot-xenial
singularity shell --nv docker://ros:melodic-robot-bionic
mkdir -p /tmp/$USER/singularity
ln -s /tmp/$USER/singularity ~/.singularity
There are GPU servers available via remote access (ssh). Log in via one of these commands (use your faculty username): ssh -X username@cantor.felk.cvut.cz ssh -X username@taylor.felk.cvut.cz Singularity images may also be located under /local/singularity_images. You can follow, more or less, the instructions for labs once you are there.
ssh
ssh -X username@cantor.felk.cvut.cz
ssh -X username@taylor.felk.cvut.cz
/local/singularity_images
Also, please read the instructions on GPU usage. Most notably, use at most one GPU at once. Select GPU to use via environmental variable CUDA_VISIBLE_DEVICES, e.g. CUDA_VISIBLE_DEVICES=2 my_command Prevent using any if you don't need it: CUDA_VISIBLE_DEVICES= my_command You can export it to stay in effect for all the following commands: export CUDA_VISIBLE_DEVICES=2 my_command
CUDA_VISIBLE_DEVICES
CUDA_VISIBLE_DEVICES=2 my_command
CUDA_VISIBLE_DEVICES= my_command
export CUDA_VISIBLE_DEVICES=2
my_command
Follow http://wiki.ros.org/ROS/Installation. We use ROS Kinetic in the course, nevertheless, ROS Melodic should mostly be compatible.
You can also use the Singularity image provided for labs, or modify the Singularity recipe to build your custom image.
To build the image (on your own computer), you can use one of these commands:
$ sudo singularity build ros-kinetic-desktop-full.simg ros-kinetic-desktop-full.txt
$ sudo singularity build <image_name>.simg <recipe_name>.txt
$ sudo singularity build --sandbox ros/ ros-kinetic-desktop-full.txt
$ sudo singularity build --sandbox <image_folder> <recipe_name>.txt
Both of these alternatives will create an image from the recipe. You can also edit the recipe (since it is a simple text file). You need to use sudo when building images or use “fakeroot” (see singularity help build for more details). The unpacked image is useful when you would like to add (install) additional packages to the image. You can to this by running sudo singularity shell --writable <image_folder> after building the unpacked image. Afterwards, you should be able to use “apt-get install” to install additional packages.
sudo
singularity help build
sudo singularity shell --writable <image_folder>
:0
DIPLAY=:0 rosrun rviz rviz
~/.bashrc
echo 'export DISPLAY=:0' > ~/.bashrc