|Mergeable nervous systems for robots: source code for the robot controllers|
|Nithin Mathews, Anders Lyhne Christensen, Rehan O'Grady, Francesco Mondada, Marco Dorigo|
|Here we provide the source code of the
robot controllers we used to conduct the experiments presented in
the paper. The robot controllers are programmed using a forked
version of ARGoS2 -- the predecessor of the open source project ARGoS3 (or just ARGoS) that can be used to develop
controllers for both simulated and real robots. In this study, we used the forked version to develop controllers for a standard
marXbot and a marXbot with a magnetic gripper. This ARGoS version includes multiple customizations such as (i) the
possibility for the user to interact with the robots (to inject
faults) and with the stimulus (light source) during an ongoing
simulation using built-in UI-elements, (ii) the real time
visualization of messages sent through a merged nervous system
(MNS) and the body plan available to the brain robot, (iii) the use
of a behavioral toolkit
enabling seamless reusage and combination of independent behavioral
components, (iv) the implementation of SWARMORPH-script,
and (v) wireless Ethernet-based communication for physically
attached real (i.e., not simulated) marXbots.
The ARGoS2 framework enables the execution of MNS controllers both in simulation and on the real marXbots. Follow these steps to acquire ARGoS2 and to set up the MNS experiments on a Linux-based system.
Make sure your system meets these requirements in terms of required libraries and packages:
For systems that support apt-get, executing the following command line should be sufficient to meet the requirements:
Download and extract the source tree:
Compile the simulation framework:
In order to compile the controller for the real marXbot (also referred to as "foot-bot"), download the toolchain from https://wiki.epfl.ch/mobots-robots/toolchain. Then, untar the corresponding archive on your computer such that the toolchain gets installed at
Please refer to this document to see how you can copy and execute the controller on a real marXbot. The document also provides assistance in case of issues related to the cross-compilation of the controller.
Test your setup by running the first experiment:
When executed, the experiment shows the formation of an "x"-like MNS-robot composed of 9 robots. The formation is initiated by a brain robot (pre-defined in
Follow the instruction provided in this document to see how the same controller can be executed on real marXbots. All MNS-related logic is compiled into a single controller called
Figure 1. Snapshot of the experiment executed using simulated (left) and real marXbots (right). The result of the real robot experiment can be also seen in this video. Click on the images for an enlarged view.
Running the experiments presented in the paper using ARGoS2Body representation. When a merge between two MNS robots occurs, only a single message needs to be passed up the merged nervous system from the connecting MNS robot to the brain of the MNS robot to which it connects. The information contained in the message is incrementally updated by each intermediate unit with local topological information, and the newly formed MNS robot incorporates all the sensing, actuation and computational capabilities of the units in the new body. In this experiment, two differently configured marXbots (one has a magnetic gripper able to grip previously prepaired objects) merge into a single MNS robot. Note that marXbots able to grip other objects are not implemented in simulation -- the experiment can therefore only be executed using real robots. Copy the files
The mergeable nervous system concept. MNS robots are able to physically connect to one another and thereby merge into larger MNS robots of different shapes and sizes. First, MNS robots consisting of a single robotic unit self-assemble into a larger spiral-shaped MNS robot with a single brain unit. Then, the MNS robot splits and each of its robotic units becomes a one-unit MNS robot. The process is repeated three times during which the MNS robots merge into three larger MNS robots with different shapes. Execute the following command to run the experiment in ARGoS2:
Morphology-independent sensorimotor coordination. Independently of shape and size, MNS robots display consistent sensorimotor reactions to a stimulus, whilst autonomously merging their bodies and robot nervous systems. We programmed the robotic units so that when a green stimulus (of which the position and color can be changed during simulation using the UI-elements on the top) enters a robot’s sensor range, the robot "points" at the stimulus by illuminating its three closest green LEDs (in a composite MNS robot, these are the closest LEDs on the closest constituent robotic unit). When the stimulus is "too" close (i.e., proximity to any part of the MNS robot’s body exceeds a threshold), the robot retreats from the stimulus. Execute the following command to run the experiment in ARGoS2:
A self-healing MNS robot. The experiment forms an "x-"like shape. When fault is injected in the brain or any other unit (for instance by inputting the marXbot ID into the input field on the top in ARGoS2), the MNS robot detects the fault and self-heals from it using a heartbeat mechanism. Execute the following command to run the experiment in ARGoS2: