====== Remote Access to Lab Computers and Quick Start with ROS ====== To access the lab computers remotely, we suggest the methods described below. See [[remote_access#more_information|more information]] if the suggested methods don't work. ===== Get a Computer ===== The lab computers are typically not running, therefore the computer has to be remotely started. To start a computer,\\ type ''ssh student@turtle.felk.cvut.cz'' (password ''xxx'') and select the lab you like to get a computer from.\\ Use the exact username ''student'' and password ''xxx'', for your username you will be asked later Select a pool from which you want the computer from. Type ''yes'' if you are prompted to start the machine.\\ Use ''0) Lab E:130 with TurtleBots (7x HP first floor)'' only if you need to interact with a physical turtlebot in the lab.\\ You'll be assigned a computer '''' which you can connect to with one of the following methods (after waiting a minute or so). The computer will be started if it is not already running. Remember the '''' eg. e132-21 for future use. Note that the computer may still be shared with other students. If so, try getting another computer, or set your own [[http://wiki.ros.org/roslaunch/Commandline%20Tools#Launch_syntax|roscore port]] to avoid conflicts. Once you get your computer '''', you can access it through SSH or remote desktop. ===== SSH ===== Any SSH client can be used for a remote access from Linux or MacOS. Use [[https://www.putty.org/|PuTTY]] on Windows. Connect to the '''' you got [[remote_access#get_a_computer|above]] using a jump host (flag ''-J'') and your '''' :\\ ''ssh -Y -J @turtle.felk.cvut.cz @''\\ Flag ''-Y'' enables trusted X11 forwarding. Then, you can directly run [[https://en.wikipedia.org/wiki/X_Window_System|X]] applications. On Windows, you'll need to install an X server, e.g. [[http://www.straightrunning.com/XmingNotes/|Xming]]. Using the remote desktop below may be preferred as it provides full access to the computer including X server and works better on low-quality connections. ===== Remote Desktop ===== Connect to the '''' you got [[remote_access#get_a_computer|above]] using ssh:\\ (''ssh -Y -J @turtle.felk.cvut.cz @'')\\ You do not have to open new ssh connection if you already have one, you just need to have a shell to start ''remote-desktop'' server. Start a desktop window manager accessible via [[https://xpra.org/|Xpra]]:\\ ''remote-desktop start xpra'' Now you can close the ssh connection, if you don't need it, the remote-desktop will be still running. Later, to list running desktops:\\ ''remote-desktop list''\\ Or, to kill desktop on display '':1'':\\ ''remote-desktop stop 1'' On your computer, [[https://xpra.org/trac/wiki/Download|download]] and install an Xpra client. (The version in the default Ubuntu 18.04 repository does not support proxy host.) Run the client. Connect to the session started above, using mode SSH -> SSH and proxy ''turtle.felk.cvut.cz''.\\ {{:courses:aro:tutorials:xpra_conn.png?400|}} ===== Robot Operating System (ROS) ===== 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 20.04 + ROS Noetic:\\ ''singularity shell %%--%%nv /opt/singularity/robolab/noetic''\\ (''%%--%%nv'' is needed for graphical output, e.g. RViz)\\ Then source common ARO catkin workspace:\\ ''source /opt/ros/aro/setup.bash''\\ /*There could be a problem on some computers with symlink\\ ''/opt/singularity/robolab/noetic''\\ (Stale NFS file handle), in such case use the latest robolab noetic singularity image\\ ''singularity shell %%--%%nv /opt/singularity/robolab/robolab_melodic_2021-04-09'' 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''*/ /*Then you should be able to start turtlesim\\ ''roscore &''\\ ''rosrun turtlesim turtlesim_node''\\ or even gazebo simulator\\ ''TURTLEBOT3_MODEL=burger roslaunch turtlebot3_gazebo turtlebot3_world.launch'' */ If you encounter strange behaviour in ros/rviz/gazebo it might be caused by somebody else is publishing on same topics.\\ You have to change roscore port and gazebo server port in such case.\\ export GAZEBO_MASTER_URI="http://localhost:54321" export ROS_MASTER_URI="http://localhost:12345" roslaunch -p 12345 aro_sim onlysim.launch You can list all occupied ports by\\ ''netstat -ntl'' or a specific port by ''netstat -ntl|grep 12345'' ===== More Information ===== In case of technical difficulties with connecting you can drop an email to himmebed@fel.cvut.cz but describe in detail what are you trying to do and what is the result. Messages ''It doesn't work, help!'' will be ignored. Any constructive feedback is welcome. For more details, see * [[https://www.thewoodcraft.org/pub/hornilouka/videa/|video tutorials]] (in Czech and English), and * [[https://support.dce.felk.cvut.cz/mediawiki/index.php/Vzd%C3%A1len%C3%BD_p%C5%99%C3%ADstup_do_laborato%C5%99%C3%AD|how-to]] (in Czech).