[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 384: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4792: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4793: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3916)
AutoQuad Forum • View topic - Catmull-Rom Spline Waypoint Types for AutoQuad

Catmull-Rom Spline Waypoint Types for AutoQuad

News, Setup, Compiling, Flashing, Development

Catmull-Rom Spline Waypoint Types for AutoQuad

Postby Shogun » Sun Aug 04, 2013 5:11 pm

Hi,

some of you will know what splines are, here I used Catmull-Rom Splines. Special about this type is that the curve passes exactly the control points and for this reason it is often used in computer games. A little explanation and a demo you can find here: .

For a first implementation (called it CatmullRom1) I simply calculated a few intermediate waypoints that are set during the transition to the target waypoint. What I did not like was the reduced navigational speed because of short distances between the intermediate points and the target range around the intermediates.

CatmullRom2 sets an imaginary target as projection from the copter position through the intermediate point in a distance equal to the waypoint target. Target range is the distance from intermediate point to imaginary target.

Here is an output from my calculation tests, 4 waypoints arranged in a square, flown are two diagonals and two perimeters.
blue – strait connection
red – Catmull-Rom
yellow – projections to imaginary target, will not be flown
4Waypoints_CatmullRom.jpg
calculation test
4Waypoints_CatmullRom.jpg (134.21 KiB) Viewed 19552 times


For the tests I let the mission work in an infinite loop. Here is a video , all waypoints are CatmullRom, at about 1:10 I switch from CatmullRom1 to 2.


4Waypoints_CatmullRom.kml.jpg
extracted kml
4Waypoints_CatmullRom.kml.jpg (64.06 KiB) Viewed 19552 times


If there is interest to have that in AutoQuad I will pass the source code to a core developer and give any help I can for integration.
Last edited by kinderkram on Tue Aug 06, 2013 9:24 pm, edited 1 time in total.
Reason: Edited YT URL, embedding the video. Norbert
Shogun
 
Posts: 46
Joined: Tue Aug 14, 2012 10:53 am
Location: Aachen, Germany

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby SuperSharpShooter » Tue Aug 06, 2013 2:18 am

I'm interested in this feature.
-Glenn
SuperSharpShooter
 
Posts: 276
Joined: Sat Jan 12, 2013 9:44 pm

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby kinderkram » Tue Aug 06, 2013 9:48 pm

Absolutely!

This looks like a great feature. I'm sure one of our coders will contact you soon.
We all need to recover from the Maker Faire a bit ... but Aachen sounds like we could meet some time. ;)
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby bluuu » Wed Aug 07, 2013 9:46 am

Nice feature. Smooth flying can be more smooth ;)
bluuu
 
Posts: 1339
Joined: Mon Oct 29, 2012 8:02 pm
Location: Poland, Silesia

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby kinderkram » Sat Aug 31, 2013 7:21 pm

Michael aka Shogun visited us in Düsseldorf today and demonstrated his Catmull missions.
We documented it and will upload a video tomorrow ... or so.

Wowyzowy!
Never seen such smooth transitions between waypoints :shock: - though it's another kind of wp planning that needs to take the resulting flightpath into account.

Simply said: it rather flies through the waypoint in a curve, keeping the heading straight - than flying waypoints one by one.
It constantly calculates the flightpath each 10cm, 1.3m ahead.

Just for visualization: the blue line would be AQ's usual path, the green line the Catmull.
Image


Atm. Michael's firmware translates the inputs via GUI to calculate the mission, i.e. he's using an orbit wp.
Would be nice to have it in the code and in the GUIs - at least as a choice. :D

Michael: do you think we can mix both methods so we could use it as an option at each waypoint?

On my wishlist: option for general planning A=AQ . B=CAT and an option at each wp. Oh, and can I have it tomorrow, nicely wrapped as a gift, please? :lol:
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby Shogun » Sat Aug 31, 2013 8:44 pm

Shogun
 
Posts: 46
Joined: Tue Aug 14, 2012 10:53 am
Location: Aachen, Germany

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby joebar.rc » Sun Sep 01, 2013 8:13 am

Oh, that looks very smooth indeed on the graph. Another waypoint type should not be a problem, the number of parameters in a waypoint is currently a problem.
I like it very much, the current fast change in heading from waypoint to waypoint for example would benefit with this implementation in a good way (if you want)

Is it math intensive?

Menno
joebar.rc
 
Posts: 1084
Joined: Fri Jun 22, 2012 8:59 am
Location: The netherlands

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby Shogun » Sun Sep 01, 2013 12:08 pm

The movements are smoother around the waypoints, but during the transition to the next target it is always a little bit beneath the optimum spline line. For steady camera recordings you may prefer the goto waypoint type. We will need to gain experience with the parameters, most likely for the distance to the next calculated spline point (now 1.3m), increase and the transition between the waypoints will get smoother but may result in a loss around the waypoints. Maybe the best to have that configurable so everyone can adjust to his own preferences.

The math is not really intensive, most calculations are done in float, I have read somewhere the coprocessor can perform operations like A*B+C in one cycle.
Shogun
 
Posts: 46
Joined: Tue Aug 14, 2012 10:53 am
Location: Aachen, Germany

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby bn999 » Sun Sep 01, 2013 3:04 pm

I was thinking about this recently as well. I figure that you could emulate splines without having to use special math.

The idea of a spline is that it is just a smooth transition between one WP and another. A smooth transition simply translates to a constraint on acceleration. So if you increase the target radius and constrain the change in velocity from timestep to timestep, you would end up with a similar smooth flow calculated by true splines without any extra math, full (200Hz) next step resolution, and possibly one a few lines of code change.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: Catmull-Rom Spline Waypoint Types for AutoQuad

Postby Shogun » Sun Sep 01, 2013 6:38 pm

I am not very confident that you will get satisfying results like that. I assume you want to pass all waypoints as close as possible, this means that already for the current waypoint approach you need to take into account the position of the following point. You will also have to solve different conditions for horizontal and vertical accelerations. Will it be possible to display a projected path in the waypoint planner?
But I would like to have the freedom of different, various choices in AutoQuad, give it a try please!
Shogun
 
Posts: 46
Joined: Tue Aug 14, 2012 10:53 am
Location: Aachen, Germany


Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 13 guests

cron