|
|
|
@ -121,6 +121,9 @@ private:
@@ -121,6 +121,9 @@ private:
|
|
|
|
|
struct { |
|
|
|
|
struct float_array rc_channels; |
|
|
|
|
} rc; |
|
|
|
|
struct { |
|
|
|
|
struct float_array rng_distances; |
|
|
|
|
} rng; |
|
|
|
|
} state; |
|
|
|
|
|
|
|
|
|
// table to aid parsing of JSON sensor data
|
|
|
|
@ -129,7 +132,7 @@ private:
@@ -129,7 +132,7 @@ private:
|
|
|
|
|
const char *key; |
|
|
|
|
void *ptr; |
|
|
|
|
enum data_type type; |
|
|
|
|
} keytable[12] = { |
|
|
|
|
} keytable[13] = { |
|
|
|
|
{ "", "timestamp", &state.timestamp, DATA_UINT64 }, |
|
|
|
|
{ "imu", "angular_velocity", &state.imu.angular_velocity, DATA_VECTOR3F }, |
|
|
|
|
{ "imu", "linear_acceleration", &state.imu.linear_acceleration, DATA_VECTOR3F }, |
|
|
|
@ -142,6 +145,7 @@ private:
@@ -142,6 +145,7 @@ private:
|
|
|
|
|
{ "velocity", "world_linear_velocity", &state.velocity.world_linear_velocity, DATA_VECTOR3F }, |
|
|
|
|
{ "lidar", "point_cloud", &state.lidar.points, DATA_VECTOR3F_ARRAY }, |
|
|
|
|
{ "rc", "channels", &state.rc.rc_channels, DATA_FLOAT_ARRAY }, |
|
|
|
|
{ "rng", "distances", &state.rng.rng_distances, DATA_FLOAT_ARRAY }, |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|