No readings from apparently working rangefinder

I’ve been struggling for a while getting a rangefinder (TF-Luna, serial mode) to work properly.

I know it’s working because I can see that in the “Proximity UI” of MP:


But it doesn’t report any data.

From what I read here: Benewake TFmini / TFmini Plus lidar — Copter documentation the readings should show up in MP Status as “sonarrange” (not as “rangefinder1” as one might expect), but the value is always zero, as if no rangefinder was connected.

Additionally I’m wondering about the OSD element OSDn_RNGF (also showing nothing for me): Is it supposed to show the same rangefinder reading that should show up as sonarrange, or the reading for rangefinder1? And are rangefinders1-4 actually proximity sensors?


Its supposed to show as rangefinder1, i belive sonar range was legacy parameter and i dont think is used anymore.

If you have prx_type set to 4 for using rangefinders as proximity then it will stop showing as a rangefinder and only show on the proximity window.

1 Like

Ok thanks, so then I should set prx_type to zero I guess? Will I still get simple object avoidance in that case? (Because that’s what I want to test, like in the demo video with the umbrella a while ago.)

To be honest, I think I still don’t fully get the difference between rangefinder and proximity. From what I understand from the wiki, proximity is 360° and provided either by a real 360° sensor or a combination of up to 10 rangefinders - yet there are only 4 listed in MP Status, presumably meant for front/back/left/right? Rangefinder on the other hand is described as a narrow beam. Can 4 narrow beams really replace a full 360° scan?

You can have up to 10 rangefinders as proximity, they dont show as rangefinders once you enable proximity.

I dont think avoidance will work without them set as a proximity sensor but im not sure.

1 Like

Thanks again, last question: There is an RC_OPTION named Rangefinder. On the copter I’m trying this out I used to get (probably before misconfiguring the rangefinder as proximity at some point) a message “Rangefinder low/middle/high”. What does it actually do? The range is fixed as far as I know (30cm to 5m in my case).

As for how to set it up, I’d especially like to see the rangefinder OSD value, so I always know it’s working. As it looks now, this will only be possible by setting it as rangefinder. So best for me would be object avoidance + OSD value, but I’ll test that later today.

On copter, rangefinder is generally used for altitude control when set to orientation 25(down) where proximity is for avoiding objects around it.

So i assume the rangefinder switch is for altitude control and proximity is for avoidance.

1 Like

you will find most OSDs and telemetry scripts for radios only display rangefinders if they are set to orientation 25, since its usually used for altitude hold/terrain following.

Yes, inspecting or tracing rangefinders is very confusing and contradictory. I’ve seen flying and inspecting logs (rangefinder .Dist and .Status) is reliable.

1 Like