Avoidance Experiments with the POC and Benewake TFMINI

@Dewa That’s probably because he also has a working forward-facing lidar connected to the Copter.

The bug is that while checking for the status of the rangefinder proximity sensor (whether the sensor is healthy or not), it is only checking for horizontal rangefinders. This means if you have an upward only rangefinder… it’s ignoring it and complaining that there is no proximity device detected even though you have the param switched on (PRX_TYPE). You can trick the problem, by adding a horizontal rangefinder and that way the status should again become okay and everything will work.

As a test, if you have two rangefinders connected, change one of the RNGFND_ORIENT to be 0, and the other to be 24, it should again start working.

1 Like

@rishabsingh3003 maybe u can see at second part in video
he just using upward facing and downward facing without forward

@Dewa I’ll have to confirm with Randy how he got this working. Perhaps it was a bug introduced after Copter 3.6. It’s definitely a bug 4.0.x onwards :slight_smile:

1 Like

@rishabsingh3003 Lol…
maybe that’s how it is
great hope it can be realized in the latest firmware :smiley:

@Dewa this has been fixed in Master, and will probably roll out in the next beta release

Hello @ppoirier
Can this MAVLink PRX sensor work with the telemetry radio ??
After I connect this Sensor , there are no telemetry radio’s data feedback

Hello
These sensors can generate a lot of traffic and overload the radio link. You can mitigate this situation by reducing the proximity message rate or just keep the message local to FC by configuring mavlink routing to target_system
https://mavlink.io/en/guide/routing.html#routing-detail

I got it !!
I try to adding delay in the arduino code to solve this problem.
Thank you very much !!!

hello greetings,
i tried this arduino libraries to work with my cube orange dev 4.1 . but no luck with the mavlink connection.
even mavlink inspector won’t detect any components.
any one have tried this with dev 4.1 version. any pointers would be nice.
thank you

Hello
If it was working on your setup with a prior release then there might be something broken.
I know @rishabsingh3003 is working extensively at the moment on this part of the code.

2 Likes

@RAZOR15000, as far as I am aware the arduino script we are talking about sends DISTANCE_SENSOR messages, and when I last tested this message (a couple of months back), it was working as expected.

For distance_sensor, functionality-wise, we haven’t changed anything, so this should still work. Can you try flashing Copter 4.0.7 and see if it starts working again? Then we’ll know if it’s really a bug with the firmware or not…

2 Likes

@rishabsingh3003 @ppoirier hello thank you for your kind reply.

i got able to working with the dev 4.1. the problem was, i was using onboard serial port. as soon as i switched to software serial, it worked fine.

how ever i have another question to ask.
in my setup, proximity is working and it properly indicates in the GUI. but im in need to get the data to display on the rangefinder section. is it possible to get the mavlink distance data to show up on the rangefinder (only one is enough, )
thank you
kind regards
image

@RAZOR15000 I am really not sure when I say this, mostly because I barely ever use MP. But I think those rangefinder sections are used for Downward facing rangefinders only (used for terrain following). This is just a guess though

1 Like

yes exactly , i need one for terrain following .

On my experiments I dedicated one of the sensors as a rangefinder and it is connected as a “standard” device directly to the FC and the signal appears as a rangefinder signal. The POC act as proximity and signals appears on the “radar screen”.

1 Like

yes sir, that will be the last choice. i was trying to save up the serial ports.
thank you very much for your reply.

Depending on the sensor model you can use I2C, check on my other blog on the TFMINI-s

1 Like

@RAZOR15000 I don’t think I understand your problem properly.
DISTANCE_SENSOR has two uses depending on the sensor orientation that you have set (see https://mavlink.io/en/messages/common.html#MAV_SENSOR_ORIENTATION)

  1. Use for avoidance as a proximity sensor
  2. Use for terrain-following as a downward-facing range finder

If you want to use for “1” then the orientation field of DISTANCE_SENSOR has to be: between 0 - 7, depending on which direction the sensor is facing.

If you want to use for “2” then the orientation field of DISTANCE_SENSOR has to be: 25, so that the ArduPilot know the message is for downward-facing direction.

To see the DISTANCE_SENSOR fields: https://mavlink.io/en/messages/common.html#DISTANCE_SENSOR

sorry for my bad communication.

i want to use the rangefinders for the proximity detection.
image
i just need to monitor the distance values from the ground station. in order to do that i need to guide the mavlink data from the arduino to this rangefinder sections,
image

but im struggling to do that.
proximity GUI is working fine when using the PRX_TYPE =2

As @rishabsingh3003 wrote, you can use Mavlink signal for both proximity and range finder , the drivers will filter the incoming signals depending on the orientation.

Here’s how the rangefinder is filtering the mavlink distance message

1 Like