Airserver process which runs on the pneumaticbox

Name Last Update
3rdparty/BBBIOlib Loading commit data...
clients Loading commit data...
files Loading commit data...
include Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
CONTRIBUTORS.txt Loading commit data...
LICENCE.txt Loading commit data...
README.md Loading commit data...
adding a controller.md Loading commit data...
makefile Loading commit data...
rename.sh Loading commit data...
setup-ubuntu.sh Loading commit data...
setup.sh Loading commit data...

What is the pneumaticbox-airserver?

This software is a server that provides an environment to configure/start/stop controllers, schedule control signals and monitor signals remotely.

Its main purpose is to separate controllers with strict (ms-level) timing requirements from higher level code with less strict timing requirements.

The Airserver provides a set of signals which controllers can be connected to. All signals are global, and are referenced by a unique Integer. Many signals have a special meaning, such as the ones that control the hardware. Others can be used freely by the clients.

Controllers are created by configuring parameters and assigning them a global controller ID. During configuration, the controller also gets told which signals to use for input and output.

All controllers have an internal state, they can be active or inactive. The intended use pattern is to configure all required controllers in a setup phase, and only activate or deactivate controllers during control.


  • Remotely configurable and reconfigurable control setup. No application-specific data are stored on the server side.
  • A set of controller components dedicated to pneumatic control
  • A set of software safety components (such as one for limiting channel pressure) to avoid catastrophic outcomes (such as exploding actuators) from simple mistakes on the client side
  • Abstraction of hardware I/O into easily accessible signals
  • Jitter-free synchronous scheduling via absolute scheduling timestamps and timeserver synchronization
  • Relative scheduling of signal events for easy hacking (accepting jitter and network delays)
  • Remote monitoring of arbitrary signals up to the time step resolution, timestep-perfect sampling possible, scheduling start and stop of sampling
  • Handles multiple clients, e.g. one client for active control and one for monitoring signals
  • Control loop execution times are aligned to full milliseconds, making it possible to schedule perfect timing of signal changes, i.e. 1-timestep Dirac pulses
  • Scheduling of signal trajectories, i.e. scheduling signal changes in the near future; This avoids network jitter and decouples non-RealTime clients from RT control
  • Small codebase, making server execution very reliable.

API Version Major Changes #

##API Version 9 ##

  • adds mass controller
  • increase number of messages per second being parsed at most from 20 to 100

Backwards compatibility: API8 clients can use API9 server

API Version 8

  • The EmergencySoftStop state is now exposed via a read-only client signal. I.e. clients can now monitor E-stop state
  • The server advertises its version to the client upon connect, by sending a MsgAdvertiseVersion message. Clients can use this to check backwards/forward compatibility
  • MsgReset now doesn't remove signal subscriptions bound to other connections. I.e. monitoring-only scripts do not stop working when reconfiguring/resetting the pneumaticbox
  • Adds Bang-Bang controller for controlling a compressor via compressor pins

Backwards compatibility: none

API Version 7

  • refactor configuration messages, replaces old monolithic messages with controller-specific ones

Backwards compatibility: none

#Installation Instructions#

##Compilation For compiling, simply use:


##Airserver Installation For installing on a systemd based system, use:

make install_systemd

For older upstart-based Ubuntu's use:

make install_upstart

It will ask you for sudo as the executable needs to be made SUID root.

##Installing from scratch

Please read the file files/startup.sh

###Automatic Startup

The folder files/etc contains boot scripts for both systemd and upstart, copy them into /etc accordingly.

##Necessary Hardware reconfigurations

You need to change the Devicetree overlays of the BBB. In /boot/uEnv.txt, disable loading the HDMI overlays:

##Disable HDMI

##Build Dependencies:

* apt-get install libboost-system-dev

* g++ version>4.6

##Change to g++-4.7 on Debian 7:

sudo update-alternatives --remove-all g++
sudo apt-get install g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
sudo update-alternatives --config gcc  #select 4.7 as default

##ADC Bias Calibration

The airserver reports the raw adc values on startup. To calibrate the ADC, copy the values as a space separated list of integers into:


If the file exists, the airserver will subtract these values from the ADC signal.


This software is distributed under the BSD Licence. See LICENCE.txt for details.