Firmware and Params for autonomous flight (Link to firmware added)

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Hendrik » Tue May 16, 2017 11:09 am

Code to change compass from magnetic to predicted can be found at:

http://www.marvelmind.com/forum/viewtopic.php?f=2&t=808&start=36

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby amolad » Tue May 16, 2017 11:28 am

Ah okay! I thought you did more than that! Okay thank you :)

Debupt
Posts: 7
Joined: Thu May 18, 2017 5:16 pm

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Debupt » Thu May 18, 2017 6:17 pm

Very Impressive work. Recently, I'm doing the same work ( FakeGPS with Pixhawk) with UWB module. I wonder whether there are any other changes for the firmware of Ardupilot you have already posted? Could you please post the whole code you modified so i can do the same work with UWB module? I really wonder whether it can work on UWB module. My E-mail address : debupt2015@gmail.com. Really looking forward your help~~~~ :geek:

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Easyaerial » Fri May 19, 2017 12:18 am

So we followed instructions that @Hendrik posted and got some great results!
The drone tracks very accurately as you can see in the video here - https://www.youtube.com/watch?v=ZSTbyQZv08c

However, this video was made by holding a drone in hand and walking with it. As soon as we try to fly it and put in Loiter it would start shooting to the side. In Mission planner it looks like it is jumping all over the place. This was not fro motor interference tho. Marvelmind still shows it very still.

Do you guys have any ideas what to try?

Thanks

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Hendrik » Fri May 19, 2017 1:30 am

@easyaerial

Your marvelmind map is not on a zero degree north orientation.

Press the align button. Then beacon left under, beacon under right, beacon left up.

Your map needs to be to zero degrees.

Almost there!

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Hendrik » Fri May 19, 2017 1:41 am

@debupt

The published code is all that I changed. It only stops measuring compass value and forces using predicted value for heading.
And suppresses an error message. And adds an extra codition for arming.

Uwb (pozyx?). I tried pozyx but the advantage of marvel mind is that is uses nmea protocol. As if it is a normal outdoor gps.
This makes it easy to use but requires different ekf3 settings as the marvelmind is much more precise and reliable then outdoor gps. Meaning that barometer influence should be as low as zero for example by setting the device to use for altitude is gps in stead of barometer.

Debupt
Posts: 7
Joined: Thu May 18, 2017 5:16 pm

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Debupt » Fri May 19, 2017 4:35 am

@Hendrik

yeah,pozyx!
I program with STM32 to change the xyz position to nmea protocol and send to Pixhawk via GPS port. It works well when i hold the module by hand. When it fix on the drone, it cannot get position lock and drift away to one direction.
Thanks for your help, I will try your method these days. :D
Last edited by Debupt on Sat May 20, 2017 8:23 am, edited 1 time in total.

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby amolad » Fri May 19, 2017 11:55 am

Hi Hendrik and all,

want to share this

https://github.com/ArduPilot/ardupilot/pull/6270

Lets get your solution upstream :)

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby freaad » Fri May 19, 2017 11:18 pm

Dear hendrik
I read your parameter and did you use the laser sensor for altitude?
Your rng value is true and you are using the 2d positioning in EKF3 is it right?

Thank you.

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

Re: Firmware and Params for autonomous flight (Link to firmware added)

Postby Hendrik » Sat May 20, 2017 12:02 pm

@freaad

I don't completely understand what you say.

I have following settings:

EK3_ALT_SOURCE: Primary altitude sensor source
Note: This parameter is for advanced users
This parameter controls the primary height sensor used by the EKF. If the selected option cannot be used, it will default to Baro as the primary height source. Setting 0 will use the baro altitude at all times. Setting 1 uses the range finder and is only available in combination with optical flow navigation (EK3_GPS_TYPE = 3). Setting 2 uses GPS. Setting 3 uses the range beacon data. NOTE - the EK3_RNG_USE_HGT parameter can be used to switch to range-finder when close to the ground.

Values
Value Meaning
0 Use Baro
1 Use Range Finder
2 Use GPS
3 Use Range Beacon

I use: EK3_ALT_SOURCE = 2



EK3_GPS_TYPE: GPS mode control
Note: This parameter is for advanced users
This controls use of GPS measurements : 0 = use 3D velocity & 2D position, 1 = use 2D velocity and 2D position, 2 = use 2D position, 3 = Inhibit GPS use - this can be useful when flying with an optical flow sensor in an environment where GPS quality is poor and subject to large multipath errors.

Values
Value Meaning
0 GPS 3D Vel and 2D Pos
1 GPS 2D vel and 2D pos
2 GPS 2D pos
3 No GPS


I use: EK3_GPS_TYPE = 1
(Don't know why, I certainly have tried setting 0, but probably with bad results)

Hope this helps,

Hendrik


Return to “FAQ”

Who is online

Users browsing this forum: No registered users and 2 guests