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

Copter: APMPlanner2 can't read for the automatic flight plan #14364

Closed
muramura opened this issue May 13, 2020 · 12 comments
Closed

Copter: APMPlanner2 can't read for the automatic flight plan #14364

muramura opened this issue May 13, 2020 · 12 comments

Comments

@muramura
Copy link
Contributor

muramura commented May 13, 2020

Bug report

I am using APM PLANNER2 and Mission Planner.
I'm using APM PLANNER2 and Mission Planner to create my plan.
Up to AC3.6.12, both plans could be written and read.
However, in AC4.0.X, APM PLANNER2 is not able to write and read the plan.

Has there been a change in the writing and reading procedures?
If there is a change, where do I look for it?

Issue details

Please describe the problem

Version

AC4.0.X

What version was the issue encountered with

Platform
[ ] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type
What type of airframe (flying wing, glider, hex, Y6, octa etc)

Hardware type
What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)

Logs
Please provide a link to any relevant logs that show the issue

@rmackay9 rmackay9 changed the title Copter: I can't write or read the automatic flight plan. Copter: APMPlanner2 can't read for the automatic flight plan May 13, 2020
@rmackay9
Copy link
Contributor

Yes, we've moved to a new protocol I think. @peterbarker knows the details.

@peterbarker
Copy link
Contributor

No, rally points and fences moved to using the same protocol as missions.

I'll test here later today and see what I see.

@peterbarker
Copy link
Contributor

... testing will be delayed until I can compile APM Planner2 again. I'm asking around in gitter on that front.

@peterbarker
Copy link
Contributor

I'm using master here and don't have any issues reading or writing waypoints with apmplanner2

Can you give me a specific git hash, please?

@muramura
Copy link
Contributor Author

muramura commented May 14, 2020

@peterbarker san. Check and Comments thanks.
Software hash info:
APM PLANNER2 v2.0.27-rc1 : 750a12ac
ArduCopter V4.0.0 (4969354)

SITL, APM PLANNER2 is running on MAC OS X 10.15.4.

スクリーンショット 2020-05-14 17 30 18

@peterbarker
Copy link
Contributor

peterbarker commented May 14, 2020 via email

@muramura
Copy link
Contributor Author

muramura commented May 14, 2020

@peterbarker san.
I've incorporated this PR.
ArduPilot/apm_planner#1207

I was able to do that when I didn't have an automatic flight plan written into my FC.
I was able to execute this automatic flight plan.

スクリーンショット 2020-05-15 2 59 21

I then rebooted the APM PLANNER2.
I can't get the auto flight plan to show up on the screen.
I created a new automatic flight plan in this state and did a write operation.
I was able to confirm that it was written in SITL's Mission Editor.
I found out that APM PLANNER2 can't read the auto flight plan that is written on it.

@peterbarker
Copy link
Contributor

Still unable to replicate here, sorry. Perhaps if you send me a mission file which I can load using wp load in SITL and then fails to load in APMplanner2?

@muramura
Copy link
Contributor Author

muramura commented May 15, 2020

@peterbarker san.

I was able to confirm that the automatic flight plan appears at startup, read, refresh, write & read by doing the following.

I added the following to the message that sets MAV_COMP_ID_MISSIONPLANNER in target_component.
mission_type = MAV_MISSION_TYPE_MISSION

スクリーンショット 2020-05-16 5 21 58

スクリーンショット 2020-05-16 5 22 05

Other:
I got the same result by initializing the stack variable.
I think this is a good way to do it.

@peterbarker
Copy link
Contributor

@muramura so we're agreed that this was an uninitialised stack variable, and that ArduPilot/apm_planner#1207 ought to have fixed the problem?

@muramura
Copy link
Contributor Author

@peterbarker san.. Yes, I agree. Check and Comments thaks.
I am happy to use APM PLANNER2 in the future.

@muramura
Copy link
Contributor Author

I've put up a related fix that needs to be fixed, an issue with automatic flight plan reading, writing and loading to AC4.0.0 or later that causes a communication timeout and does not complete.

ArduPilot/apm_planner#1209

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

No branches or pull requests

3 participants