[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 574: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 630: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Plum Geek Forum • Is there an IMU on board?
Page 1 of 1

Is there an IMU on board?

Posted: Sun Feb 04, 2018 11:43 pm
by gpvillamil
The Spirit overview (http://www.plumgeek.com/spirit.html) references a 3-axis gyro and 3-axis accelerometer. Are those really there? Would be useful to keep the rover moving in a straight line...

Re: Is there an IMU on board?

Posted: Mon Feb 05, 2018 12:05 am
by esba1ley
Yes... but... one usually has to remove errors from the MEMS sensors via an estimator to get the most accurate measurements. This is the technology on which I did my Masters Thesis.

Re: Is there an IMU on board?

Posted: Mon Feb 05, 2018 3:21 am
by gpvillamil
Good to know. I've done a bit of stuff with drone IMUs. I couldn't find any documentation for accessing the IMU, but I guess that will be forthcoming?

Re: Is there an IMU on board?

Posted: Sat Feb 10, 2018 3:08 am
by Kevin
There is a gyro and an accelerometer on board. Still need to get to documenting them, but here are a few notes to get you started.

These are the exact same parts as on our Ringo robot, and we use the same code. Have a look at the Ringo guide book in the navigation section. This is out dated, but will get you started.

The navigation functions written for Ringo were done by a friend a few years ago, and they have a lot of room for improvement. If you're able to understand them I sure would appreciate any help in re-writing them so they are more simple to use. The existing ones were kind of a "do everything for everyone" thing and they are very complicated to use outside of just calling them as intended. Maybe it's just because I didn't write the code but I always get all stressed when I have to do anything with those functions.

The parts used are an MMA8451Q (the accelerometer), and an L3GD20 for the gyro. The accel is placed directly over the drive axis directly in the center of the robot.

One thing to keep in mind with the accel (as you're probably already well aware), is the acceleration due to gravity is generally more than movement, so very slight tilting causes the accel to loose position quickly. There are functions to calibrate the nav sensors though, so as long as your "starting" angle where the cal is done is generally maintained, it works pretty well.

I know there is code available for these for python as well, and I have been able to read them from the Pi, but never got the software implemented beyond that point.

-Kevin

Re: Is there an IMU on board?

Posted: Sat Feb 10, 2018 4:02 am
by gpvillamil
Cool.

I notice that the navigation functions are in the BaseSketch, do they work exactly the same as on the Ringo? Ok I see that they differ from the documentation, GetHeading doesn't work but PresentHeading() and GetDegrees() are both present.

Also saw some interesting comments on using the IMU to correct drift while moving!

Re: Is there an IMU on board?

Posted: Sat Feb 10, 2018 4:22 am
by gpvillamil