Position Hold with Optical Flow sensor - done

luigi_moran
Posts: 1
Joined: Tue May 13, 2014 11:57 am

Re: Position Hold with Optical Flow sensor - done

Post by luigi_moran »

sir,,if I may ask,,is optical flow sensors compatible to "HK/Holybro MultiWii 328P Flight Controller w/FTDI & DSM2 Port"? I want to perform position hold also and I am to use optical sensor from an optical mouse. Is this possible? if so, can you help me with this problem? Sorry for asking, I am not so good with this one.:( and I am still a newbie."(

jonathancalderon
Posts: 2
Joined: Fri May 30, 2014 5:03 pm

Re: Position Hold with Optical Flow sensor - done

Post by jonathancalderon »

hi there.
i went and read all 5 pages of this post and one thing i didnt get
where can i get the sensor from...
1. laser pointer
2. USB mouse
3. camera
4. buy is for 40$ from http://store.3drobotics.com/products/op ... low-sensor

i have 3 sonars on the way from aliexpress http://www.aliexpress.com/item/HC-SR04- ... 85689.html
for 1.2$ each... and would like to know how much difference there is using the optical flow method.

thanks :-)
Jonathan

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

I have been testing the ADNS 3080 sensor from GLB ($24 shipped). This:
http://www.goodluckbuy.com/images/detai ... 5567_1.jpg

I did test/calculate a FOV of merely 22 deg. This leaves me 10 deg copter inclination max, which is not enough. How can i make the FOV way bigger?
I have tried lenses from other cams, including wide angle fpv lenses, but no change. The sensor is too small.

Video of 2 lines 4cm apart seen trough the 10cm high sensor.
https://www.youtube.com/watch?v=yglonHY ... e=youtu.be
Data is read in by an arduiono 328 over SPI and then sent to the PC over serial 115kbaud. Display is a processing sketch.
Testprog here: https://github.com/Cesco1/ArduFlow

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: Position Hold with Optical Flow sensor - done

Post by brewski »

Plüschi wrote:I have been testing the ADNS 3080 sensor from GLB ($24 shipped). This:
http://www.goodluckbuy.com/images/detai ... 5567_1.jpg

I did test/calculate a FOV of merely 22 deg. This leaves me 10 deg copter inclination max, which is not enough. How can i make the FOV way bigger?
I have tried lenses from other cams, including wide angle fpv lenses, but no change. The sensor is too small.

Video of 2 lines 4cm apart seen trough the 10cm high sensor.
https://www.youtube.com/watch?v=yglonHY ... e=youtu.be
Data is read in by an arduiono 328 over SPI and then sent to the PC over serial 115kbaud. Display is a processing sketch.
Testprog here: https://github.com/Cesco1/ArduFlow


Hi Pluschi,

From what I've read the optical flow sensor is just the sensor from an optical mouse. How can this detect height up to 10m?
Also how does MW make sense of the data coming from sensor to determine if image is changing?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

brewski wrote:How can this detect height up to 10m?


Who said it can detect height?

brewski wrote:Also how does MW make sense of the data


How does your computer make sense of the data it gets from the mouse? Same-same.
Optical flow is processed IN the sensor. Then its sends out X and Y coords.

Btw the sensor is quite blind, needs lots of light. The pixhawk sensor should be MUCH better, its based on a cam and not on a mouse sensor. Also comes with built in gyro sensor. But $91 ...
http://www.goodluckbuy.com/px4flow-v1-3 ... tible.html

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: Position Hold with Optical Flow sensor - done

Post by brewski »

Plüschi wrote:
brewski wrote:How can this detect height up to 10m?


Who said it can detect height?

brewski wrote:Also how does MW make sense of the data


How does your computer make sense of the data it gets from the mouse? Same-same.
Optical flow is processed IN the sensor. Then its sends out X and Y coords.

Btw the sensor is quite blind, needs lots of light. The pixhawk sensor should be MUCH better, its based on a cam and not on a mouse sensor. Also comes with built in gyro sensor. But $91 ...
http://www.goodluckbuy.com/px4flow-v1-3 ... tible.html


Ok I get it. Optical flow just looks at a section of ground & turns it into a giant mouse mat! I can see issues with non reflective surfaces such as grass & even bitumen. Are you detecting the reflected light from pulsed LED as mouse does or using a high powered pulsed LED/laser?
Last question - what code is required in MW2.3 (I'm using Eos Bandi Nav version) sketch for this to work?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

brewski wrote:using a high powered pulsed LED/laser?


Im using a continuous light source with 38500000000000000000000000 W power.

Did you read this thread before asking ?

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: Position Hold with Optical Flow sensor - done

Post by brewski »

Yes but still a bit confused as to how a mouse sensor can be used for improved Poshold any better than ultrasonic which I believe can work up to 5m. A mouse sensor detects reflected light from a pulsed LED. Without a light source detector would be just relying on light reflected from ground which in the case of grass or road would be stuff all even at 5m.

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

2 questions. You may use wikipedia to answer.

- what does ultrasonic measure?

- what does a mouse measure?

Got it?

kilby
Posts: 76
Joined: Wed May 28, 2014 10:17 am

Post by kilby »

An optical flow sensor essentially takes a picture of an area, then takes another picture and compares how the features have moved.

So called non reflective are better than highly reflective images as it's only highlights which are looked at, that's why flash and mirrors don't work, unless you have an upmarket Microsoft or logitech mouse.

A mouse carries it's own light source as it's the only way the area under the mouse can be illuminated.

These things are used in the big bad outside world for monitoring moving things (flowing liquids being quite common).

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re:

Post by brewski »

kilby wrote:An optical flow sensor essentially takes a picture of an area, then takes another picture and compares how the features have moved.

So called non reflective are better than highly reflective images as it's only highlights which are looked at, that's why flash and mirrors don't work, unless you have an upmarket Microsoft or logitech mouse.

A mouse carries it's own light source as it's the only way the area under the mouse can be illuminated.

These things are used in the big bad outside world for monitoring moving things (flowing liquids being quite common).

Thanks for the explanation. If optical flow works on highlights then why not use a cheap laser module to provide this highlight & not be solely reliant on ambient light.

kilby
Posts: 76
Joined: Wed May 28, 2014 10:17 am

Re: Position Hold with Optical Flow sensor - done

Post by kilby »

brewski wrote:
kilby wrote:An optical flow sensor essentially takes a picture of an area, then takes another picture and compares how the features have moved.

So called non reflective are better than highly reflective images as it's only highlights which are looked at, that's why flash and mirrors don't work, unless you have an upmarket Microsoft or logitech mouse.

A mouse carries it's own light source as it's the only way the area under the mouse can be illuminated.

These things are used in the big bad outside world for monitoring moving things (flowing liquids being quite common).

Thanks for the explanation. If optical flow works on highlights then why not use a cheap laser module to provide this highlight & not be solely reliant on ambient light.

Unless you are flying in incredibly poor lighting conditions you simply don't need to, they're nice for position hold

If you really want a flying laser device (and who doesn't want one) then go for a pulsed light range sensor instead, they look great and they are dropping in price as they're are being fitted to cars (and replacing the small radar is its that are used to measure liquid levels)

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

Optical flow and ultrasonic DO MEASURE TOTALLY DIFFERENT THINGS. Is that so hard to understand?

brewski
Posts: 483
Joined: Tue Apr 29, 2014 12:04 am
Location: Cleveland Qld Australia

Re: Position Hold with Optical Flow sensor - done

Post by brewski »

Are you Timecop in disguise?

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Position Hold with Optical Flow sensor - done

Post by Plüschi »

No, but TY for the compliment.

Post Reply