Waypoints: negative altitude and smooth traversal

Hello,

I cannot find a clear answer to the following questions:

-is it possible to set a negative relative altitude for a waypoint? Assuming that I launch the copter at same point that is located higher than the waypoint?

-is it possible to traverse a waypoint without stopping, and with smooth (with configurable yaw rate) heading change? This concerns both normal and spline waypoints. There is no waypoint radius for copters, is this true?

I fly Arducopter 4.1.5.
I would be grateful for clarifying these issues.

Yes negative is possible.

Yes not stoping is possible if you have the way points far appart from each other and mostly colinear.

Yes thre is a wp_nav_radius parameter. Keep it big to avoid slowing down.

Thanks for your explanations. Does it mean that you cannot adjust the radius individually for each waypoint, but set it globally for all the waypoints?

Yet another issue is how to restrict the yaw rate for the mission? Not by means of the PID settings as I would prefer to have a smooth turn rate for the waypoints but sharper one for flying the manual/stabilize mode. Is this possible?

I’ve written a python script which takes a MissionPlanner mission definition as an input, and adds waypoints in order to maintain the flight altitude in the defined range. It uses locally stored SRTM elevation data. The terrain following is really good in this way, but the overall impression when watching the recorded video is poor because the flight is not smooth. And the waypoint range cannot be too big in the mountains, where lots of precision is required.


I publish a screenshot of a route with densely positioned waypoints above a mountain. It would be nice to add this functionality to the MissionPlanner.

Set it to never change yaw than send commands to set the yaw where you want it at the rate you want it.

https://ardupilot.org/copter/docs/common-mavlink-mission-command-messages-mav_cmd.html#:~:text=of%20waypoint%20%235.-,MAV_CMD_CONDITION_YAW,-Supported%20by%3A%20Copter

Param 2

Make sure you give enough time between yaw command and next waypoint, if copter reaches next point before ending the yaw command it’ll drop it.

Currently, can’t set them individually.
But you can upvote this PR Copter: Add acceptance radius to NAV_WAYPOINT in auto mode by mustafa-gokce · Pull Request #20173 · ArduPilot/ardupilot · GitHub to go into firmware :slightly_smiling_face:

Maybe you can disable as never change yaw during the mission with WP_YAW_BEHAVIOR=0. Is it acceptable?

Thank you for your answers.

“not stoping is possible if you have the way points far appart from each other and mostly colinear.” - what does it mean in precise terms? What is the biggest route angle change allowed for not stopping at a waypoint?

Setting the yaw angle via mission commands is not very realistic for long routes. In theory, I could update my script for computing this, but it would be very unnatural. Also there is no restriction of the yaw angle rate in the mission commands. And I don’t have a gimbal with a slip ring.

Maybe there is some room for improvements? So that it would be possible to get better support for generating smooth videos? I would suggest:

-defining precisely when stopping at a waypoint can be avoided
-introducing additional yaw change rate limit by a mission command or a parameter, not restricting the general PID parameters
-working with terrain following missions (many waypoints with short distances between them)

There are “no precise terms” here. It depends on velocity, acceleration, angles, current pitch angle … etc. You need to test it. That is one of the reasons we have a SITL.
I do not advise you to set the yaw angles. But I advise you to carefully place your waypoints.

S-Curves are extremely good at doing what you want. And are available on ArduCopter 4.1.5

Arducopter 4.2.0-beta1 improves them even more. You need to have a good tuned copter to reduce the stopping. If you have sharp corners you might also want to increase the acceleration and jerk parameters.

1 Like

Out of curiosity was there actually an established use case for this or was it really another issue?

Thanks for explaining this! Only now I’ve understood that the approach is not static but depends on the particular dynamic situation. A right angle would need stopping while say 15 deg not necessarily so, would it?

In the situations where waypoints need to be located densely (following an object on the ground, terrain following) is there any practical difference between S-curves and plain waypoints?

Yet another interesting addition would be to add an optional strategy for every waypoint: instead of trying to follow the route as closely as possible, try to fly as smoothly as possible, even if it would mean some under/overshoot. Or is this already available in the form of S-curves? Does the speed change when reaching an S-curve waypoint?

And the yaw rate limit defined from the mission would be a thing!

S-curves are as fast as the copter dynamic allows it and as smooth as the acceleration and jerk limits you program it. But there is a limitation because it looks ahead one waypoint, if you go too fast it will slow down to make sure that it gets the next waypoint right. It is complex you can and should see Leonard Hall`s youtube videos about it, he explains it in detail:
Leonard Hall at ArduPilot conference 2018
Leonard Hall at ArduPilot conference 2019
Leonard Hall at ArduPilot conference 2020
Leonard Hall at ArduPilot conference 2021
Randy tests

2 Likes

It was requested by a forum user, who said that in a mission there are some points that are not really important to get close as much as WPNAV_RADIUS.
I thought I can do it, implementation seems it is working well in SITL :slight_smile:

1 Like

I’ve thought I understand it, but I have some doubts again. I’m watching the videos, thanks for pointing!

“S-curves are as fast as the copter dynamic allows” - does it mean that it takes into account the actual performance of the particular aircraft (both the equipment capabilities and the PIDs, other parameters etc) and the weather conditions (wind)? Or it’s the same for every copter and conditions, and also in the SITL?

Not the real-time performance, the performance that you demand from it using parameters.
The better you tune it, and the higher you set the allowed velocity, acceleration, jerk and jounce the faster it will go.

But if you set the parameters so high that they are not physically achievable, then the controller can not perform miracles, so donot abuse the parameters.

1 Like