====== Run ROS locally ====== /*===== 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. Open terminal and run singularity image with Ubuntu 18.04 + ROS Melodic:\\ ''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 (if you have any):\\ ''source ~/workspace/aro/devel/setup.bash'' */ /*All images from Docker Hub are available too, e.g.:\\ ''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 Your Computer ===== ==== Linux ==== - If you have Ubuntu 18.04 (recommended) install Singularity ''sudo apt-get install singularity-container''.\\ But if you have Ubuntu 20.04 installed the package is missing in repository and you have to install Singularity manually.\\ Follow the Quick Start Guide https://sylabs.io/guides/3.5/user-guide/quick_start.html \\ and use version 3.5.3 https://github.com/hpcng/singularity/releases/tag/v3.5.3 - Download [[http://ptak.felk.cvut.cz/darpa-subt/data/tmp/robolab_melodic_09042021.simg|Singularity image]] provided for labs - run singularity image with Ubuntu 18.04 + ROS Melodic:\\ ''singularity shell %%--%%nv path/to/robolab_melodic.simg''\\ (''%%--%%nv'' is needed for graphical output with NVIDIA graphic card, e.g. RViz)\\ - Then source common ARO catkin workspace:\\ ''source /opt/ros/aro/setup.bash''\\ or, your own workspace (if you have any):\\ ''source ~/workspace/aro/devel/setup.bash'' Image updated on 9.4.2021 please download updated version /* (built from [[http://ptak.felk.cvut.cz/tradr/share/aro_melodic.txt|recipe]]). 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 ''\\ or in general: \\ '' $ sudo singularity build .simg .txt '' - Alternatively, you can build "an unpacked image" via \\ '' $ sudo singularity build %%--%%sandbox ros/ ros-kinetic-desktop-full.txt ''\\ or in general: \\ '' $ sudo singularity build %%--%%sandbox .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 '' after building the unpacked image. Afterwards, you should be able to use "apt-get install" to install additional packages. */ /*==== 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 */