rawlog-grabber is a command-line application which uses a generic sensor architecture to collect data from a variety of robotic sensors in real-time taking into account the different rates at which each sensor may work. All the data is time stamp-sorted and dumped into a Rawlog file.
This program creates one thread for each sensor declared in the config file and then saves the timestamp-ordered observations to a rawlog file. The valuable utility of this program is to collect datasets from mobile robots for off-line processing.
The available "sensor drivers" are all those classes derived from mrpt::hwdrivers::CGenericSensor. See also the list of sensors and devices supported by MRPT.
rawlog-grabber <config_file.ini>
The configuration files must contain one mandatory [global] section with common parameters:
[global]
// The prefix can contain a relative or absolute path.
// The final name will be ${rawlog_prefix}_${date}_${time}.rawlog
rawlog_prefix = dataset
// Milliseconds between thread launches
time_between_launches = 800
// SF=1 (or "true"): Enabled= Observations will be grouped by time periods.
// SF=0 (or "false"): Disabled= All the observations are saved independently
// and ordered solely by their timestamps.
use_sensoryframes = false
// Only if "use_sensoryframes=1": The maximum time difference between
// observations within a single sensory-frame.
SF_max_time_span = 0.25 // seconds
// Observations will be processed at the main thread with this period
GRABBER_PERIOD_MS = 1000 // ms
Then, a variable number of sections must follow, one for each desired sensor, with all the parameters for each of the sensor classes. The basic structure of these "sensor sections" is:
[SECTION_NAME] driver = CLASS_NAME process_rate = PROCESS_RATE // Hz sensorLabel = SENSOR_LABEL // the rest of sensor-specific parameters.... (See the class Doxygen docs)
Some notes:
Several sample configuration files are already shipped with MRPT so you don't have to start from scratch. Take a look at them here:
http://browse-code.mrpt.org/stable/share/mrpt/config_files/rawlog-grabber/