paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] AR.Drone 2 magnetometer issues?


From: Ori Pessach
Subject: Re: [Paparazzi-devel] AR.Drone 2 magnetometer issues?
Date: Mon, 2 Feb 2015 08:35:08 -0700

Oh, cool - I'll try that. Thanks!

On Mon, Feb 2, 2015 at 3:55 AM, Gautier Hattenberger <address@hidden> wrote:
The ground detect is suppose to find an acceleration peak when you hit the ground. Which doesn't work you the landing is too soft or the threshold to big. Setting it lower may help, but could also trigger the detection too early during the final descent.
On ARdrone, you can also use the sonar:
- load the module agl_dist.xml in your airframe file
- in the flight plan make an exception like <exception cond="0.1 > agl_dist_value_filtered" deroute="Holding point"/> in the flare block (together or in replacement of the NavGroundDetect exception).

Gautier

Le 31/01/2015 21:48, Ori Pessach a écrit :
OK. After tweaking my flightplan and removing any attempt to use nav_set_heading_deg(), I can at least take off and land reliably. Sort of - NavDetectGround() doesn't seem to work, and to be honest, I'm not sure what the implementation is trying to do, specifically this line (in autopilot.h):

if (accel->z < -THRESHOLD_GROUND_DETECT ||
        accel->z > THRESHOLD_GROUND_DETECT) {

This SEEMS to be trying to detect small acceleration values on the Z axis, but does the opposite... No?

Also, how usable is nav_set_heading_deg()? I seem to run into problems whenever my flightplan calls this function. 

Thanks,

Ori


On Sat, Jan 31, 2015 at 12:58 PM, Gautier Hattenberger <address@hidden> wrote:
These are fixed point values. Divide by 2^11 to get the floating point value. Or use the real-time plotter to display the curves, the scaling should be done automatically.

It is now possible to add descriptions to the messages, but someone has to do it....

Gautier

Le 31/01/2015 20:45, Ori Pessach a écrit :
Don't the values look kinda small, though? The datasheet for the AK8975 says that the X, Y and Z components read from the magnetometer are 13 bits, and the values logged look a bit smaller than that - 9 bits, tops.

Here are some scaled values:

71.095 201 IMU_MAG_SCALED 778 484 1875
71.294 201 IMU_MAG_SCALED 698 406 1763
71.394 201 IMU_MAG_SCALED 752 458 1791
71.493 201 IMU_MAG_SCALED 698 458 1959
71.593 201 IMU_MAG_SCALED 792 419 1833
71.692 201 IMU_MAG_SCALED 832 510 1875
71.792 201 IMU_MAG_SCALED 671 484 1791
71.892 201 IMU_MAG_SCALED 752 536 1847
72.092 201 IMU_MAG_SCALED 658 392 1805
72.190 201 IMU_MAG_SCALED 698 432 1875
72.289 201 IMU_MAG_SCALED 671 484 1819
72.389 201 IMU_MAG_SCALED 738 445 1805
72.489 201 IMU_MAG_SCALED 765 392 1805
72.588 201 IMU_MAG_SCALED 738 471 1833
72.688 201 IMU_MAG_SCALED 752 406 1819
72.787 201 IMU_MAG_SCALED 698 484 1847
72.887 201 IMU_MAG_SCALED 738 471 1833
72.987 201 IMU_MAG_SCALED 752 484 1903


Not exactly [-1, 1]... Are those fixed point values? Also, these were taken with the drone on the floor. There seems to be a little bit of noise, but in the real time plotter, at least, the magnitude of the noise seems pretty small.

I'm try to read a log from a short flight today, and I think it would be helpful to look at some documentation for the telemetry messages - ROTORCRAFT_FP in particular. Is there any documentation other than the macro definitions in messages.h? 


On Sat, Jan 31, 2015 at 9:17 AM, Gautier Hattenberger <address@hidden> wrote:
Just to be clear, if the mag is dead, the values are completely fixed. In this case, it looks ok.
Now you can have a look at the scaled values, the mag should be beween -1 and 1.

Gautier

Le 31/01/2015 01:50, Ori Pessach a écrit :
Just how much variability should I expect between MAG readings? A dump of IMU_MAG_RAW messages from a recent log taken with the drone resting on a table looks like this:

349.004 201 IMU_MAG_RAW 73 79 23
349.102 201 IMU_MAG_RAW 73 83 19
349.151 201 IMU_MAG_RAW 75 73 21
349.200 201 IMU_MAG_RAW 71 85 17
349.249 201 IMU_MAG_RAW 72 84 24
349.298 201 IMU_MAG_RAW 74 84 22
349.346 201 IMU_MAG_RAW 69 83 23
349.444 201 IMU_MAG_RAW 71 79 17
349.492 201 IMU_MAG_RAW 72 80 20
349.542 201 IMU_MAG_RAW 71 81 21
349.639 201 IMU_MAG_RAW 71 83 21
349.688 201 IMU_MAG_RAW 71 81 21
349.737 201 IMU_MAG_RAW 75 79 25
349.834 201 IMU_MAG_RAW 75 75 23
349.882 201 IMU_MAG_RAW 71 75 25
349.933 201 IMU_MAG_RAW 77 81 27
349.985 201 IMU_MAG_RAW 70 82 22
350.029 201 IMU_MAG_RAW 75 81 25
350.128 201 IMU_MAG_RAW 68 76 24
350.225 201 IMU_MAG_RAW 74 76 22
350.274 201 IMU_MAG_RAW 72 82 22
350.322 201 IMU_MAG_RAW 71 83 21
350.373 201 IMU_MAG_RAW 72 80 20
350.468 201 IMU_MAG_RAW 74 76 24
350.517 201 IMU_MAG_RAW 73 79 15
350.568 201 IMU_MAG_RAW 74 78 18
350.615 201 IMU_MAG_RAW 71 81 19
350.664 201 IMU_MAG_RAW 75 81 21
350.713 201 IMU_MAG_RAW 70 82 16
350.762 201 IMU_MAG_RAW 73 85 27
350.810 201 IMU_MAG_RAW 68 76 22
350.862 201 IMU_MAG_RAW 75 79 25
350.908 201 IMU_MAG_RAW 70 80 24
350.956 201 IMU_MAG_RAW 70 82 24

I have no idea whether this should be considered normal...


On Fri, Jan 30, 2015 at 3:08 PM, Ori Pessach <address@hidden> wrote:
I'm using 5.4, I'm not sure about the filter, and I've seen mag values that appear very wrong (the drone is rotated on the map) even immediately after I boot the drone. I'll have to check the logs from the last couple of times I took the drone out to know about the raw values.

I'm considering just trying to attach a 3rd party magnetometer to the drone using an arduino, or something like that, and patching paparazzi in order to get something working...

On Fri, Jan 30, 2015 at 2:53 PM, Gautier Hattenberger <address@hidden> wrote:
From my experience, ARDrone2 mag are really crappy, and they can fail at any time.
If you run a recent version (v5.4 or master), you *should* have a IMU_LOST indicator in the GCS strip when it occurs (in place of the GPS status).
We have tried to implement something to restart the navboard, but it is very difficult to test since the crashes are unpredictable. It has run for hours on my desk without issues, same for TUDelft guys, but maybe it is still not perfect.
What is your paparazzi version ? which filter are you using ? are the raw mag values still changing when it starts to go wrong ?

Gautier

Le 30/01/2015 22:29, Ori Pessach a écrit :
So, any ideas from anybody? I'm considering getting a new nav board, but they're not terribly cheap so I thought I'd try to figure out whether the one I have is broken, or whether they're all like that.

Thanks,

Ori

On Sun, Jan 25, 2015 at 7:14 PM, Ori Pessach <address@hidden> wrote:
Hi,

I was wondering if someone who had some experience flying the AR.Drone 2 could tell me whether what I'm seeing is typical, or a sign of a possible hardware issue.

The magnetometer readings seem to be very erratic. I've seen a range of behaviors:

* Tracking the drone's direction perfectly.
* Showing a direction that's rotated 180 degrees
* Showing a direction that's rotated 90 degrees counterclockwise (???)
* Being JUST a little bit off, and then appearing to be perfectly fine after I took the drone and walked around in circles while holding it. 

So, what's going on? I've been seeing some serious navigation issues, and I'm wondering if the magnetometer can get out of calibration midflight, which might explain the erratic behavior I've been seeing: Taking off perfectly, holding position fine, and then navigating to the first waypoint and staying there without issues. Things after that can be pretty erratic, however, including going way off course on the way to the next waypoint, wobbling wildly back and forth, and sometimes trying to fly into the ground at high speed at a 45 degree angle. Which fails, because of immutable physical properties the ground happens to possess. 

I've calibrated the magnetometer, changed the values for the local magnetic field, and the fact that SOME things work, at least at first, would indicate that the drone should be able to fly fine - at least as far as I understand it. 

So... What now? 

Ori



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel





_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]