YarosMallorca / MissionPlanner-to-Litchi

Convert Mission Planner (ArduCopter) Waypoint Missions to Litchi CSV Format to execute on DJI Drones
42 stars 8 forks source link

7 stay for and take photo actions #14

Closed JoeKae closed 1 year ago

JoeKae commented 1 year ago

What has been added?

What has been changed?

Review

YarosMallorca commented 1 year ago

Thank you so much for the amazing work! I will be testing it soon, and merge if everything works :)

JoeKae commented 1 year ago

Do not merge yet. I found out that some MP commands do not only change the settings for the current waypoint, but also for the waypoints after the current waypoint. In this code this is relevant for the Do Set Speed command. I will do a fix and let you know about it.

JoeKae commented 1 year ago

Should work fine now.

YarosMallorca commented 1 year ago

Doesn't work for me, it just saves a CSV file without any Waypoints.

test.waypoints:

resulting test.csv:

JoeKae commented 1 year ago

There is no takeoff command in that file. The code ignores all until takeoff.

JoeKae commented 1 year ago

Maybe we consume all waypoints and discard the list if we find the takeoff command. That way we are compatible with takeoff plans and with plans that do not utilize the takeoff command.

I will add a commit for that later.

JoeKae commented 1 year ago

Now it should support flight plans with and without takeoff.

JoeKae commented 1 year ago

Support for Trigger Method DO_DIGICAM_CONTROL added and also the DELAY parameter of Waypoints is now taken into account. The delay is set by the Delay at WP (seconds) field in the Grid Options tab.

YarosMallorca commented 1 year ago

I get this error when trying to import into Litchi: image

My Waypoints File:

My CSV File:

YarosMallorca commented 1 year ago

Also I kind of disagree with this change as in the Readme it doesn't show that you need to set the DO_SET_SPEED in Mission Planner before generating the Survey, or did you add this already in the readme and I just didn't see it?

JoeKae commented 1 year ago

I get this error when trying to import into Litchi:

It seems like litchi is capping the max speed at 15m/s. I was not aware of this. So we should limit the max. speed to 15m/s and give a warning if the user requested a higher speed.

Also I kind of disagree with this change as in the Readme it doesn't show that you need to set the DO_SET_SPEED in Mission Planner before generating the Survey, or did you add this already in the readme and I just didn't see it?

If the checkmark Use speed for this mission is set in Mission Planner, then it sets the DO_SET_SPEED command in the flight plan.

Good spot because the checkmark in the Readme is not set: image

JoeKae commented 1 year ago

Let's handle issue #19 in this PR as well. Then the Readme issue should be out of the way.

YarosMallorca commented 1 year ago

Let's handle issue #19 in this PR as well. Then the Readme issue should be out of the way.

Sure! That would be great, but I don't know which modes exactly you're talking about.

JoeKae commented 1 year ago

I did a forced push, so git reset --hard origin/7-stay-for-and-take-photo-actions might be necessary.

YarosMallorca commented 1 year ago

When should I merge this pr?

JoeKae commented 1 year ago

I will release a new version of litchi_wp later today. This changes the use of set_action because it will manage the action-index internally. Once I update the version requirement of litchy_wp in this pr, it might be ready for a merge. It depends of course if you are happy with the state of the branch.

JoeKae commented 1 year ago

Please review and let me know if anything needs to be changed.