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
##Compilation For compiling, simply use:
##Airserver Installation For installing on a systemd based system, use:
For older upstart-based Ubuntu's use:
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
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 optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
* 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.