Open AhmedSamara opened 9 years ago
I will work on this.
Working on getting data from the magnetometer in issue #410
We tested the Magnetometer is was initially successful but we should make sure it works from the beagle-bone. I will look into testing the Gyroscope.
We had no Gyroscope but we did have just and 3 direction acceleratometer so we went about investigating that instead. We found sample code and set up from this guide: https://learn.sparkfun.com/tutorials/mma8452q-accelerometer-breakout-hookup-guide. Our code was based on modifying this based on the 330 ohm resistors set up, here is our code: . As for our results we tested it with the Ardurino and found we could get good measurements out of it in term of acceleration on the +/- 2G setting sampling with a frequency of 800 Hz. However when we used a sum of acceleration states to get velocity and a sum of velocities to get distance, we got problematic results. Even with trying to remove noise by taking the absolute values we found there was so much error none the data was not useful. It kept going to infinity in one direction or the other based on accumulating error. We in our research for this issue found people telling us this accumulating error problem make this method of localization difficult. It look like we confirmed it was good advice. Here is the best resource we found on bot localization with IMU and their related devices: http://stackoverflow.com/questions/17572769/calculating-distances-using-accelerometer
Introduction
Whenever the robot moves, especially when using Mecanum wheels, the robot drifts and moves unexpectedly. Some of our members have mentioned that in the past, they used a gyroscope to help correct this motion. Some members have used an IMU before, whichcontains a gyroscope, an accelerometer, and a magnetometer (aka compass).
We don't currently own an IMU but are willing to invest in one if it proves worthwhile.
Notes
Requirements
Resources