RoboCup Logistics League Simulation

RCLL Simulation RoboCup is particularly well-known for its soccer leagues, but there are an increasing number of application leagues. The newest one is the RoboCup Logistics League (RCLL) where groups of robots take on the task of in-factory production logistics. It has two unique aspects: a game environment which itself acts as an agent and a focus on planning and scheduling in robotics. We propose a simulation based on Gazebo that takes these into account. It uses the exact same referee box to simulate the environment reactions similar to the real game and it supports multiple levels of abstraction that allow to focus on the planning with a high level of abstraction, or to run the full system on simulated sensor data on a lower level for rapid integration testing. We envision that this simulation could be a basis for a simulation sub-league for the RCLL to attract a wider range of participants and ease entering the robot competition.

On this page we show how to get started with the RCLL simulation in Gazebo and how to connect the simulation with the robot software. Furthermore, this page provides a visual comparison between simulation and the real logistic league some test results additional to the publication.

Publication

In the paper "Simulation for the RoboCup Logistics League with Real-World Environment Agency and Multi-level Abstraction" we give an introduction to the RoboCup Logistics League and Gazebo, describe the concepts and architecture behind the RCLL simulation, how the simulation can be interfaced and how comparable the simulation is to the real world.

We use the simulation in the Carologistics Team for testing (especially for agent and behavior development and integration) and multi-agent strategy evaluation, which would not be practicable in this scale without the simulation. We have integrated a connection to the simulation in Fawkes, where the robot software can operate as on a real robot, but the simulation can also be interfaced with other software.

Simulation of the Logistic League with Gazebo

The simulation allows testing and debugging of a robot software system as well as multi-agent strategy evaluation for RCLL agents. The main goals of the simulation are realism, compatibility with the real robot, expandability, allowing multi-robot strategy evaluation and multi-level abstraction. Multi-level abstraction is the ability to choose to either simulate low-level sensor data or to directly extract higher-level information.

Architecture

RCLL Simulator Architecture

Architecture overview of the simulation; blue means Gazebo plugins, red models, green Gazebo API and middleware, orange are components connected via protobuf middleware. The robots are driven by a system like Fawkes or ROS, referee box and visualization operate and visualize the environment.

How to setup the simulation

How to install and start Gazebo is described in the Gazebo Wiki.
To setup the simulation and connect it to Fawkes, you can use this guide.
It is also possible to connect the simulation to ROS or any other robot software. You can use the Gazebo Transport API and follow this guide.

Performance and Evaluation

The CPU usage of the simulation for one game on a desktop with an Intel Core i7-3770 at 3.40 GHz with 16 GB of RAM is shown in the following graph. The system was utilized at about 60\% of capacity including the simulation and 3 simulated robots. The X axis shows the system time during the experiment. The Y axis areas show percent of CPU time used stacked on top of each other, each robot area comprises all components necessary to play the game. The simulation operated in this game with real-time speed.

The simulation can provide sensor data with noise, simulate manipulation and robot motion with similar speed and accuracy as shown below and generate camera images our perception system can work with as with images from the real robot. An important point is that the environment reacts exactly the same as in the real world, because the same refbox is used to control it. After we participated in the German Open 2014, we compared our actual game results with simulation results from multiple runs. We ran the same software versions as in the last five games, the only differences being that the hardware accessing modules have been replaced by simulation modules and machine-signal perception is given by the simulation. The system achieved an average score of 75.3 points with a standard deviation of 10.1 in ten simulation runs and 61.6 with a standard deviation of 11.6 in the real environment. Note that the ten points per game for commenting during the RoboCup are not included in this average. While this is certainly not an exhaustive comparison, we believe that the data provides strong evidence that the simulation behaves accurately compared to the real world.

Furthermore, we have compared trajectory repeatability in simulation and the real world. The figure below shows the concave hull around position information (robot's self-localization) recorded at 1Hz during ten back and forth drive operations between machines M1 and M12. As we can see the overall trajectory execution is similar with only small differences at larger free areas where higher speeds can be achieved.

The following images are for an older version of the simulation and gameplay from 2014.

Trajectory comparison between simulation and real-world Trajectory comparison of real world moves (blue) and simulated moves (red) on a half field.

Simulated webcam image of an RCLL machine for signal detection Simulated webcam image of an RCLL machine for signal detection

Real webcam image of an LLSF machine for signal detection The same situation in the real world without an RFID reader at the machine (black box)

How to interface the simulation

The following table shows simple code examples how to interface of the simulation can be used in Fawkes or an other robot software framework on different abstraction levels (e.g. Laser data for localization as low abstraction level and the robot position as high abstraction level).

in a Fawkes plugin in ROS or other robot sofware frameworks
High Abstraction Level
#include <aspect/logging.h>
#include <aspect/blackboard.h>
#include <interfaces/Position3DInterface.h>


using namespace fawkes;


void log_localization()
{
  Position3DInterface *pose_interface = 
    blackboard->open_for_reading<Position3DInterface>("Pose");
  pose_interface->read();
  logger->log_info(name(), "Localization (%f,%f)",
	      pose_interface->translation(1),
	      pose_interface->translation(2));
  blackboard->close(pose_interface);
}


#include <gazebo/transport/Node.hh>
#include <gazebo/msgs/msgs.hh>
#include <gazebo/transport/transport.hh>
#include <stdio>

void on_localization_msg(ConstPosePtr &msg)
{
  printf("Got new localization msg (%f,%f)",
     msg->position().x(), msg->position().y());
}

void init_sim_localization()
{
  gazebo::transport::NodePtr node(new gazebo::transport::Node());
  node->Init("/gazebo/LLSF/robotino2");

  gazebo::transport::SubscriberPtr localization_sub_ = 
    node->Subscribe( "/gazsim/localization/",
    &on_localization_msg);
}
Low Abstraction Level
#include <aspect/logging.h>
#include <aspect/blackboard.h>
#include <interfaces/Laser360Interface.h>

using namespace fawkes;


void log_laser()
{
  Laser360Interface *laser_interface = 
    blackboard->open_for_reading<Laser360Interface>("hokuyo");
  laser_interface->read();
  for{int i = 0; i < 360; i++)
  {
    logger->log_info(name(), "Raw Laser Data from angle %d: %f",
	      i, pose_interface->distances(i));
    //use for adaptive monte carlo localization ...
  }
  blackboard->close(laser_interface);
}





#include <gazebo/transport/Node.hh>
#include <gazebo/msgs/msgs.hh>
#include <gazebo/transport/transport.hh>
#include <stdio>

void on_laser_data_msg(ConstLaserScanStampedPtr &msg)
{
  const gazebo::msgs::LaserScan &scan = msg->scan();

  for(int i = 0; i < scan.ranges_size(); i++)
  {
    printf("Raw Laser Data from angle %d: %f",
      i, scan.ranges(i));
    //use for adaptive monte carlo localization ...
  }
}

void init_sim_laser()
{
  gazebo::transport::NodePtr node(new gazebo::transport::Node());
  node->Init("/gazebo/LLSF/robotino2");

  gazebo::transport::SubscriberPtr laser_sub_ = node->Subscribe(
    "/hokuyo/link/laser/scan", &on_localization_msg);
}

Simulation from 2014

The game in 2014 looked fundamentally different (and the tasks was simpler). A video of the simulation from then is shown below for reference. We do no longer support using the old simulation environment.