Proximity sensor as the upward-facing rangefinder source

Hello, I am setting up the proximity sensor using a TF-mini plus. While I have confirmed that it works correctly in the four horizontal directions, it does not function when facing upward.

The only difference in parameters between the horizontal directions and the upward direction is the RNGFNDx_ORIENT, which is set to (24: up). I tried changing PRX_ORIENT and RNGFNDx_FUNCTION, but it did not work.

I am also wondering whether it even works when facing upward or downward. If anyone is familiar with this, I would appreciate your input.

Thank you!

https://ardupilot.org/dev/docs/code-overview-object-avoidance.html#code-overview-object-avoidance

While referring to various documents, I came across the following page and found the following passage:

β€œThe vehicle will also stop before hitting barriers above it if there is an upward facing range finder. Currently this range finder’s distance must be sent to ardupilot using the DISTANCE_SENSOR message with the orientation field set to 24 (upwards).”

To implement this, should I directly program the sensor (TF-mini plus)? Or would it be sufficient to input the message to the FC via a companion computer?

Currently, the TF-mini plus communicates with the FC via I2C, but would it be necessary to change the protocol to serial communication?

If anyone has knowledge of this, I would appreciate your guidance! Please help!

Thank you!

It should work have you enabled rangefinders as proximity sensors? PRX1_TYPE = 4

Thank you for your reply.
I have set PRX_TYPE as such, and it works correctly in the horizontal directions (front, back, left, and right).
However, it doesn’t work when facing upward.

does it show up in mavlink inspector?

I can confirm the rangefinder.
γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2024-10-01 155254

I was also able to confirm the DISTANCE_SENSOR, and the current_distance changes normally.
γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2024-10-01 185822

What mode are you testing with? I think it only works in althold and loiter.

Thank you.

The method of confirmation I am using is to hover my hand in front of the sensor in AltHold mode and check if it changes to β€˜Not ready to Arm.’

In this case, will it only change to β€˜Not ready to Arm’ when it’s level? Also, do you think it will function correctly during actual flight?

Although the horizontal sensor is functioning properly, only the upward-facing sensor is displayed in the DISTANCE_SENSOR. Is this phenomenon normal?

im not sure, I have never used an upward avoid sensors but as far as I can tell it should work. @rishabsingh3003 any thoughts?