MPU-9150 and DMP

I am building a quadruped robocat on a DUE. As with any quad on less than 4 legs you need to know when it is falling so you can adjust.

I have an MPU-9150, actually a GY-9150. This is a MPU-6050 with a compass to fix yaw drift.

I see two approaches to using this:

1) There are a number of different ways in combining the raw accelerometer and gyro data and various filters

2) Use the onboard DMP which works in ways unknown to me. I have found this:

https://github.com/jrowberg/i2cdevlib/tree/master/Arduino/MPU6050/Examples/MPU6050_DMP6

As near as I can tell that takes the raw data into quaternion and then displays it in various other ways.

So, I can take the raw data and filter for y or z acceleration. Or, I can use the DMP and probably look at the roll or pitch data. I would think I should leave gravity in the results but I see several ways of looking at the same info including the mysterious Teapot.

Some guidance is appreciated as I have not used these type devices before.

The code you linked to works amazingly well in my opinion.

Have you looked at other quadcopter programs?

I'm not sure what you're asking.

DuaneDegn: The code you linked to works amazingly well in my opinion.

Have you looked at other quadcopter programs?

I'm not sure what you're asking.

I haven't looked at any quadcopter programs, this is a quadruped. Nothing I had looked at (self balancing mostly) used the used the DMP, they all used the raw data and processed that.

With that said, if you say that works well, then I will try it. It took me a while to find it as I hit a number of dead ends. It seemed like what I wanted...

Do the quadcopter people use this in Yaw Pitch and Roll? A robot arm works in quaternian, but I don't think I need that for leveling a quadruped.

Good Karma to you...

cyberjeff: I haven't looked at any quadcopter programs, this is a quadruped.

My apologies. I had quadcopters on the mind.

I'll try to add something useful about quadrupeds if no one beats me to it.

I think quadrupeds are fascinating.

There's a lot of good information at this site.

I've made a few hexapods but I haven't made a quadruped yet. IMO, quadrupeds can look creepier than hexapods. There's something very organic with the way they walk.

I really like the idea of adding an IMU to a walking robot. Normally a quadruped shifts its center of gravity so it's inside the area of the three legs touching the ground. This make programming a quadruped harder than program a hexapod.

Hey, I know you! You're cyberjeff! We've had this conversation before.

I look forward to seeing what you do with your bot.

cyberjeff: Do the quadcopter people use this in Yaw Pitch and Roll? A robot arm works in quaternian, but I don't think I need that for leveling a quadruped.

I don't know enough to answer your question. I think they use yaw, pitch and roll. Quaternions are supposed to be better for this sort of thing but I don't understand how to use them. I'm sure I kind of understood them at one point in time (I took a lot of math classes). I think quaternions are the most helpful when there the danger of having gimbal lock. I don't think quadcopters or quadrupeds will have the range of motion where gimble lock becomes an issue.

I've read there's a calculation speed advantage to using quaternions.

DuaneDegn: I think quadrupeds are fascinating.

There's a lot of good information at this site.

I've made a few hexapods but I haven't made a quadruped yet. IMO, quadrupeds can look creepier than hexapods. There's something very organic with the way they walk.

I really like the idea of adding an IMU to a walking robot. Normally a quadruped shifts its center of gravity so it's inside the area of the three legs touching the ground. This make programming a quadruped harder than program a hexapod.

Hey, I know you! You're cyberjeff! We've had this conversation before.

I look forward to seeing what you do with your bot.

I am indeed.

This may be even "creepier" than you expect. Here is a Halloween pic of me, the girl and Rowl the Robocat (with a fake head):

https://www.facebook.com/photo.php?fbid=10206232575825969&set=a.10206232560865595.1073741846.1012267561&type=3

It's occurred to me that it is easier to collect data then to calculate it, hence it is time to wire up the MPU9150.

I've spent a lot of time studying the way cats move and they amble such that the CG is often on the edge of one of the triangles. All you need to do is shift the weight slightly. You can plot this on graph paper, or you can, as I have, calculate the Barycentric coordinates and look at it with SVG (I was a working web developer). I have an unusual way of shifting CG that I'm just wiring up now that gets around a lot of the complexity.

So, although walking is cool, I think it is even cooler to have a robot that can sit, lay down and even jump up a bit. I haven't seen that done before.

Thanks for the help. I'm going through the docs and wiring up the MPU9150...

DuaneDegn: I don't know enough to answer your question. I think they use yaw, pitch and roll. Quaternions are supposed to be better for this sort of thing but I don't understand how to use them. I'm sure I kind of understood them at one point in time (I took a lot of math classes). I think quaternions are the most helpful when there the danger of having gimbal lock. I don't think quadcopters or quadrupeds will have the range of motion where gimble lock becomes an issue.

I've read there's a calculation speed advantage to using quaternions.

Calculating rotations is easier with quaternions. They are still a mystery to me, but so is a lot of stuff.

I suppose gimbal lock is not such a big deal with quadcopters as they rarely fly far from level. For a robot arm, gimbal lock can cause what they call wrist slap as it is very possible for a bot arm too rotate it's axis's into alignment.