For streaming input measurements, such as wheel speed, to the Vision Navigator via any UART serial or TCP port, the message format FP_B-MEASUREMENTS is used. Note that the maximum number of measurements in the same message is 10 (n ≤ 10). The message format consists of a fixed structure using little-endian signed and unsigned integers of 8, 16, and 32 bits and IEEE 754 single (32 bits) precision.
The message ID for FP_B-MEASUREMENTS is 2001 (0x07d1).
For input messages, set the message_time to 0.
The structure of the FP_B message payload is:
|
# |
Offset |
Field |
Type |
Unit |
Description |
|---|---|---|---|---|---|
|
1 |
0 |
|
uint8_t |
- |
Version of the FP_B_MEASUREMENTS message (currently 1) |
|
2 |
1 |
|
uint8_t |
- |
Number of measurements present in the body of the message (1…10) |
|
3 |
2 |
|
uint8_t[6] |
- |
Reserved for future use. Set to 0. |
|
|
|
|
|
|
The following fields are repeated |
|
4 + i·12 |
8 + i·28 |
|
int32_t |
* |
Measurement x axis (for example, [mm/s]) |
|
5 + i·12 |
12 + i·28 |
|
int32_t |
* |
Measurement y axis (for example, [mm/s]) |
|
6 + i·12 |
16 + i·28 |
|
int32_t |
* |
Measurement z axis (for example, [mm/s]) |
|
7 + i·12 |
20 + i·28 |
|
uint8_t |
- |
Validity of |
|
8 + i·12 |
21 + i·28 |
|
uint8_t |
- |
Validity of |
|
9 + i·12 |
22 + i·28 |
|
uint8_t |
- |
Validity of |
|
10 + i·12 |
23 + i·28 |
|
uint8_t |
- |
Type of measurement (see below) |
|
11 + i·12 |
24 + i·28 |
|
uint8_t |
- |
Location of measurement (see below) |
|
12 + i·12 |
25 + i·28 |
|
uint8_t[4] |
- |
Reserved for future use. Set to 0. |
|
13 + i·12 |
29 + i·28 |
|
uint8_t |
- |
Type of timestamp (see below) |
|
14 + i·12 |
30 + i·28 |
|
uint16_t |
- |
GPS week number |
|
15 + i·12 |
32 + i·28 |
|
uint32_t |
* |
GPS time of week [ms] or monotonic time [-] |
The valid meas_type values are:
|
Value |
Description |
|---|---|
|
|
Unspecified |
|
|
Velocity (wheel speed) |
The valid meas_loc values are:
|
Value |
Description |
|---|---|
|
|
Unspecified |
|
|
Measurement of a sensor at the rear-center (RC) |
|
|
Measurement of a sensor at the front-right (FR) |
|
|
Measurement of a sensor at the front-left (FL) |
|
|
Measurement of a sensor at the rear-right (RR) |
|
|
Measurement of a sensor at the rear-left (RL) |
The valid timestamp_type values are:
|
Value |
Description |
|---|---|
|
|
Unspecified |
|
|
Use time of arrival of the measurement (ignore |
|
|
Use monotonic time [any] (stored in the |
|
|
Use GPS time (stored in |
Some example programs to create a FP_B-MEASUREMENTS message:
C++:
Python:
A hexdump of the fp_b_rc.bin generated by make_fpb_measurements.c (see above):
00000000 66 21 d1 07 24 00 00 00 01 01 00 00 00 00 00 00
00000010 66 00 00 00 c2 00 00 00 dd ff ff ff 01 01 01 01
00000020 01 00 00 00 00 01 00 00 00 00 00 00 4e dd f9 a6
Let’s decompose it:
First we have the start of the FP_B frame and its meta data:
Then follows payload, which starts with a fixed-sized part:
Then follows num_meas times a measurement, consisting of a couple of fields with the data:
Finally, the message ends with a checksum across all of the above: