Servers by jDrones

Hereflow sensor with UAVCAN, optical flow not recognized

Hi!

We connected the Hereflow to the Pixhawk4Mini and used Qgroundcontrol to flash it with Arducopter 4.0.0. Afterwards we proceeded with setting up the parameters as instructed in https://ardupilot.org/copter/docs/common-hereflow.html and connected the HereFlow using CAN.

After rebooting, when opening the MAVLink Inspector and selecting OPTICAL_FLOW, it displays a refresh rate of 0 Hz, a count of 0 and no values. Unfortunately, we have found no way of getting a response from the optical flow of the sensor.

We actually did get a response from the range sensor, it seems to work precisely. We found it under DISTANCE_SENSOR.current_distance.

Do you have an idea of how to proceed to get the optical flow data?

Any help would be greatly appreciated :slight_smile:

did you set flow_type=6 and you can driver to 1?

Give it a look to this link

https://docs.cubepilot.org/user-guides/flow-senor/here-flow

Hi, thank you for the quick answer!

Yes, we set those two. As described in https://ardupilot.org/copter/docs/common-hereflow.html, we set these:

FLOW_TYPE = 6 (UAVCAN)
CAN_P1_DRIVER= 1 to enable UAVCAN
CAN_D1_PROTOCOL= 1 (UAVCAN)
RNGFND1_TYPE = 24 (UAVCAN)
RNGFND1_MAX_CM = 300 to set range finder’s maximum range to 3m

Is there more parameters that are relevant?

We’ve found an issue in Copter-4.0.0 in which it wasn’t sending the optical flow messages unless the EKF had a height estimate which makes testing more difficult. Could you try with Copter-4.0.1-rc2 (the latest beta)?

If that doesn’t work then it would be good to provide a log file.

By the way, I’ve found that the HereFlow range finder performs very poorly. I think it will be difficult to get good performance unless a longer range and more reliable range finder is used. I might update the wiki to mention this.

1 Like

Hi, thank you for the quick answer!

Perhaps that is the problem then. We did get some readings from the range sensor, do you know how to make that propagate to the EKF height estimate?

I can try with Copter-4.0.1-rc2 next time I am in the lab. This may be a noob question, but do you know how to do it? In Qgroundcontrol only Copter-4.0.0 was listed.

I guess we can expect superior performance from something that cheap, small and lightweight. We will only be using it indoors, so we don’t have very high demands from it. Still, we have a terraranger unit we can use in addition.

1 Like

@Henrik,

I’m afraid that I’m not sure how to load beta firmwares using QGC although I think it is possible. It’s also possible to directly download the firmware to your PC from firmware.ardupilot.org but you’ll need to find the correct directory that matches the board you’re using. Also I’m not sure how to upload a custom firmware using QGC but again I suspect it’s possible.

Hi again,

I tried to flash the beta version(4.0.1-rc2). There was a option in the Qgroundcontrol interface, so that was easy.

I get the error Check BRD_TYPE: Failed to update IO firmware. In the interface to set BRD_TYPE, I could not find Pixhawk4Mini(which we are using). There were not even an option for Pixhawk4.

Without setting more parameters, I could not monitor the sensor values, so I do not yet know if it works. I will have a look at it in the weekend, when I have more time.

Servers by jDrones