Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGC Master fails to upload mission to ArduPilot #6783

Closed
lvale opened this issue Aug 9, 2018 · 31 comments
Closed

QGC Master fails to upload mission to ArduPilot #6783

lvale opened this issue Aug 9, 2018 · 31 comments
Assignees

Comments

@lvale
Copy link

lvale commented Aug 9, 2018

Hi @DonLakeFlyer
screen shot 2018-08-09 at 10 01 10

defining just a simple mission, when trying to upload to vehicle, this comes up.

Apparently part of the mission is uploaded.

@DonLakeFlyer
Copy link
Contributor

Firmware version and vehicle type?

@DonLakeFlyer DonLakeFlyer self-assigned this Aug 9, 2018
@DonLakeFlyer DonLakeFlyer added this to the Release v3.4 milestone Aug 9, 2018
@lvale
Copy link
Author

lvale commented Aug 9, 2018

3.6 master quad and tradheli on fmuv5
on qgc master

@DonLakeFlyer
Copy link
Contributor

My guess is NaN on Heading to indicate not heading change. Can you quick try single waypoint with/without heading checked?

@lvale
Copy link
Author

lvale commented Aug 9, 2018

you mean using parameter 4 ?
screen shot 2018-08-09 at 22 12 00
tt0.plan.txt

@lvale
Copy link
Author

lvale commented Aug 9, 2018

i'm using the same mission that still fails (attached above - just remove the .txt)

@DonLakeFlyer
Copy link
Contributor

Forgot that Heading field is not displayed for ArduPilot only PX4. Change Param4 to 0 (--.-- indicates NaN) and I bet it will work. NaN there is supposed to indicate don't change heading which is what param 4 is. Looks like something changes in ArduPilot to start rejecting this for some reason.

@lvale
Copy link
Author

lvale commented Aug 9, 2018

Apparently not. The culprit here is the final RTL command

screen shot 2018-08-09 at 22 21 11

@DonLakeFlyer
Copy link
Contributor

Ah, that's a QGC bug. There shouldn't be a Nan in param 4 there. How did you create that mission did you add a waypoint and then change it to RTL or use the RTL checkbox from Mission Start.

@lvale
Copy link
Author

lvale commented Aug 9, 2018

Exactly. Changed the last WP to RTL

@DonLakeFlyer
Copy link
Contributor

Awesome, thanks. I'll fix. Defaults for params whould have been reset when you switched commands but they weren't. So you still have the NaN for heading in there from the original waypoint command.

@lvale
Copy link
Author

lvale commented Aug 9, 2018

;) Thanks @DonLakeFlyer
do you close this or do I?

@DonLakeFlyer
Copy link
Contributor

I'll close once I fix

@Thyself17
Copy link

Thyself17 commented Mar 29, 2019

Sorry for stirring up the pot again, but I'm getting this on QGC 3.5.0 using Ardupilot Plane v3.9.6
All commands that include a loiter will fail the mission upload (including setting up a landing and a normal, infinite loiter).

This can be repro'd by inserting a new waypoint, tapping the waypoint to change the type, selecting loiter from the dropdown, and selecting the loiter waypoint type.
At this point, you will not be able to upload a mission. Param 4 shows as --.-- just as shown in @lvale 's screenshots.

@DonLakeFlyer DonLakeFlyer added this to the Release v3.5 milestone Mar 29, 2019
@DonLakeFlyer DonLakeFlyer reopened this Mar 29, 2019
@DonLakeFlyer
Copy link
Contributor

@Thyself17 You problem is different than the original problem. This has to do with the LOITER_UNLIM command and param4 which specifies a heading. A NaN in this field means do not change heading. This is used for multi-rotor only so I'm not sure why ArduPlane is looking at that param at all since it is not relevant for fixedwing. I'm going to have to talk with Tridge to figure out why this matters to ArduPlane. You can workaround by going into Show all value and changing param4 to 0.

@DonLakeFlyer
Copy link
Contributor

In looking at ArduPilot source this is a generic problem with all vehicle types. It doesn't seem to validate param4 correctly for the LOITER commands. Although the mavlink spec on LOITER.param4/heading is not very clear as to NaN usage.

