I was recently setting up two Benewake Rangefinders on my Arducopter using UART for both of the rangefinders. I have one mounted downwards and one forwards. I was able to successfully get the rangefinders working and measuring thanks to great documentation on the wiki pages. However, when I went to change the usage of the front facing rangefinder to a Proximity Sensor for simple obstacle avoidance, I couldn’t find much on how to tell which PRXx parameter to use. I set PRX1 to 4, and got it working, but how does Arducopter know which rangefinder is “1” or which is PRX2, or 3, etc in this case? It doesn’t seem to matter which of the two rangefinders is set as RNGFND1 and RNGFND2, does it have something to do with which rangefinder is first in the sequential listing of serial ports? I’d really appreciate any clarification on this scenario - thanks!
hi @dpapworth ! I have the same doubt. did you find any explanation?
you set the rangefinder orientation in its setting parameters
I’ve been getting the same data for rngfnd_1 and rngfnd_2. one is in the i2c1 port and other is in the i2c3 port. the one on the i2c1 port is downward facing and is updated in the params. the other is forward facing and planning to use it for obstacle avoidance
Can you please elaborate more
im not sure if thats a supported configuration, I think all i2c rangefinders need different addresses as you can’t set the bus its on.
I’m still a novice and i apologise if my doubts are stupid. How do we setup the bus address and what am i supposed to do since i need downward facing lidar for altitude
Hi @varun-sappa I was working on this about a year ago but am recently going to be jumping back into it again. As far as I recall, it was kind of a guess and check, verifying which device was which and how it was working by checking the readings via Mission Planner’s “quick” settings bar and/or the proximity sensor “sonar” screen with the Ctr-A shortcut. As was pointed out though, my rangefinders were both on UART, which would potentially be different than yours on i2c. If I find anything out, I’ll be sure to come back and post.