DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

IMU Plugin Sample

Description

The IMU Plugin sample implements a sensor driver for a CAN-based IMU using the comprehensive sensor plugin framework. This uses a DriveWorks CAN Bus sensor to provide raw data.

It also provides sources for a refcounted-BufferPool data structure that may be used as reference for other implementations.

Running the sample

This sample compiles as a shared library (.so) that can be used with the DriveWorks Sensor Abstraction Layer (SAL).

This plugin can be used in conjunction with the IMU Logger Sample to test and verify functionality:

./sample_imu_logger --driver=imu.custom
                    --params=decoder-path=[path_to_decoder.so],
                             can-proto=[can.virtual|can.socket],
                             [file=<path_to_can_recording.bin>|device=<can_device>]
                    --timestamp-trace=[true|false]

For playing back IMU data recorded with a custom plugin, the following command line can be used:

./sample_imu_logger --driver=imu.virtual
                    --params=file=[path_to_recording.bin],
                             decoder-path=[path_to_decoder.so]
Note
The precompiled decoder library is called libsample_imu_plugin.so.

Additional Information

For more information, please refer to Custom IMUs (Comprehensive).