Pixhawk - Marvelmind

Frequent questions asked online, offline, in forums are answered here
Hendrik
Posts: 31
Joined: Wed Dec 07, 2016 12:29 pm

Re: Pixhawk - Marvelmind

Postby Hendrik » Sat Apr 15, 2017 2:10 pm

Thanx.

I don't know what you exactly mean with maximum range. (Larger distance? We did not try large distances yet.)
We have to fly in a very small environment (corridors of 2 meters on a area of 5 by 6 meters with a 1 meter hexacopter).
And the setting has glass panels which reflects ultrasound and makes it difficult for the air to flow.
Also the weight of the drone + carton gives inertia problems. (Freight train effect)
So we tried to be as close as possible to the flight path.
A big problem was the reflection of the ultrasound.
Another was the compass which did not work good enough. (Toilet bowl effect)

For us the workable range has to be within +- 10 cm.

As you can see on the screen dump we flew within 25 cm. (the distance between 2 black dots is 25 cm)

There is still some tuning to do. But we are building new drones. So we will tune with the new ones.
Also we have to tune the second submap of which the angle is slightly wrong.

Easyaerial
Posts: 5
Joined: Sat Apr 15, 2017 6:13 am

Re: Pixhawk - Marvelmind

Postby Easyaerial » Sun Apr 16, 2017 4:33 am

Yes, I meant larger distance between anchors and longer flight path. Wow, that is really tiny space you are flying in! Shoot me an email to ivan@easyaerial.com please. We might be able to help you with testing.

User avatar
admin
Site Admin
Posts: 243
Joined: Tue Jan 26, 2016 7:06 pm
Contact:

Re: Pixhawk - Marvelmind

Postby admin » Sun Apr 16, 2017 9:30 am

Easyaerial wrote:Yes, I meant larger distance between anchors and longer flight path. Wow, that is really tiny space you are flying in! Shoot me an email to ivan@easyaerial.com please. We might be able to help you with testing.



Here is the demo about larger space and longer path: https://youtu.be/HpYaK602pVU

freaad
Posts: 22
Joined: Fri Dec 09, 2016 1:59 am

Re: Pixhawk - Marvelmind

Postby freaad » Tue Apr 18, 2017 1:24 am

Dear Hendrik
Could you give some detail about compass and magnetic erase part.
Could you give some help about parameter. Should I minimize the compass and Acc variable?
I attached my error
I am flying in the old Tunnel.
I have same problem and also I sometimes lost the GPS signal.
Also Z value is really wrong in some reason.
My email address is donghok4@gmail.com
Thank you.
Attachments
query.PNG
query.PNG (113.82 KiB) Viewed 1636 times

Easyaerial
Posts: 5
Joined: Sat Apr 15, 2017 6:13 am

Re: Pixhawk - Marvelmind

Postby Easyaerial » Tue Apr 18, 2017 2:26 am

admin wrote:

Here is the demo about larger space and longer path: https://youtu.be/HpYaK602pVU


That looks fantastic, so it should also hopefully work with a Pixhawk based drone.

amolad
Posts: 34
Joined: Wed Jan 18, 2017 12:56 pm

Re: Pixhawk - Marvelmind

Postby amolad » Tue Apr 18, 2017 10:11 am

Hey Hendrik,

I had the same problems (regarding the compass error cause of metal) so i started to work towards getting the raw beacon data onto pixhawk!
I did try to disable the compass completely and relied only on the marvelmind to inject gps and compass data.
Think the EKF wasn't too happy with this :(
Since i am working on the Rover, there isn't much updates on the EKF for me to play around with.

Did you completely disable the compass part from the ardupilot code?

Hendrik
Posts: 31
Joined: Wed Dec 07, 2016 12:29 pm

Re: Pixhawk - Marvelmind

Postby Hendrik » Tue Apr 18, 2017 1:36 pm

Hi Amolad, freaad,

I did overrule the compass by using the predicted value, which keeps everything else intact:

in AP_NavEKF3_MagFusion.cpp:
with declination pointing north can be synchronised with pointing north of marvelmind map
twice:

Code: Select all

        // set the yaw to zero and calculate the zero yaw rotation from body to earth frame
        Tbn_zeroYaw.from_euler(euler321.x, euler321.y, _ahrs->get_compass()->get_declination()); // Hendrik was; 0.0f);



this does the trick:

Code: Select all

/*
if (use_compass() && yawAlignComplete) {
    measured_yaw = wrap_PI(-atan2f(magMeasNED.y, magMeasNED.x) + _ahrs->get_compass()->get_declination());
} else {
    measured_yaw = predicted_yaw;
}
*/
measured_yaw = predicted_yaw;


commented error message

Code: Select all

//    GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_INFO, "EKF3 innovYaw: %f\n",innovYaw);


added error message when copter not pointing north before/at arming
in AP_Arming.cpp

Code: Select all

    // check if start angle is between +- 5 degrees. Hendrik
    if ((ahrs.yaw_sensor > 500) && (ahrs.yaw_sensor < 35500)) {
        if (display_failure) {
            gcs_send_text(MAV_SEVERITY_CRITICAL,"PreArm: Yaw too large for auto start");
            GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, "PreArm: Yaw too large for auto start %d deg", ahrs.yaw_sensor / 100);
        }
        return false;
    }


So the way it works is as follow:
Rotate marvelmind with the xy button to create a north reference in the marvelmind map. (may differ from magnetic north)
Place copter (rover) in the map with north pointing in the same direction as north on the marvelmind map.
On pixhawk compass should be enabled and compass 1 selected. (If not than errormessages about compass prevent auto mode)
The yaw on Missionplanner gives the offset voor de declination
Enter -yaw in declination of compass in Missionplanner.
Reboot pixhawk.
Yaw should be around zero now.
Everything is good to go on auto.

EKF3 settings follow later. (GPS and accels maximal influence, baro and calculations get lower influence)
GPS z is better than Baro, so try to eliminate Baro as much as possible

Hope this helps

Hendrik

freaad
Posts: 22
Joined: Fri Dec 09, 2016 1:59 am

Re: Pixhawk - Marvelmind

Postby freaad » Tue Apr 18, 2017 6:02 pm

Thank you Hendrik
I will try it.
I also read other beacon company's comment(https://www.pozyx.io/Documentation/wher ... he_anchors).
Looks like I keep the same height with other 4 stationary beacon and that could be the problem for me.
If you don't mind could you send your modified code for me? My email is donghok4@gmail.com
I am little worry about compiling. I used to use the python so not sure that I can finish to make firmware perfectly. Or could you send the version of firmware I want to use same version of firmware with you.. I am using the pixhawk2.1 and I am using the EKF2 but I checked the code and your adivce looks like work.
Last edited by freaad on Tue Apr 18, 2017 6:39 pm, edited 2 times in total.

Easyaerial
Posts: 5
Joined: Sat Apr 15, 2017 6:13 am

Re: Pixhawk - Marvelmind

Postby Easyaerial » Tue Apr 18, 2017 6:24 pm

Hey Henrik,
I'm very interested in your results so far with Marvelmind. Can you please shoot me an email to ivan@easyaerial.com - we can provide drones for you to test on. Thanks

Hendrik
Posts: 31
Joined: Wed Dec 07, 2016 12:29 pm

Re: Pixhawk - Marvelmind

Postby Hendrik » Tue Apr 18, 2017 7:49 pm

1 result of today:

https://youtu.be/eYbDVO5rEFk

The results are very good. Except for height steadiness.

We are building new drones and will finetune with them.


Return to “FAQ”

Who is online

Users browsing this forum: bfcm79 and 2 guests