Obstacle avoidance with UAV - R21F

how can i use UAV-R21F CAN obstacle avoidance module with orange cube. If i want more CAN sensors with orange do i have to use CAN splitter ?
this the link of the sensor

First of all, you have to check if this sensor is already supported by Arducopter, by checking the ArduCopter user guide ArduPilot Copter — Copter documentation. I never heard about of this sensor, I fear that it is not supported yet… but conduct a research by yourself.

If it is not available it, you can develop the sensor driver and contribute to the community.

I do not have much knowledge on this, and most probably the answer is “depends”, but maybe @ppoirier can clarify it for you.

Yes a driver has to be written, it should be relatively easy to reuse an existing CAN proximity driver.

Looking at the manual, it seems it is just outputting distance within a 28 deg FoV with no Bearings… making it less interesting for avoidance

@rishabsingh3003 is working on a multibackend proximity driver that should be released soon, making it possible to connect multiple proximity sensor on the same bus, providing the sensor can have adressing capability

1 Like

This sensor is working under Benewake CAN sensor type.

What need configure in ardupilot to using this sensor? CAN driver to DroneCAN or Benawake? rngfnd1_type to 34?

Hi.

What driver im can using for this sensor?

Assuming @kalai1219 is right, and that you want to use CAN1, then set:

  • CAN_P1_DRIVER = 1
  • CAN_P1_BITRATE = 250000
  • CAN_D1_PROTOCOL = 11
  • RNGFND1_TYPE = 34

Bit rate may be higher depending on revision

Yes working… thanks… my sensor have broken cable((

good to hear that you got working. What parameters changes you finally achieved .

can protocol and range finder type to 34. But my sensor say always 16393 - im need debug what this maybe broken sensor…

Hello,
I am having same R21 radar for obstacle avoidance, I have tried the same method provided into the thread but I’m not getting any output from the sensor. I have connected the external supply of 12 volt and can h and can l are connected in the middle of can 1 port

Hello, I’m getting the same error. Were you able to solve it?

Hello Evgen_Stenkin,

        I am also facing the same issue of 163.39, seems the same issue. Did you get chance to crack the issue.

Hello Kalai,

I am trying integrate the UAV-R21-F obstacle avoidance CAN module with Ardupilot (4.4.3) by enabling the following macros and parameters. However, I am not getting the values from the sensor. Am i missing anything? kindly help

Macros in hwdef.dat

define AP_RANGEFINDER_BACKEND_DEFAULT_ENABLED 1
define AP_RANGEFINDER_ENABLED 1
define HAL_NUM_CAN_IFACES 2

paramters

CAN_P1_DRIVER = 1
CAN_P1_BITRATE = 1000000
CAN_D1_PROTOCOL = 11
RNGFND1_TYPE = 34
RNGFND1_MIN_CM = 100
RNGFND1_MAX_CM = 2000
RNGFND1_ORIENT = 0
PRX1_TYPE = 4