Testbed for Experiments with Adaptation in Smart Cyber-Physical Systems

This software package includes sources of the artifact used to support paper at SEAMS 2016. The artifact contains sources of simulation platform based on Robotic Operating System(ROS), Stage robot simulator and OMNeT++ network simulator.

The testbed comes with a demo application focused on robotic cleaning. This file includes description of the provided sources and instructions how to setup the environment in which the demo can be executed. As the instructions are quite complicated, virtual machine with ready to run demo is also included.

Artifact structure

  • index.md - This text as Markdown.
  • index.html - This text as HTML.
  • seams2016-adaptation-testbed - Sources of demo application described in paper (Autonomous Cleaning Robots Coordination problem).
  • ROSRemote - Sources of remote simulation runner used by demo application.
  • ROSOMNeT++ - Sources of OMNeT++, INET based simulation of 802.15.4 radio device with ROS interface.
  • catkin_workspace.tar.xz - Catking workspace with custom ROS messages. Needed for ROSOMNeT++
  • omnet.tar.xz – OMNeT++ is a third party library for running network simulations. This version includes special fixes for this application.
  • inet.tar.xz – INET is a third party OMNeT++ module. This version includes special fixes for this application.
  • SEAMS2016Artifact.ova – Virtual machine with preconfigured example.

The sources included in this artifact are not self-contained. In order to setup the running system itis necessary to download additional libraries and tools as described in Getting Started section.

Getting started

This section describes how to setup the demo application together with simulation platform needed to run it. The installation process described here will expect the application and simulation platform to be deployed on single machine. This is due to additional hassle of configuring firewalls.
Due to the installation process complexity the virtual machine with fully installed simulation platform and demo application is provided. Running the demo application within the VM should be matter of few clicks. Thus this section has two subsections. First one is for those who want to see the application running within minutes using virtual machine. The second one is expected to be used by researchers who want to customize the simulation platform for their own projects.

Getting started with provided virtual machine (easy way)

Operating system and login information

  • Operating system: Xubuntu
  • Username: seams
  • Password: seams
  • Password-less sudo - no security
  • 2-4 core CPU
  • 4-8 GB of RAM

Run instructions

  1. Import VM (All major virtualization tools should support it)
  2. Start the VM
  3. Eclipse will start when XUbuntu starts
  4. Run ServerRunner (in recent launches in the Eclipse menu)
  5. Run GarbageCollectDemo (in recent launches in the Eclipse menu)
  6. The demo should run
    1. Stage window should open showing the map and robots (colored circles)
    2. After a while roots should start moving
    3. This simulation runs for about 10 minutes
    4. On exit, some exceptions related to network connections may be logged in the console, this is normal and does not indicate error.
    5. “results” directory in demo project will contain report for the completed run.
    6. If the demo is to be run again it is not necessary to restart the ServerRunner.

Getting started by compiling the project from sources (hard way)

  1. Install Xubuntu (Most probably another Debian based distribution will work the same way)
  2. Setup ROS indigo repository manual
  3. sudo sh -c ‘echo “deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main” > /etc/apt/sources.list.d/ros-latest.list’
    sudo apt-key adv —keyserver hkp://pool.sks-keyservers.net —recv-key 0xB01FA116
    sudo apt-get update
  4. Install ROS and Stage
    sudo apt-get install ros-indigo-turtlebot-stage
  5. Install rviz (optional)
    sudo apt-get install ros-indigo-desktop
    sudo apt-get install ros-indigo-rviz
  6. Compile OMNeT++ and INET from source attached in the artifact (or use upstream version once 802.15.4 is mature enough)
    1. Install dependecnies
      sudo apt-get install bison
      sudo apt-get install flex
      sudo apt-get install g++
    2. Compile sources
      cd /path/to/omnet
      source setenv
      ./configure
      make
      cd /path/to/inet
      make makefiles
      make
  7. Configure environment
    • Add this to .bashrc if you are using VM
      LIBGL_ALWAYS_SOFTWARE=1
    • Add this to .bashrc
      source /opt/ros/indigo/setup.bash
      source ~/path/to/catkin_ws/devel/setup.bash
      export ROS_MASTER_URI=http://localhost:11311
    • Reopen console (apply new .bashrc)
  8. Compile ROSOmnet++
    cd /path/to/omnet
    source setenv
    cd /path/to/rosomnet
    make makefiles
    make
    ln –s /media/sf_ROSOMNeT++ `pwd`
  9. Install java 8
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
  10. Install eclipse
    • Mars is recommended as it contains maven and git
  11. Running eclipse
    • Run eclipse from commendline beacuse of the environemnt variables
  12. Import ROSRemove and seams2016-adaptation-testbed projects
    • Dependencies are downloaded from maven
  13. Run ServerRunner (in recent launches)
  14. Run GarbageCollectDemo (in recent launches)
  15. The demo should run
    1. Stage window should open showing the map and robots (colored circles)
    2. After a while roots should start moving
    3. This simulation runs for 10 minutes
    4. On exit some exceptions related to network connections may be logged in the console, this is normal and does not indicate error.
    5. “results” directory in demo project will contain report for the completed run.
    6. If the demo should be run again it is not necessary to restart the ServerRunner.

