Does Ardurover only support one range finder?

My boat is now equipped with two range finders. A Kogger that reports depth readings as NMEA and a Benewake TF02 Pro for measuring distances in front of the boat. Both sensors seems to work well on their own. But running both seems to be a problem: The depth readings shut down instantly when I turn on the Benewake, and restarts as soon as I disable the Benewake (both sensors are controlled by RC switches).

So: Does ardupilot (rover) support multiple range finders?

If yes I need to look closer at how I implemented rangefinder support in my Carp Pilot app…

Yes, AP supports up to 9.

Thanks. That’s what I thought.
Looking back into my code I built the ability based on the Mavlink common msg_distance_sensor. I could have tried rangefinder instead. But got the understanding it should not matter. My implementation still relies on mavlink 1, but I cannot see that it should matter.
Then: Either I have a problem in my code (two different fragments listening for the same broadcast), or I did something wrong in my pixhawk setup. My boat is the only test environment I have right now since there are no tools for sitl to simulate nmea input from the downwards rangefinder. I probably have one of the few boats with multiple rangefinders anyway and don’t expect a rush of complaints from app users :slightly_smiling_face:

You’ve got the RNGFNDx_ORIENT set to different values for each lidar? I.e. one of them should be “0” for forward and the other should be “25” for downward.

Yes. Both range finders works perfectly on their own as long as only one is activated.
At one point I decided to put a small rc switch in front of both sensors. I know that Mission Planner is not very found of me switching them off (typically get a “bad lidar health”, which of course is true when I disable the vcc).
So I made two “widgets” in the app:
One for general rangefinders, where you select the orientation from a dropdown list that then displays the measured distance
And a second one for depth only that only cares for orientation = 25. This has an additional feature to create a csv file (loading the recorded depths from the Pixhawk log files takes way too much time).

So each sensor works very well on their own when switched on from the RC (or preferably the app).

But as soon as I engage both, the front sensor is the only one working. If I disable it, my depth widgets starts to get data again.

Both widgets listen to a slightly modified Dronekit that forwards the distance sensor message. So either I did something wrong along the way in Pixhawk setup, or I got an implementation detail wrong in my Android code. Because the clear feedback here is that it does work from the Ardurover side. Which I needed to get clarified :slightly_smiling_face:

Based on the feedback I obviously have to look further on my side.considering that multiple rangefinders are indeed supported and that the choice to use the distance_sensor message was a good choice for multiple sensors (I then assume I will get multiple messages from the autopilot, one per sensor configured).

Hello Olav Aamaas! ,
I want to contact you to talk about Kogger sonar. I have so many doubts and questions… Not found for me (I already have SONAR 2D-BASE from Kogger).

I create a post in this forum:
Underwater sonar problem - ArduRover / ArduBoat - ArduPilot Discourse
Best regards, Revu.

Sorry for not paying attention here. But we got in contact in other ways :slightly_smiling_face:

1 Like