How can I connect multiple hereflows in 1 CAN port?


I’m building my own drone with a fork version of Ardupilot 4.1.5, I’m using a mRo PixRacer R15 as flight controller and I am currently using a Hereflow facing downward in the only CAN port of the pixracer. I intend to add another Hereflow facing upward to have a backup measure, but I am not sure how to do it.

I know there is a topic like this from years ago where they say it was a work in progress but never gave the details if it was finished.

Basically what I want to know is:

  1. If I use a splitter like this, can I just connect both Hereflow sensors?
  2. If not, what is the proper way to do it?
  3. Has anyone seen a project using multiple Hereflows? I do not seem to find anything out there.

Any help would be appreciated,


The main issue is the support for multiple flow sensors is not supported in Ardupilot firmware. I will try to find time to add support for this.

Oh I see, thanks for the quick response.

Actually I am using a fork version, trying to develop my own controller for my own scenario. So I just need the value of the measures, even if this support is still not yet developped, can I somehow get the measure from the port? maybe by ID or something ? Is it possible ?

Unfortunately it’s not that straight forward. The driver needs changes to add support for multiple sensors and also ordering as the position parameters need to be tied to each sensor. If you are interested in developing, you need to look at AP_Compass, AP_GPS or AP_InertialSensor as an example.

1 Like

I looked at the files you mentioned but I think it is out of my capacities. If you guys ever find the time to add the support for multiple Hereflows it would be great

@sidbh, I work with David. We’d be willing to modify the ardupilot code ourselves. Who should we talk to at Cubepilot to better understand the scope of the changes we need to make?

Is there already a support for multiple sensor setup in PX4?
I would love to use the hereflow sensor the same way as DJI uses multiple cameras around for 360 view and super stable indoor flight

Hi @clement That would be me, if you have development related queries on Ardupilot. I recommend you to join ardupilot discord. ArduPilot Discord Server — Dev documentation . I am available there with same name just @ me there.

@JulianOes is this something that’s supported on PX4?

It looks like multiple flow sensors are generally supported in PX4, judging from the fact that the uORB topic allows for multiple instances. However, I’m not sure whether this is possible with Hereflow over CAN. I’ll look into it in detail tomorrow.

Ok, so I don’t have more than one Hereflow, so I can’t exactly test this. However, I do have one Hereflow and one ARK Flow and I can connect both on the same CAN1 but and they both appear when I check using listener sensor_optical_flow. To enable flow via CAN, don’t forget to set UAVCAN_SUB_FLOW to 1.

I have tested this with main and v1.14.0.

One thing I wonder: can you set the Hereflow to different IDs? And have you done so?

Thanks for the help guys. Just to close the loop on this, we’ve managed to connect 2 Hereflows by slightly modifying the code of the optical flow backend in Ardupilot. We receive data from both sensors.

1 Like