Is There a Max # of Waypoint/Commands Pixhawk Will Accept?

I seem to have hit an issue when setting up flight plans for large (fixed wing) survey areas. There seems to be a limit of around 725 waypoints/commands that the flight controller (Pixhawk 2.1) will accept. If I try any more than this I get an error as shown in the image. This may seem like more than enough, however with large survey areas and all the camera firing positions, it is very easy to exceed this number.

I have also uploaded an example flight plan for anyone else to try upload: https://www.dropbox.com/s/kezmka1ibqgac31/Flight%20Plan%20A%20(could%20not%20load).waypoints?dl=0


Any help appreciated, thanks,
Jacques

There is no limit to the waypoints, but you’re likely out of memory to store more. Upgrading to a STM32F7 FMU v5 unit with double the memory will probably resolve the issue.

Sorry @ChrisOlson, but there’s a hard coded limit defined on the flight stack. I had a PR for that that never went in https://github.com/ArduPilot/ardupilot/pull/4082 and https://github.com/ArduPilot/ardupilot/pull/4172 that, at least in the Linux based boards, would dramatically increase that to 200 rally points, 1000 fence points, 7000 waypoints.

The current number is 724 waypoints, 50 rally points and 84 fence points

1 Like

Ah ok, I always thought the number was unlimited. I didn’t know there was a hard-code limit, and thought the only limitation was memory.

I see there were a few PR’s for this but it looks like nothing ever came about, will this still be the case if running chibios, or does that not have anything to do with this? As people begin to push the limits and airframes become more capable I could see this being an issue for some folks.

The limits are the same on Chibios. Best option was to raise the limits on the Linux based boards, or having the missions on the sdcard…

The next best thing (and why I gave up extending the wp limit) is to use Lua scripts (coming soon to a ArduPilot near you) :wink:

Sorry, but for copter is a little less

Yeah, it does sort of look like the ultimate deciding factor in the hard code limits is memory constraints.

Just a question about why so many waypoints.

Why do you need a Digicam_control for every photo?

We do large survey areas with 500 to 700 photos per flight not including waypoints.
The only command necessary for us is the Set cam trigging distance.
The focus and other camera specific functions we set in the camera.

Hi Mike, if I recall correctly, CAM_TRIGG_DIST takes photos regardless of flight mode so I will be left with a messy set of imagery, eg. when flying in loiter modes between missions etc. Bear in mind I am mostly flying fixed wing and flights can be in excess of an hour. How do you get around the issue of all the unwanted images?

Use CAM_AUTO_ONLY, and CAM_MAX_ROLL

Then just use a DO_SET_CAM_TRIG_DIST when you enter and exit your area of interest. That way you’ll only use up 2 additional waypoints, and your mission won’t be filled with bad pictures. If you just enlarge your polygon to extend your flight lines, there will be no need for overshoot waypoints either. Focus on tuning your turns. I always map perpendicular to the wind so that I turn into the wind. At 19m/s, and 60-degrees of bank, my turn DIAMETERS are about 35m when there’s a little wind. If you’re going slower, then that diameter should be smaller.

Here’s a grid of 32.5m flight lines from a few days ago:

1 Like

As an additional note, the starting and stopping of CAM_TRIG_DIST may be done automatically with the auto waypoint survey tool - just use the “Break up starts” option under “Camera config”.

Also, don’t forget that you can use lane skipping to help cope with large turning radii for heavy craft, at the cost of less efficient travel times.

Yeah I was implying that you should NOT use Break up starts in order to save waypoints. Coordinate your flight lines and waypoint radius so that you’re turning just outside the AOI of your project. When you’re turning, it won’t trigger anyway if you set CAM_MAX_ROLL.

Ah, clever!

My apologies.

What about getting this message in the MP:Only 1306 items are supported, when i created a mission with cca 410 WPs. Does this mean that the maximum number of all of the commands is 1306, including WPs, rally points and geofence points as well as commands for mission execution for changing the speed, yaw, control of the camera, etc?

yes, the maximum number of all of the commands is 1306, including WPs, rally points and geofence points as well as commands for mission execution for changing the speed, yaw, control of the camera, etc

You can increase this limit if your board has enough memory available, and you can disable some unused features to increase the available memory.

What board are you using?

Thats what i thought. Its Cube Orange with Spektreworks Kore