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?
Tags:
Permalink Reply by Andras Schaffer on January 12, 2012 at 10:50am This is a very good news, looking forward to see the code...
Permalink Reply by dzlonline on January 12, 2012 at 1:26pm 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!
Permalink Reply by dzlonline on January 18, 2012 at 4:23am I am now using the ArduIMU V3 for projects with the preliminary firmware previously discussed here.
See:
http://dzlsevilgeniuslair.blogspot.com/
And:
http://diydrones.com/profiles/blogs/rctp-a-directed-airflow-control...
Permalink Reply by jayeshjain88 on January 18, 2012 at 10:14am 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.
Permalink Reply by JesseJay on January 18, 2012 at 11:39pm sounds like a calibration issue. Default settings for magnetometer would be a bit off
Permalink Reply by AndyK on January 22, 2012 at 8:02pm 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:
MPU6000_Class mpu;
void setup
mpu.init();
mpu.dmp_init();
mpu.gyro_offset_calibration();
mpu.accel_offset_calibration();
void loop
mpu.FIFO_getPacket();
mpu.calculate();
// read Euler angles from the MPU object
... so are you guys calling any other functions, or just in general doing anything differently?
- Andy
Permalink Reply by dzlonline on January 23, 2012 at 6:40am Are you using the test code that is provided from this link:
https://store.diydrones.com/ArduIMU_V3_p/kt-arduimu-30.htm
This code does not use the DMP but only read out the sensors...
Permalink Reply by AndyK on January 23, 2012 at 7:09am 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.
Permalink Reply by dzlonline on January 23, 2012 at 8:07am 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..
Permalink Reply by AndyK on January 23, 2012 at 8:15am 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.
Permalink Reply by dzlonline on January 23, 2012 at 3:34pm 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 ;)
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.203 members
24 members
720 members
1355 members
207 members
© 2013 Created by Chris Anderson.
Powered by
