Inertial Measurement Unit (IMU)
Device Compatibility
Overview
The IMU driver reports values for:
- Yaw, Pitch, and Roll
- Acceleration for x, y, z axes
- Gyroscope for x, y, z axes
- Magnetometer for x, y, z axes
Available ZeroMQ Ports
Base port
: 20013Keep-alive port
: 20014Error port
: 20015Data Update port
: 20016
Base Port
This port accepts 2 configurations for communicating with the IMU driver.
-
delay_between_updates
- controls the output speed of messages from the Data Update port. -
timeout_after_last_ping
- stops sending messages from the Data Update port if nothing has been sent to the Keep-alive port after the specified amount of seconds.
message DriverConfig { // Delay between updates in seconds float delay_between_updates = 1; // Timeout after last ping float timeout_after_last_ping = 2;
Keep-alive Port
This driver needs keep-alive messages in order to send data to your application. It's recommended to send an empty string ""
because the contents of a keep-alive message are never read.
Error Port
Applications can subscribe to this port to receive driver related errors.
Data Update Port
Applications can subscribe to this port for IMU data. The output will be a serialized message of type Imu
with the following information.
message Imu { //Vertical axis (yaw) float yaw = 1; //Lateral axis (pitch) float pitch = 2; //Longitudinal axis (roll) float roll = 3; // Acceleration float accel_x = 4; float accel_y = 5; float accel_z = 6; // Gyroscope float gyro_x = 7; float gyro_y = 8; float gyro_z = 9; // Magnetometer float mag_x = 10; float mag_y = 11; float mag_z = 12; }