No description, website, or topics provided.
C++ CLIPS Makefile Protocol Buffer Python C Other
Switch branches/tags
Nothing to show
Clone or download
svenschneider Merge pull request #1 from moriarty/ubuntu-1604
[Ubuntu 16.04] Updates for building on 16.04
Latest commit 35fb9ac Mar 8, 2017

@Work Referee Box

This is the repository of the referee box for Work competitions.


  1. Overview
  2. Installation
  3. Configuration
  4. Usage


The Central Factory Hub, or RefBox (as it's commonly called) is an application which provides interfaces for communicating with devices and robots in the @Work arena. The RefBox itself isn't doing automated refereeing (yet), however it does generate task specifications to ensure the referees are not being biased. The RefBox keeps track of the time, and makes sure the task specification is given to the team when the timer starts, and not earlier. To communicate with devices in the arena, like rotating tables, teams send commands to the Referee Box, and the Referee Box acts as a proxy between the devices ensuring the communication is logged, and done appropriately. The Referee Box can accept control commands from the referees, and will not accept control commands from teams.

The refbox has two types of clients with which it communicates differently either UDP or TCP. UDP communication is used between the RefBox and the teams, because this is a wireless communication channel and isn't reliable (especially on site at a competition). TCP is used for the devices which are controlled by the Referees and Technical Committee.

The refbox application itself works in the background and only prints some log output to the console.

To view the status of the Central Factory, you must launch the atwork-viewer. To control the Central Factory, launch the atwork-controller.


The Work Central Factory Hub (CFH) can be installed on most Linux distributions. However, some require dependencies being built from source. The currently supported setup is Ubuntu 14.04, with Boost 1.54. For other non-supported distributions and setups see Alternative Installation Hints at the end of this readme.

Officially Supported Setup: Ubuntu 14.04, Boost 1.54

Note: Ubuntu 16.04 requires some addition steps because legacy mongodb is required.

  1. Add Tim Niemueller's PPA:

     sudo add-apt-repository ppa:timn/clips

    (Note: This PPA currently only works for Ubuntu 12.04, 12.10, 14.04 and 16.04)

  2. Install the dependencies for both LLSFRB and CFH (12.04, 12.10, 14.04):

     sudo apt-get update
     sudo apt-get install libmodbus-dev libclips-dev clips libclipsmm-dev \
                          protobuf-compiler libprotobuf-dev libprotoc-dev \
                          libmodbus-dev \
                          libglibmm-2.4-dev libgtkmm-3.0-dev libncurses5-dev \
                          libncursesw5-dev libyaml-cpp-dev libavahi-client-dev git \
                          libssl-dev libelf-dev mongodb-clients \
                          mongodb libzmq3-dev

    (If using 14.04 or older, use boost1.54 and mongodb-dev)

     sudo apt-get install mongodb-dev boost1.54-all-dev

    (If using 16.04, use default boost, and install legacy mongo-cxx-driver from source)

     sudo apt-get install scons libboost-all-dev
     git clone
     git checkout legacy-1.1.2
     sudo scons --prefix=/usr/local install --disable-warnings-as-errors

    (Note 1: Boost 1.54 is specified to avoid causing apt-get broken package problems with ROS. If you are using another version of Boost see Alternative Setup.) (Note 2: Instructions for legacy mongo-cxx-driver can be found here: )

  3. Clone this repository:

     git clone
  4. Build the Central Factory Hub:

     cd atwork_central_factory_hub
  5. Go to Configuration Section before running the CFH.


Usually, the refbox application running on another computer on the same network as the robot. In the case, send-port and recv-port are not used, instead only port is needed.

There are several configuration values which need to be changed depending on the network IP addresses. The default values are:

  • llsfrb/shell/refbox-host: !ipv4 localhost
  • llsfrb/comm/public-peer/host: !ipv4
  • llsfrb/comm/teamname-peer/host: !ipv4

Note: the public-pear and team-pear both have the same host ip. This value is set to the broadcast address, not the IP address, it always ends in 255. For example:

user@ubuntu$ ifconfig

virbr0    Link encap:Ethernet  HWaddr de:c9:5a:c2:6b:43  
          inet addr:  Bcast:  Mask:

Because my subnet Mask is and my Broadcast address is: I would set the host configuration value to

Typical Configuration for testing in your own lab

(at competition the TC/OC will configure the RefBox).

  1. Configure the CFH with your editor

     editor ./cfg/config.yaml

    For testing the following changes are common:

    • Change the CFH IP address in section "shell", this should be where you're running the CFH. Other machines communicating with the CFH need this value set correctly.

        refbox-host: !ipv4 localhost
    • If the robot software or CFH clients (e.g. GUIs) are running on the same machine as the CFH (e.g. local testing), toggle the comments on "port" or "send-port" and "recv-port". Use "port" when communicating between different machines, use "send-port" and "recv-port" when communicating with the same machine.

      • For CFH Clients the "path" of the configuation properties is "llsfrb/comm/public-peer"

          host: !ipv4
          #port: !udp-port 4444
          send-port: !udp-port 4444
          recv-port: !udp-port 4445
      • For CFH Peers (robots) the "path" of the configuration properties is "llsfrb/comm/[TeamName]-peer"

          host: !ipv4
          #port: !udp-port 4448
          send-port: !udp-port 4448
          recv-port: !udp-port 4449
    • disable mongodb (No messages will be logged): It is useful to have mongodb enabled when debugging but it uses a lot of harddrive space after a while.

          enable: false

Full configuration details and explainations are found in the following PDF documentation:

Only a few common options are outlined here.


  1. Start the RefBox: ./bin/refbox
  2. Start the controller: ./bin/atwork-controller
  3. Start the viewer: ./bin/atwork-viewer