Category:How to - IMU
This page describes how-to use a serial port based IMU ( 3DM-GX2). IMU's are essential for robotics control to estimate and react to the motion of the robot if environment sensing e.g. via cameras is not used. The 3DM samples internally at 50KhZ performs Kalman filtering and presents stabilized readings at 100Hz.
The IMU data transfer operates at 115200 Baud 8 N 1. There is a command set sent to the IMU and response byte string read as a set of stabilized reading. The code theat works on the laptop is shown here. To make it work on the Gumstix, change the serial port to /dev/ttyS2 from /dev/ttyUSB0 and compile using the cross compiler -> arm-angstrom-linux-gnueabi-g++.
Transfer the binary and if required the c++ stdlib to the target board and run. It may not work the first time if you have bluetooth module initialisation scripts running at boot time. Use the sertest utility to set the baud rate -> sertest -p /dev/ttyS2 -b 115200. Some data stream from the gumstix running the IMU can be seen here.
This category currently contains no pages or media.