How to use two real iCub robots on the same network
How to use two real iCub robots on the same network¶
This page is intended to be used as a practical guide for setting up two real iCub robots together on the same network to run controllers designed for two of them. Ideally, the steps can be extended to multiple robots without any more changes.
The following steps are done using
iCubGenova02 (aka Purple) and
iCubGenova04 (aka Green). The two major modifications are on the Network side and Configuration side.
The first conflict is that both the robots can be accessed by logging into the head using
ssh icub-head with the same ip (
10.0.0.2). So, while two robot have to be on the same network this has to be changed.
The robots network configuration is set using netplan. Do
ssh icub-head and go to
/etc/netplan directory. The configuration files for netplan are yaml based. The configuration file loaded by default is
50-icub.yaml and its contents are:
Now, change the ip address
10.0.0.2 to some other ip address such as
10.0.0.200. Once the ip address is change do
sudo netplan apply to load the new network configuration file. At this point you will not be able access icub-head any longer and you need to to
ssh 10.0.0.200 to reach the head of the robot.
NOTE 1: Ensure to switch the ip address back to the original default ip value of
10.0.0.2 and do
sudo netplan apply once the experiments with the robot are finished.
NOTE 2: Previously the network was configured without using netplan. You can can find the instructions in the history of this wiki page.
Robot configurations side¶
To launch an icub robot multiple configuration files are launched through
yarprobotinterface. In general, these files are robot specific (Eg. iCubGenova02) and contains parameters tuned for
that particular robot. But the port names used in all these configuration files are usually the same. So, while trying to launch multiple robots on the same network, port address conflict happens. This issue can be solved by using different port prefix names in the configuration files, e.g. changing from
icub to more robot specific like
iCubGenova04. An example can be found in dic-iit/robots-configuration/icub02-prefix were the
iCubGenova02 configuration files have been updated in order to run
icub_wbd.xml application with all the port prefixes changed to
In particular, the following files have to be changed:
- Update robot
yarprobotinterfaceport prefix (e.g. dic-iit/robots-configuration@91b2ee0)
- Update nterfaces wrapper port prefix (e.g. dic-iit/robots-configuration@47d6a1b)
- Add port prefix to whole-Body-Dynamics (e.g. dic-iit/robots-configuration@0808181), by adding the following line:
and adding the prefix to external wrench port names e.g.
- Update cartesian controllers port prefix (e.g. dic-iit/robots-configuration@fe05701)
As a simple test, you can launch
yarpmotorgui --robot <robot-prefix> to try to control the robot, and check all the opened ports with
yarp name list.