Modifing demo scenario

This section expects the steps from Getting started section to be already completed. Thus demo application can be executed. All the statements in this section are relative to the SEAMS2016ROSSimDemo project.

Simulation parameters

Naturally all the parameters of the simulation can be changed in the source code. The most important file for changing simulation parameters is GarabgeCollectionDemo.java. GarbageCollectDemo class defines several constants that can be used to tune simulation. For instance it is possible change robot count, colors and initial positions. It is also possible to change count of intial goals. In theory it might be also interesting to change how the goals are generated. Moreover it is possible to switch DEECo simulation plugins. One of possible changes is commented out in the source code. By toggling comments on lines 93 and 94 it is possible to switch network device implementation from OMNeT++ based to even less realistic fake networking. This may be of good use as it saves performance and provides more deterministic communication. Such less realistic communication can serve well for early development stages when the application cannot cope well with network failures. Finally it is possible to change constant which says how long the simulation should run.

Component knowledge

Component knowledge can be extended/changed by modifications to CollectorRobot.java source file. Non-static fields which are public are considered component knowledge. The knowledge can be added just by introducing new field. Knowledge annotated as @Local never leaves the node. Thus cannot be used in ensembles evaluated on remote nodes.

Component local adaptations and processes

Local adaptation strategy implemented in the demo application can be easily extended or changed by modifications to CollectorRobot.java source file. Process is just a static method in the class. Processes are annotated with scheduling parameters and the parameters are passed using @In, @Out and @InOut annotations. See current processes for detailed information on how to write processes.

Adaptation working with knowledge of remote components

This kind of adaptation requires ensemble for knowledge mapping. AdoptedGoalRemoveEnsemble.java and BlockedGoalAdoptEnsemble.java include implementation if this mechanism for goal exchange adaptation described in the paper.

Processing collected data

Each simulation run results in creation of a file with statistic data in results subfolder in demo project. In order to process the data into figures please use python script located in the same directory. The output images will be stored in the same directory. The script can be executed this way:

	seams2016-adaptation-testbed/results$ python3 process.py
	

The output are two boxplots for number of reached targets and time until last reached goal.

Inspecting simulation at runtime

It is possible to inspect simulation progress at runtime. The map and location of the robots are displayed in the Stage simulator graphical output. Moreover it allows to drag and drop robots.
More advanced diagnostics can be achieved using rviz tool which is part of ROS installation. The tool can display almost all important data managed by ROS in nice graphical way. For instance costmaps and laserscans can be shown as overlay of static map. Unfortunately usage of this tool requires graphical acceleration which is not available in example virtual machine. Without acceleration the tool tends to work very slowly and often crashes.

Downloads

The most current state of the source code can be found at https://github.com/d3scomp/deeco-adaptation-testbed

Artifact including preinstalled VM can be downloaded from http://d3s.mff.cuni.cz/projects/components_and_services/deeco/files/seams-2016-artifact.zip

Licensing

This artifact as the whole is licensed under GPL license. Individual parts have their own license included in the package.

  • seams2016-adaptation-testbed is licensed under Apache license
  • ROSRemote is licensed under Apache license
  • ROSOMNeT++ is licensed under GPL
  • OMNeT++ and INET are using mixture of GPL-like licences. See the sources for details.

Contact

All your questions, opinions, and comments are welcome. For proposing improvements and reporting bugs, please use the issues tool on github

Vladimír Matěna matena@d3s.mff.cuni.cz
Tomáš Bureš bures@d3s.mff.cuni.cz
Ilias Gerostathopoulos iliasg@d3s.mff.cuni.cz
Petr Hnětynka hnetynka@d3s.mff.cuni.cz
Logo of Faculty of Mathematics and Physics
  • Phone: +420 951 554 267, +420 951 554 236
  • Email: info<at-sign>d3s.mff.cuni.cz
  •  
  • How to find us?
Modified on 2017-02-27