[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/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 - AQ Optical Flow

AQ Optical Flow

News, Setup, Compiling, Flashing, Development

AQ Optical Flow

Postby bn999 » Thu Aug 22, 2013 12:01 am

I recently acquired a px4flow module and started experimenting with it. The module's function is a fairly simple concept, but the implementation is potentially fraught with difficulties. In the end, the ETH team did a good job on leveraging the strengths of the very capable STM32F4 MCU pulling together its DCMI interface along with integer DSP instructions to create an optical flow sensor capable of detecting a +-4 pixel shift in half pixel resolution at 200Hz.

DSC00106.JPG


Although the MT9V034 monochrome machine vision sensor is capable of 752x480 resolution at 60 Hz, the MCU only has the horsepower to scan a pixel region reduced by binning down to 64x64. With the default 16mm lens, the system is capable of tracking flow up to around 0.5 m/s at the closest distance of 0.4m. At the furthest distance (which I found practical to be 4m) the max traversal is just under 5m/s. The distances are limited by the range of the on-board sonic range finder.

The module also has an on-board 3D angular rate sensor necessary to correct for apparent motion caused by X&Y axis rotation, but I found it more useful to ignore the compensated output and use the raw flow data with AQ's rate estimates instead as they don't suffer from drift and excess noise.

Found some issues with the module's stock firmware, but luckily the source was recently published which allowed the opportunity to resolve these problems. My changes can be found here: .

I'm pleased with the results so far as demonstrated in the below video. The entire flight was flown in PH mode using DVH for maneuvering. Being outside adds a lot of noise both to the sonic altitude estimates as well as the flow estimates due to blowing leaves / grass and wind. None the less, very accurate positioning is still possible.



The AQ FC firmware changes necessary to use this sensor will be pushed to the repo as v6.8 experimental as soon as we can settle on a branch point for v6.7. To use the px4flow, all you have to do is mount it to your frame and connect its serial line to one of AQ's serial ports setup for mavlink. The system will recognize the module then ignore GPS data and use optical flow data for all positioning.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: AQ Optical Flow

Postby LPR » Thu Aug 22, 2013 1:03 am

Bill

Really great position hold.

Do you see optical flow being able to recognize a target and guide a copter to land on recharging pads?

Larry
Last edited by LPR on Thu Aug 22, 2013 1:12 am, edited 1 time in total.
LPR
 
Posts: 1323
Joined: Tue Jun 26, 2012 1:29 pm
Location: MN, USA

Re: AQ Optical Flow

Postby bn999 » Thu Aug 22, 2013 1:11 am

Optical flow is just the measurement of how pixels move from frame to frame from which distances, velocities, rotations can be integrated, differentiated, calculated. There is no recognition going on here - that would be a different algorithm.
bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: AQ Optical Flow

Postby r0sewhite » Thu Aug 22, 2013 2:43 am

If the pixel region is that small, would it be possible to use optical flow for a transmitter-free follow-me? For the calculations there should be no difference if the copter has to be held over a still spot or a moving spot.
r0sewhite
 
Posts: 113
Joined: Tue Oct 16, 2012 12:08 am

Re: AQ Optical Flow

Postby Max » Thu Aug 22, 2013 2:51 am

That's some solid-looking PH Bill, nice. A sensor that talks Mavlink? :shock: I see it can also report distance to ground... can/are you using that for alt. hold as well? I do like the sonar features on another FC I have... solid low-altitude hold and smooth auto-landing/disarm. It's neat watching it climb up steps or follow the curve of a hill. Doesn't do great over longer grass though.

In the future could something like this co-exist with GPS? Eg. if it can be more accurate than GPS at low altitudes then use OF/sonar data, then once above that altitude, use GPS. Especially at low altitudes GPS tends to be less accurate and at the same time there is more potential for rough air from downwash, etc.

-Max
Max
 
Posts: 2814
Joined: Mon Aug 13, 2012 9:45 pm
Location: Near Ithaca, NY, USA

Re: AQ Optical Flow

Postby bn999 » Thu Aug 22, 2013 3:58 am

bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: AQ Optical Flow

Postby bn999 » Thu Aug 22, 2013 4:11 am

bn999
 
Posts: 1559
Joined: Thu Jun 21, 2012 11:40 pm

Re: AQ Optical Flow

Postby kinderkram » Thu Aug 22, 2013 8:21 am

Great job as always, Bill! 8-)

Very useful for indoor PH & DVH to replace dollies and cranes at places without GPS reception.
But what if you exceed the max possible altitude while in PH/DVH? Will the baro measurement be handed over and used for AH calculations then?
kinderkram
 
Posts: 2911
Joined: Fri Jun 22, 2012 7:47 am

Re: AQ Optical Flow

Postby JussiH » Thu Aug 22, 2013 8:36 am

:D This is great news, indoor pos hold and DVH? I can hardly believe it, but I want it! :D
JussiH
 
Posts: 2103
Joined: Thu Jun 21, 2012 9:25 pm

Re: AQ Optical Flow

Postby Jdmagoo » Thu Aug 22, 2013 8:56 am

oh this is cool
Jdmagoo
 
Posts: 485
Joined: Sun Feb 17, 2013 8:35 am

Next

Return to AQ Firmware

Who is online

Users browsing this forum: No registered users and 7 guests

cron