RobotSystem-Lite
Loading...
Searching...
No Matches
Sensor Configuration

The sensor-level configuration (see Configuration Levels is read using the data I/O interface

Any configuration file/location path must be provided without its format extension, and relative to /config/sensors/

The possible configuration fields and their values are here exemplified for the case of a JSON format configuration (optional parameters are presented with default values and marked with '[o]' in their description):

{
"inputs": [ // List with input sources ("in0", "in1", ..., respectively) parameters
{
"interface": { // Hardware/virtual interface properties
"type": "<library_name>", // Path (without extension) to plugin with signal input implementation (loaded from MODULES_DIR/signal_io/)
"config": "", // [o] Signal input/output device identifier passed to plugin initialization call
"channel": 0 // Device channel from which input values will be read
},
"signal_processing": { // [o] Internal signal processing options
"rectified": false, // [o] Rectify signal if true
"normalized": false, // [o] Normalize signal (after calibration) if true
"min_frequency": -1.0 // [o] Low-pass filter cutoff frequency, relative to (factor of) the sampling frequency (negative for no filtering)
"max_frequency": -1.0 // [o] High-pass filter cutoff frequency, relative to (factor of) the sampling frequency (negative for no filtering)
}
}, ...
],
"output": "in0", // [o] String with math expression for conversion from sensor inputs to output (like "tanh( in0 - in1 )")
// Possible operations are the ones supported by TinyExpr library: https://codeplea.com/tinyexpr
"log": { // [o] Set logging of inputs and measurement numeric data over time
"to_file": false, // [o] Save data logging to <log_dir>/[<user_name>-]<sensor_name>-<time_stamp>.log, to log file
// Default value will set terminal logging
"precision": 3 // [o] Decimal precision for logged numeric values
}
}