38 std::uint32_t nanoseconds,
39 float accel_x,
float accel_y,
float accel_z,
40 float gyro_x,
float gyro_y,
float gyro_z,
42 auto *message =
_impl->GetMessage();
43 message->header.stamp.sec = seconds;
44 message->header.stamp.nanosec = nanoseconds;
50 const auto accel =
AccelToRos(accel_x, accel_y, accel_z);
51 message->linear_acceleration.x = accel[0];
52 message->linear_acceleration.y = accel[1];
53 message->linear_acceleration.z = accel[2];
55 const auto gyro =
GyroToRos(gyro_x, gyro_y, gyro_z);
56 message->angular_velocity.x = gyro[0];
57 message->angular_velocity.y = gyro[1];
58 message->angular_velocity.z = gyro[2];
62 message->orientation.w = q[0];
63 message->orientation.x = q[1];
64 message->orientation.y = q[2];
65 message->orientation.z = q[3];
bool Write(std::int32_t seconds, std::uint32_t nanoseconds, float accel_x, float accel_y, float accel_z, float gyro_x, float gyro_y, float gyro_z, float compass)