@Thyself17
Copy link

@DonLakeFlyer Ah thanks for the update.
The workaround for changing param4 to 0 does work for loiters, but this is also preventing me from setting up a fixed wing autolanding.
Regardless, I see that this has been moved to the MavLink space, so thank you for escalating this in the right direction for me! You guys are awesome.
I presume there will be a follow-on issue in ArduPilot to handle NaN?

@DonLakeFlyer
Copy link
Contributor

@Thyself17 Can you try tomorrow's daily build and see how it works?

@Thyself17
Copy link

@Thyself17 Can you try tomorrow's daily build and see how it works?

Will do. Thanks for your tremendous efforts, @DonLakeFlyer . I'll let you know how it goes.

@DonLakeFlyer
Copy link
Contributor

but this is also preventing me from setting up a fixed wing autolanding.

Not quite sure what you mean by that can you explain? I only changed the code for adding a loiter manually.

@Thyself17
Copy link

but this is also preventing me from setting up a fixed wing autolanding.

Not quite sure what you mean by that can you explain? I only changed the code for adding a loiter manually.

I've attached a screenshot (and the mission plan .plan file renamed as a .txt) to hopefully help with the description.
To repro, I just setup a very basic "Fixed Wing Landing" pattern via mission plan. Then click upload. The upload fails with the "Param5 nan" message.

QGC_Fixed_Wing_Landing_Param_Error

Param5_MissionFail.txt

@DonLakeFlyer
Copy link
Contributor

Hmm, that's a different problem than the LOITER commands. It's caused by the stop camera commands. In that case as far as I can tell ArduPilot is just doing the wrong thing.

@DonLakeFlyer
Copy link
Contributor

Also I don't think ArduPilot supports those commands yet. Can you just turn those off?

@Thyself17
Copy link

Hmm, that's a different problem than the LOITER commands. It's caused by the stop camera commands. In that case as far as I can tell ArduPilot is just doing the wrong thing.

Gotcha. I shouldn't have assumed they were directly related. Turning off the camera settings allows me to upload fixed wing landing patterns again.

And I'll make sure I get back to you with the results of the daily build tomorrow :)

@DonLakeFlyer
Copy link
Contributor

There is a bug that for ArduPilot these checkboxes should not be showing up at all.

@DonLakeFlyer
Copy link
Contributor

Just to detail out the issue. QGC was sending the wrong values for fixed wing missions and LOITER commands with respect to param4. I've fixed that. I've hacked ArduPilot multi-rotor mission upload to also default to 0 for param4 (instead of NaN) which to me seems incorrect but don't have time to argue. ArduPilot as far as I can tell does not yet support the heading field in loiter commands. What this means is that if they ever do they will suddenly all set of a heading of 0 which is basically wrong. PX4 multi-rotor missions continue to defailt to NaN to specify no heading change on loiter commands.

There are still problems here with respect to camera commands in Fixed Wing Landing pattern and ArduPilot. I'll get around to fixing that as well.

@DonLakeFlyer
Copy link
Contributor

Also realizing now that my hack for this has broken PX4 fixed wing since it will default to NaN for param4 when it should default to 0 for fixed wing for x-track exit.

@Thyself17
Copy link

Thyself17 commented Apr 6, 2019

Well the good news is that with the daily build from yesterday I can successfully create loiter waypoints for Ardupilot Plane :)

I'll keep watching this space for updates to QGC. I'll be happy to give another build a test on arduplane

@DonLakeFlyer
Copy link
Contributor

@Thyself17 Can you try tomorrows daily build again to make sure I haven't screwed anything up with latest change?

@Thyself17
Copy link

@DonLakeFlyer
Tested with Arduplane 3.9.6 using the daily build (4-16-2019).
Loiters still work fine. No param issues on upload. When looking at param values, param 4 is 0.00

Fixed wing landing pattern looks good too. No camera options and the upload works fine

@DonLakeFlyer
Copy link
Contributor

@Thyself17 Awesome, thanks so much for veriyfing.

@Thyself17
Copy link

@DonLakeFlyer No problem. If you ever need someone to verify changes to QGC on an arduplane build, throw me a ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants