Optical flow sensor

Hi All,

new firmware installed (3.2) Working well.

Some dificulties to configure the sonar, but this webpage was very helpfull
http://copter.ardupilot.com/wiki/common-rangefinder-maxbotix-analog-2/
:slight_smile:

So, I get an optical flow sensor. It’s activated on mission planner. I don’t know if it’s working weel because I get no log about it.
In 3.1.5 fw version I get correctly the graph in +OF logs, in 3.2 the graph is empty.

The OF_loiter look working in flight, so if I get no log peraps it’s simply a classic loiter. How to verify?

Best regards and thanks for help.

Laurent

I am setting up a px4 flow sensor with a hawk FC and have not been able to get any data to show in MP or in APM 2.0 to confirm that the sensor is working. The px4flow is updated through MP and optical flow is enabled.

Hi,

Same problem.

Tested in flight, The logs indicate that the Apm can’t entering in Of_loiter mode.

So is your optical flow working, but not logging?

There has got to be some solid information some where!

There must be a branch some one has put together that works, maybe a beta realease?

Hi,

Yes, my sensor in the previous version 3.1 Working well and loging well.

Since the 3.2 no log menu for the sensor and the of_loiter mode can’t be activated in flight.

Hi
I am having a problem testing my ADNS 3038 optflow sensor. Its installed on a APM 2.5 Quad.
Tried to get reading on 3.1 firmware but nothing shows in test ‘0ptflow’ only zero’s in the terminal cli
With 3.2 only garbage. Is there any other way to test it??

I’ve got this far with the testing of ADNS 3080 optflow sensor.
typing ‘i’ displays a number image which varies on each test depending where the camera is pointing. All very good.
‘m’ and ‘I’ do not work.

•Connect to your APM with the Serial Monitor or AP Mission Planner Terminal
•type ‘c’ to ensure that the sensor is responding to the APM
•type ‘m’ and move the camera back and forth and check that x,y values change. If they do not change, modify the focus of the lens by turning it left or right.
[attachment=0]OpticalFlow_test.jpg[/attachment]

I then install 3.2 firmware and setup flight mode ‘OF_Loiter’ which shows in the HUD when switched on.
As soon as you ARM the quad, you cannot switch 'OF_Loiter on, it stays in stablise. other modes work OK

Anybody else having the same problem?

I too am having the exact same issue as OAPpilot. I have verified that the 3DR Optical Flow sensor is working and have focused the lense. Data is being received in the test firmware as per the instructions.

http://copter.ardupilot.com/wiki/common-optional-hardware/common-optical-flow-sensors-landingpage/common-mouse-based-optical-flow-sensor-adns3080/.

I have activated the sensor in Mission planner, and added the OF_Loiter flight mode. I can see where the flight mode is highlighted when testing the flight mode selections in mission planner, but the OF_Loiter mode remains green and the previous selected mode remains selected.

I have the ability to select 6 different flight modes from my RC transmitter, and all 6 work without issue. When I change one of the 6 modes selections to OF_Loiter, that one mode will not activate.

I tried activating it inside and outside a building. I tried without GPS lock and with GPS lock. I tried within 3-5 feet from the ground, and at higher elevations. Always the same result, OF_Loiter mode will not activate.

APM 2.5 with latest firmware.

Hi CRPerryJr
I have found that the flight modes work OK if you run firmware version 3.15, but not in the latest firmware 3.2.
My main problem now is getting it in focus. I don’t know how to get the image grabber sketch working in Python? Also how to compile the image grabber sketch. Any help with this would be most appreciated. :confused: . as I am no :geek:

The only issue I had was trying to find the ADNS3080ImageGrabber.py, which I have attached in this post. Please follow the directions as listed at this link, and you should be ok.

http://copter.ardupilot.com/wiki/common-optional-hardware/common-optical-flow-sensors-landingpage/common-mouse-based-optical-flow-sensor-adns3080/

Just change the location of the ADNS3080ImageGrabber.py file to wherever you saved it. (The attached version is compressed, so you’ll have to uncompressed it first.)

Thank you for the file.
my problem is what do you do at stage 5 of the instructions. I have python loaded and the idle program.
I can get the grabber into the idle window, then I’m stuck what to do?

Open the ADNSImageGrabber.py file in the IDLE program, it should open to the actual text.
(See attachment for screenshot)

Press F5 -or- click Run/Run Module

Once the image grabber script is running, select the proper com port for the APM and click “Send”

Fine until I do the Run/run bit. It then comes up with “invalid Syntax”

def send_to_serial(self):
    if self.ser.isOpen():
        self.ser.write(self.entryStr.get())
        print "sent '" + self.entryStr.get() + "' to " + self.ser.portstr
    else:
        print "Serial port not open!"

It highlights the quotes at he end of the sent

Thanks again for your help

Hi
Problem solved, I had downloaded the latest version of PYTHON ver 3.4.3 which was causing the compile fault.
I then down loaded the 2.79 version of PYTHON and it all works fine. I can run the ‘ImageGrabber’ and at last be able to focus the optflow.

Thanks again to CRPerryjr for all his help :smiley: :smiley: :smiley:

Glad I could assist. Now if we could just get this thing to work in 3.2!

To recap the issue:

  1. 3DR Optical flow installed and configured as required.
  2. Optical Flow Sensor enabled in MP.
  3. Added OF-Loiter as flight mode.
    When activating OF-Loiter mode during flight, it never engages, and it never displays “OF_Loit” on my FPV Telemetry screen or in Mission Planner. The previously selected flight mode remains. All other flight modes work as required.

When testing on the bench using MP’s Flight Mode Configuration, I cannot select OF_Loiter from my transmitter. It stays on whatever flight mode was previously selected.

As an example:
Flight mode 1= Stabilize
Flight mode 2= OF_Loiter
Flight mode 3= Loiter
Flight mode 4= Auto

I select 1 with the transmitter, switches to flight mode 1 and functions correctly
I select 2 with the transmitter, stays on flight mode 1.
I select 3 with the transmitter, switches to flight mode 3 and functions correctly.
I select 2 with the transmitter, stays on flight mode 3.

It doesn’t matter which Flight mode position I place OF_Loiter. It will not engage in any position.

Any assistance is greatly appreciated. (I really don’t want to back track to 3.1 if I don’t have to.)

I have had to go back to Firmware 3.1.5 to get the flight modes to work with the ADNS 3080 optflow sensor.
on my APM 2.6 Quad. It now works as well on Gud in mission Planner, and the logs.
I’ve attached a log that shows readings on the OP graph. Can anybody inform me if the figures are what they should be? If not to please, tell me what reading I should be getting.
The quad holds it height. better in the OP_loiter but does move about quite a bit, on a varied grass surface.

Wrong Log try this one

I am back at this again…
Running the latest 3.5 stable release.

Before I go on, if there is a more current thread that already answers my question please direct me there…

Px4flow is showning changing x and y values is the status window of mission planner, but when logging only one value changes, (OF flow x)the other to values (OF body x and IMU gut x) from the wiki are flat line.
I can not produce a graph that looks any thing like the wiki.

Also, there is no OF loiter option coming up in the modes options now. What mode is used now?

Is there a current guide to correctly set up optical flow on 3.5? The wiki for the Px4flow is a bit out of date.