I am trying to get my Terabee Teraranger 15m sensor to work for forward facing collision avoidance. I have it connected through I2C. I also have a downward facing lidar for altitude accurac. It is connected through PWM (and is set as rangefinder 1). I have set the following parameters set for the Teraranger (rangefinder 2):
RNGFND2_ADDR = 49
RNGFND2_MAX_CM = 1500 (TeraRanger15m)
RNGFND2_MIN_CM = 50 (TeraRanger15m)
RNGFND2_ORIENT = 0
RNGFND2_TYPE = 14
PRX_TYPE = 4
AVOID_ENABLE = 2
AVOID_MARGIN = 5 (controls how many meters from the barrier the vehicle will attempt to stop or try to slide along it)
AVOID_DIST_MAX = 5 (Distance from object at which obstacle avoidance will begin in non-GPS modes)
AVOID_BEHAVE = slide (allows setting whether the vehicle should simply Stop in front of the barrier or Slide around it)
AVOID_ANGLE_MAX = 2000 (Max lean angle used to avoid obstacles while in non-GPS modes)
If I have the PRX_TYPE set, it gives bad proximity and will deny the arm command. The Teraranger, does work when I view the proximity map while on the ground.
If I set PRX_TYPE to zero, it will not use the sensor for avoidance, but will allow me to arm.
Does anyone have any experience with these? I am not sure why it is giving a bad proximity error.