User Tools

Site Tools


tools:logger:start

This is an old revision of the document!


Logging

The safety system is key to the EEROS framework. It regulates all interaction with the HAL (Hardware Abstraction Layer) and uses a safety level to determine the future course that the robot should take. If the situation becomes less safe, the robot may have its movement restricted to avoid damaging nearby people, materials, or itself.

All critical hardware inputs are read and all critical hardware outputs are driven by the safety system. So called safety levels exactly define in which state a robot can be. Such a level could be initializing, homing or running.

How it works

The most important function of the safety system is its run method. This method is called periodically by the executor. Here's how it works:

  void SafetySystem::run() {
 
    // 1) Read inputs and check them
    for(auto ia : level->inputAction) {
      if(ia != nullptr) ia->check(&privateContext);
    }
 
    // 2) Execute level action
    if(level->action != nullptr) level->action(&privateContext);
 
    // 3) Set outputs
    for(auto oa : level->outputAction) {
      if(oa != nullptr) oa->set();
    }
  }
tools/logger/start.1486116900.txt.gz · Last modified: 2017/02/03 11:15 by graf