8.28.2013

Razor IMU: Serial Outputs to Raspberry Pi

We want to use the outputs from the Razor IMU for multiple reasons. We are envisioning an ROV with the AUV capabilities of station keeping (being able to hold the sub in one place/orientation). To station keep we need to make sure that for every movement of the vehicle the motors kick in and create an equal and opposite reaction, keeping the ROV stationary. To do this we need to use the outputs from the Razor in an algorithm which will then tell our motors what to do. To get these outputs we are currently using the serial port output and the USB connection through the FTDI on the Razor.

This post is very similar to one of our other posts which told you how to use the Arduino UNO to send serial outputs to a Raspberry Pi. This will be very similar. Please refer to that blog post to download and compile Pyserial-2.6. After doing that follow these easy steps to see the YPR outputs from the Razor.

    1. Find which device is the Razor when the USB is plugged into the Pi. Ours was /dev/ttyUSB0.

/dev/ttyUSB0
    2. Next open up IDLE on the Raspberry Pi and type in these commands (baud=57600!!)
command

YPR outputs!
...and voila! Comment with any questions or suggestions regarding our data transfer technique for the Razor IMU.

1 comment: