Sensor Data
SentiUtils will read and parse the sensor data stream output from the SentiBoard, converting these data to specific Google Protobuf messages.
The Protobuf messages will be primarily communicated through a UDP socket. Some details describing this data stream can be found in the section below.
SentiSystems Message Description
Each Protobuf message output from SentiSystems will be prepended with a synchronization byte, the incoming protobuf message ID, and the length (in bytes) of the Protobuf packet.
That is:
<SYNC_ID><Header.MessageID><message_length><Protobuf message>
The SYNC_ID
is set to 0x42
.
See the Protobuf Documentation page for more information and details.
Time Reference
If a time_source
is set in the sentiutils
config, and the sensor connected to the chosen time_source
provides sufficiently accurate time information (e.g for GNSS receivers this means having a fix
), all measurements will be referenced in UTC, using SentiBoard timing accuracy. All connected sensors will be timed by the SentiBoard, but referenced in the time_source
reference time frame.
If there is no time_source
, or if the receiver has not been able to acquire a GNSS fix, the measurements will all be referenced in SentiBoard`s timeframe, which is a 32-bit internal register ticking at 100MHz, wrapping approximately every 42 seconds (every $(2^{32})*10$ nanoseconds, to be exact).
Storing Sensor Data
By default, SentiUtils will not store any sensor data to disk. Hence, in order to record the data, connect your external software of choice to the SentiUtil's UDP data stream, and write the data to disk from there.
Tip
If you're using the senti_com ROS1 package, you can record all data in a rosbag
. Run rosbag record -a
from a terminal or add it to your launch file. For ROS2 run ros2 bag record -a -o my_bag
.
The included scripts/senti_dump.py
can be used to write all sensor data packets coming from the SentiBoard to disk. This data will include SentiBoard synchronization and timing information. The resulting data file can then be fed into sentiutils
executable at a later time for data replay.
Warning
Please make sure sentiutils
is not running while using the script/senti_dump.py
script. Only one software instance can have access to the SentiBoard's data port (/dev/ttySentiboard02
) at any given time.