Different orientation virtual rangefinders not receiving data

Hi all,

I added 5 virtual rangefinders with different orientation (left, right, down, forward and back) and it was updated in the parameter list using the steps here https://ardupilot.org/dev/docs/using-sitl-for-ardupilot-testing.html with an additional RNGFNDx_ORIENT for each orientation. However, all the rangefinders are reading the same distance which corresponded to the down(default) rangefinder. How can I get the correct data for all the orientations?

Also, there is only one function in dronekit-python (vehicle.rangefinder.distance) that reads the rangefinder distance which corresponds to the down rangefinder. Are there other functions to read this distance for all the different orientation?

Kindly assist.

1 Like

What STIL backed are you using? Built in SITL is just a flat earth so rangefinders other than down never see anything.

Airsim supports lidar that you can is for proximity avoidance, there are a couple of others too.

Thanks for your response. I am using APM SITL in Gazebo. I placed 4 walls around the copter(square fashion). I was thinking the RNGFNDx_ORIENT determines the direction of the range. Is there a way to add proximity sensors to detect forward range in other directions?