Hereflow sensor with UAVCAN not responding

Hi!

We have a HEX Hereflow optical flow sensor(CubePilot | Autopilot-on-Module | Blue Manufactured in USA | Blue Assembled in USA | Pixhawk Original Team), but it does not work on our Pixhawk4Mini. Acording to this [WIP] PMW3901 page (optical flow) by DanielePettenuzzo 路 Pull Request #559 路 PX4/PX4-user_guide 路 GitHub page, the support Hereflow should be implemented.

We think there might be (one of) two issues:

  1. We have not set up the parameters for the autopilot correctly.
  2. Some of the hardware may be broken.

Potential problem 1:
The guide here PX4-user_guide/pmw3901.md at c03a25be2724e5d89e9ece47425423d5cd100a1d 路 PX4/PX4-user_guide 路 GitHub indicates that support for the sensor is implemented, but the documentation is not done. We have tried to connect it and configure the parameters at best guess, but we can鈥檛 get any readings from it.

Do you know which parameters we should set to make the autopilot use the sensor or how to debug the setup?

Potential problem 2:
When we run uavcan status in the nsh shell the autopilot crashes and reboots. The last thing we see is:


Notice that the HW errors and the IO errors. Is seems to crash when we read the RX for our bus. To me, this seems like either we have a hardware problem, or that perhaps the firmware have a bug.

We tried loading the Pixhawk4Mini with Arducopter 4.0.0, and there we was able to get readings from the distance sensor, but not any optical flow information.

Both the Pixhawk and the Hereflow is new and barely used.

Would you happen to know how to debug this, or what to try?

Related posts:
Hereflow optical flow sensor support - #4 by ealdaz claims that the sensor works, but not the distance sensor.

Any help would be greatly appreciated :slight_smile:

Sorry I have just seen your question, and I fear you might have figured out already.
These are the settings I鈥檝e used:
Need to :

UAVCAN_ENABLE = Sensors Automatic Config
EKF2_AID_MASK = 2 -> Add flow
SENS_FLOW_ROT = 0 ( If set in the same direction)
SENS_FLOW_MINHGT = 0
Need also
EKF_HGT_MODE = RangeSensor

If it works you should be getting optical_flow messages in mavlink inspector.
To test it check Local Position in Analyze window (Hard to interpret the direct readings from optical flow messages)

Thanks for the reply! Better late than never. :slight_smile:

We migrated to Ardupilot and got the Hereflow working there. I would like to test you solution, but I am corona-stuck abroad and lack access to the hardware. I will test it when I get back, and come back to you then.

Hi all, I also seem to be struggling to get the hereflow module integrated with PX4. I have it installed on a MRO pixracer running stable firmware and used the settings as per the px4 documentation page https://docs.px4.io/master/en/sensor/pmw3901.html#hex_hereflow_pwm3901
and also enabled the settings your using @ealdaz.

I can see the optic flow operating via the QGC analyzer window but I don鈥檛 see the built in distance sensor?
I checked the same setup using arducopter firmware and can confirm the built in ranging sensor works fine using the analyzer window.

Is there any other settings that need to be done to get this working?
Are there any flight modes I need to use to activate the optic flow hold? I.e position mode.

Any help would be much appreciated

Hi, I am trying to use Here Flow sensor with Cube Orange and mini Carier Board. Despite setting all parameters as above, I couldn鈥檛 get it to work. Have you maybe any tips?

Best regards, J臋drzej

Probably a related issue: Hereflow UAVCAN not working