Account setup
The Robot House Robot House network includes a number of computers that you can use for conducting research. This page guides you how to setup your account so that you can comfortably use the network and the pre-installed ROS distribution.
Secure shell
It is immensely useful to setup password-less SSH login for working with the computers in Robot House. A correct configuration will allow you to log into Robot House computers without typing a password (from internal and external devices). Moreover, it will also enable the following:
Shell access to the robots
Remote shell access to Robot House
Using
roslaunch
with the<machine>
tag to start ROS nodes on other computers
Internal devices
Follow these steps to configure SSH for the computers in the Robot House network.
To start, you first need to generate an SSH key pair (See also the official instructions to Generate an SSH key):
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/<user>/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/<user>/.ssh/id_rsa. Your public key has been saved in /home/<user>/.ssh/id_rsa.pub. The key fingerprint is: SHA256:1234567890XYZ <user>@<host> The key's randomart image is: +---[RSA 2048]----+ | . . ..oo..| | . . . . .o.X.| | F . . o. ..+ B| | . o.oo .+ ..| | ..o.S o.. | | . %o= . | | @.B... A . | | o.=. o. . .| | .oo E. . | +----[SHA256]-----+
Note
Accept the default location for the key file by pressing enter once. Make sure to press enter two more times without typing in any passphrase if you want to avoid using passwords. SSH keys without passphrases are generally considered acceptable.
Then, tell SSH to accept this key for authentication when logging in from other computers:
$ cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
The files that we have generated (
authorized_keys
and the key pair) have to be distributed to all computers in the Robot House network. Paste the following into your terminal to copy them:$ for host in $RH_HOSTS; > do > if [ ! $host == $HOSTNAME ]; > then > scp ~/.ssh/id_rsa* ~/.ssh/authorized_keys $host:.ssh/; > fi > done
Note
There will be some output for copying the files but you will also have to type your password for each host and confirm each of the host’s signatures with
yes
when prompted with the following:The authenticity of host '<host> (<ip>)' can't be established. ECDSA key fingerprint is SHA256:1234567890XYZ. Are you sure you want to continue connecting (yes/no)?
Finally, also distribute the
known_hosts
file to avoid accepting the signature on every host individually:$ for host in $RH_HOSTS; > do > if [ ! $host == $HOSTNAME ]; > then > scp ~/.ssh/known_hosts $host:.ssh/; > fi > done
You can now use SSH to log into any host in Robot House without needing to type your password.
External devices
If you want to have access from your personal computer or laptop, you need to create a key pair with ssh-keygen
on that device, too. You need to bring the key file to Robot House, either on a device that is connected to the Robot House network or on a USB stick.
For doing so, you first have to copy the public key file from your device to one of the computers in Robot House. Proceed according to the location of the key file:
If you want to use the standard key on your device, enter the following to copy it to the correct location:
$ scp ~/.ssh/id_rsa.pub <user>@<computer>:.ssh/id_rsa.personal.pub
Note
Use your Robot House username and the name of a computer in Robot House that you have access to.
If it is on a USB stick, plug it into a computer and copy the file to the correct location:
$ cp /run/media/<user>/<USB-STICK>/id_rsa.pub ~/.ssh/id_rsa.personal.pub
Note
Use your Robot House username and the name of the USB stick that you plugged in.
You then need to add the key as acceptable for authentication on all the computers in Robot House. Please log into the computer that you have copied the file to and issue the following command to add the key as valid for authentication:
$ for host in $RH_HOSTS; > do > ssh-copy-id -i ~/.ssh/id_rsa.personal.pub $host; > done
Password
Note
The second command (robot_hosts
) will open a parallel connection to all of the computers using SSH at the same time.
It may be a good idea to maximize the terminal window as you will be typing in all of the sub-windows simultaneously.
After you have setup SSH successfully, make sure to change your password on all the computers in Robot House. When prompted, first enter your old password (given to you by one of the team members) followed by your new password (twice).
$ robot_env common $ robot_hosts $ passwd Changing password for <user>. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
ROS and catkin
The Robot Operating System (ROS) is a set of software libraries and tools that help you build robot applications. It is released in distributions that are akin Linux distributions (e.g. Ubuntu) providing a collection of software to operate robots and other devices. Kinetic Kame (short: Kinetic) is the primary distribution in use at Robot House as it is compatible with most of our hardware.
- Common packages that are available on all computers in Robot House are:
A meta-package that contains a collection of packages for using ROS on a desktop computer:
ros-kinetic-desktop-full
A meta-package for operating Care-O-bot 4:
ros-kinetic-care-o-bot-desktop
A meta-package for operating and simulating turtlebot2:
ros-kinetic-turtlebot
,ros-kinetic-turtlebot-simulator
Packages for operating and visualizing Pepper:
ros-kinetic-pepper-robot
,ros-kinetic-pepper-meshes
Various packages for operating Sawyer (cf. Sawyer Dependencies).
Note
For compatibility reasons, Fetch packages are not installed as part of the base system but from source when loading its Robot environment.
- Besides official ROS packages, we provide our own packages (Robot House ROS), which is loaded by default (see below). It contains:
Components to operate and visualize the sensory infrastructure of Robot House:
uh_core
,uh_webui
Configuration files, custom startup and demo scripts, and utilities to operate robots:
uh_cob
,uh_fetch
,uh_pepper
, etc.Environment configuration for different Robot House layouts and other places, e.g. the lab in E-125, including navigation maps:
uh_environments
A catkin workspace is a folder where you modify, build, and install ROS packages. In case you want to write your own code to operate a robot, should use your own personal catkin workspace. For creating a workspace, follow these steps in the terminal of any Robot House computer:
$ cd ~ $ mkdir -p <your_catkin>_ws/src $ cd ~/<your_catkin>_ws/ $ catkin_make
Every time when want to work with your workspace, i.e. when you open a new terminal, you need to source your now existing setup.bash
file to load your workspace:
$ source ~/<your_catkin>_ws/devel/setup.bash
Note
If you are going to use the Robots or Robot House environment setting, you need to add uh_core
and uh_environments
packages in the find_package (catkin REQUIRED COMPONENTS)
section of the package’s CMakeLists.txt.
You can load multiple catkin workspaces at once and this provides you with access to all of the packages. Workspaces are extended hierarchically and, in fact, your personal catkin workspace already extends the system’s ROS installation. When extending an existing workspace, individual files and scripts of existing packages will be replaced by a custom version if you use the same package and files names.
On the Robot House computers, there are different workspaces available which you can use based on your needs. Some workspaces are loaded automatically when opening a terminal window on one of the Robot House computers providing you access to its packages. In order of loading, these are:
The default ROS installation in
/opt/ros/kinetic
.The Robot House ROS installation and a few extra packages are loaded by the
common
Robot environment in/opt/robots/common/
.
Note
If you want to alter the automatic loading of packages, edit the file ~/.bashrc
, commenting out the appropriate lines. To do this on all Robot House computers, the command robot_hosts
is recommended.
You can load other existing workspaces using the Robot environment command for each robot individually. If you happen to name your workspace /home/<user>/<robot>_ws
, you can use robot_env --overlay <robot>
to load your personal overlay to the workspace of <robot>
using a single command. You can optionally load the workspaces manually by calling source /opt/robots/<robot>/setup.bash
or source any other custom workspaces, for example, from your home folder.
For example, if you wanted to use your own packages that are in /home/<user>/<your_catkin_ws>/
with the Fetch robot, you need source your personal workspace after loading the robot environment:
$ robot_env fetch $ source /home/<user>/<your_catkin_ws>/devel/setup.bash
You will now have access to the global installation of ROS kinetic, Robot House ROS packages, Robot House Fetch packages, and your own packages in /home/<user>/<your_catkin_ws>/
. Alternatively, if you named your workspace /home/<user>/fetch_ws
, you can use a single command:
$ robot_env --overlay fetch