Please do not change the basic networking settings (several students and employees use the rovers). However, you can propose and implement better solutions in consultation with Denise.
Connect to dagobert
dagobert
runs Ubuntu with ROS and provides an access point when
started. Denise manages the accounts and connection details (SSID, fixed IP,
personal username and password) -> contact for account creation.
Connect to dagobert
’s SSID and ssh to the rover.
Setup ROS network
It is more convenient to run your developed nodes on your own notebook and just start the Pioneer driver on the rover (communicate with the rover directly via ROS). This way you don’t have to develop on the rover directly, i.e., you don’t need an internet connection, you don’t have to copy/pull code, the rover remains “clean”, etc.
For that to work you need to be able to ssh dagobert
and ssh your-notebook
vice versa (you will need openssh-server
installed on your notebook).
-
Select a static IP for your notebook.
-
Add
dagobert
to your/etc/hosts
file and addyour-notebook
to the/etc/hosts
of the rover. -
Add
dagobert
and your username to your ssh config, e.g. (you can choose a specific ssh-key-pair by settingIdentityFile .ssh/id_rsa
additionally):Host your-notebook HostName your-notebook User your-username-on-your-notebook
Do vice-versa on
dagobert
’s.ssh/config
. -
Create SSH key of type
rsa
. -
Exchange ssh-keys such that you can ssh without password-prompt. Unfortunately, ROS connections can only be established with RSA keys (known_hosts error).
-
If you already connected to the rover, by default the ECDSA key is added to the
known_hosts
in~/.ssh
. You have to remove these keys withssh-keygen -R "dagobert"
orssh-keygen -R "dagobert-ip-address"
. -
Then copy your notebook’s public key using RSA:
ssh-copy-id -i /path/to/id_rsa.pub -oHostKeyAlgorithms='ssh-rsa' dagobert
. You should be asked to verify the RSA fingerprint. If there occurs another warning you may have missed to delete a key inknown_hosts
. You may have to ssh first (with rsa) and then copy the id. -
The public key of your notebook should now be in the
.ssh/authorized_keys
file of your account ondagobert
. -
Perform the same for
dagobert
vice versa, i.e., callssh-copy-id
toyour-notebook
.
-
See also ROS on multiple machines and ROS network setup.
Test ROS network
The pioneer_teleop
package in the general-ros-modules
repository includes a launch
file to control the robot via your notebook (keyboard). It starts the
p2os driver on the rover which controls the
motors given velocity commands (ROS topic cmd_vel
).
Clone the repository in your catkin workspace (typically, ~/catkin_ws/src/
)
and build it. Connect to the rover’s WLAN and execute the launch file on your
notebook (this will run the ROS master, teleoperation and additional nodes on
your notebook and only the driver on the robot):
$ roslaunch pioneer_teleop drive.launch \
notebook:=your-notebook robot:=dagobert \
robot-distro:=hydro robot-port:=/dev/ttyS0
For the tele-operation to work, the notebook has to know the messages from the
rover, i.e., install ros-<distro>-p2os-msgs
.
On 17.04 the following error occured: pycrypto not installed. This error
vanished when I installed python-pip
.