====== Robot Operating System (ROS) ====== ===== On Linux ===== Follow [[http://wiki.ros.org/ROS/Installation]]. We will use ROS Kinetic in the course, nevertheless, ROS Melodic should mostly be compatible. You can also use the [[http://ptak.felk.cvut.cz/tradr/share/ros-kinetic-desktop-full.simg|Singularity image]] provided for labs, or modify the [[http://ptak.felk.cvut.cz/tradr/share/ros-kinetic-desktop-full.txt|Singularity recipe]] to build your custom image. ===== On Windows ===== * Ubuntu in [[https://www.virtualbox.org/|VirtualBox]] * Via [[https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux|Windows Subsystem for Linux (WSL)]], see [[http://wiki.ros.org/Installation/Windows]] * Expect the support to be only partial as WSL have some limitations. * Use ROS Melodic with Ubuntu 18.04 or ROS Kinetic with Ubuntu 16.04. ROS installation instructions for Linux shoud work once you are in the Ubuntu Bash shell. * For applications with graphical output (e.g., RViz), you will need: * Running X Server for Windows (e.g., [[https://sourceforge.net/projects/xming/|XMing]]) * Target X display specified (usually '':0'') when running graphical applications:\\ ''DIPLAY=:0 rosrun rviz rviz'' * You can add it to ''~/.bashrc'' for it to stay in effect:\\ ''echo 'export DISPLAY=:0' > ~/.bashrc'' * Dual boot with Ubuntu ===== At Labs ===== At [[https://cyber.felk.cvut.cz/study/computer-labs/|labs]] (e.g., E130, E132), Robot Operating System (ROS) is available through [[https://en.wikipedia.org/wiki/Singularity_(software)|Singularity]] containers. For Ubuntu 16.04 + ROS Kinetic, run:\\ ''singularity shell %%--%%nv /opt/ros-kinetic-desktop-full.simg''\\ (''%%--%%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'' 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'' ===== On GPU Servers ===== There are [[https://cyber.felk.cvut.cz/cs/study/gpu-servers/|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 [[courses:aro:tutorials:ros#at_labs|instructions for labs]] once you are there. Also, please read [[https://cyber.felk.cvut.cz/cs/study/gpu-servers/|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''