Table of Contents
VOXL IMU Server
The VOXL IMU Server receives and publishes data from the built-in IMUs on the pipe imu#.
Configuration
The VOXL IMU server uses the configuration file located at: /etc/modalai/voxl-imu-server.conf.
The config file contains the following fields:
businteger, default = 1imu_sample_rate_hzinteger (hz), default = 1000imu_baud_rate_hzinteger (baud), default = 921600imu_fsr_gyrointeger (dps), default = 480imu_fsr_accelinteger (g), default = 8
Usage
The server runs as a service in the background which can be started/stopped with systemctl start/stop voxl-imu-server. The server can also be run manually from the shell using the command voxl-imu-server. There are also optional arguments that can be added when running the server manually such as:
voxl-imu-server -dto enable debug printsvoxl-imu-server -tto enable timestamp prints for the IMU packetsvoxl-imu-server -cto create a new config file and exitvoxl-imu-server -hto print a help menu
To check the satus of the server run voxl-inspect-services and find the voxl-imu-server. The data can be viewed by running the command voxl-inspect-imu imu# or by going to the IMUs tab under debug in the portal and selecting the desired IMU imu_iim.
Published Format
IMU data is published to the pipes in an imu_data_t struct which consists of the following:
struct imu_data_t:uint32_t magic_numberSet to IMU_IMAGE_MAGIC_NUMBER for frame syncingfloat accl_ms2[3]XYZ acceleration in m/s^2float gyro_rad[3]XYZ gyro rotation in rad/sfloat temp_ctemp in C, IMU_INVALID_TEMPERATURE_VALUE if no thermometeruint64_t timestamp_nstimestamp in nanoseconds, uses system clock_monotonic
Source Code
The source code for VOXL IMU Server can be found here