Hi I'm trying to figure out how to use the MPU-6000, I'm reading your source code and I don't see anything about using the DMP
I've also looked at the ArduPilotMega 2.0 repo, found the code for the MPU-6000, but it also does not do anything with the DMP
I understand there's a supposed to be a bit of code that loads a block of instructions into memory banks inside the MPU-60x0, and then the FIFO outputs quaternion data. I do not see any of these elements in "ArduIMU328_V3" or "AP_InertialSensor_MPU6000.cpp"
Can I please see the code to use the DMP?
Sounds really good.
I am preparing a workshop for some students at Roskilde University. We nomally use ArduIMU V2 but since these went out of stock we're kind of screwed.
I really like the data i have seen so far from V3!
I am now using the ArduIMU V3 for projects with the preliminary firmware previously discussed here.
results are good for roll and pitch, but i am facing problem with yaw... heading angle from magnetometer is not linear over full rotation(if i rotate imu for 90deg i get heading as 70deg or 105deg). thus yaw is not correct. i don't know i am missing something or it is compass fault.
sounds like a calibration issue. Default settings for magnetometer would be a bit off
Can you tell me which functions you called in what order to get pitch and roll working? Ironically, I have yaw working, but not the other two. I'm getting values back for the other two, but the data doesn't look right. So far I have:
// read Euler angles from the MPU object
... so are you guys calling any other functions, or just in general doing anything differently?
Are you using the test code that is provided from this link:
This code does not use the DMP but only read out the sensors...
No, I'm using the code from the Google Code repository linked above (http://code.google.com/p/ardupilot-mega/source/browse/libraries/?r=...). This code at least appears to enable DMP. It also contains functions to read out the raw sensor values, but I'm not doing that. I am calling the calculate() function and then inspecting the Euler angle values (MPU_pitch, MPU_yaw, and MPU_roll).
However, like I said, the pitch and the roll don't seem to be correct. The output values for pitch, yaw, and roll change when I move the IMU board around, but pitch and roll don't change like I expect. For example, when I roll the board upside down, I don't get a value of 180 degrees (I assumed the Euler angle values are in radians and converted to degrees). In general, I don't get consistent values. For example, when I roll the board upside down, sometimes I'll get 90 degrees, some times I'll get 200-ish degrees, etc. The values for pitch and roll stay relatively constant if I move the board around and the sensor values aren't changing much, but as soon as I start moving things around the values aren't representative of anything. This makes me think that there is likely a calibration routine or a bias adjustment routine I'm not calling. I was just hoping someone else had already gotten this to work and could post a list of what functions they were calling in which order.
Do you hold the board still and flat down for 10 sek. while powering it up?
mpu.gyro_offset_calibration(); and mpu.accel_offset_calibration(); need the board to sit flat and still for calibration..
Yeah. I have it printing a messaging to tell me when calibration has started and when it has completed. I've been holding the board still during that time.
Guys, as noted we have posted some alpha ArduIMU V3 code in the repository. Please check it out and give the developer (Jose Julio) feedback here.
It does not use the internal DMP. This code is just a port of the old DCM code. The next version will use the DMP.
Downloaded the source but it does not seem to be compatible with the new MPU6000 library we ... er...aquired earlier :)
I can't seem to find the MPU6000 files specific to this sketch.
If there any way we can get all the files, including matching library?
And thanks to Jose for updating the ArduIMU firmware to incorporate V3 so we can start using our hardware ;)
Maybe this is a stupid question, but the code references mpu6000.h which I don't see in the repository. Should we just pull that from the ArduPilot code?