Hi,
I’m trying to test out avoidance on ArduCopter in a SITL configuration by injecting sensor measurements. I have the following ArduCopter parameters:
param set PRX1_TYPE 2 # MAVLink (have also tried 4, RangeFinder)
param set AVOID_ENABLE 7
param set AVOID_BEHAVE 1
param set AVOID_MARGIN 2
param set SCR_ENABLE 1 # for custom messaging script
reboot
I have a Lua script loaded that is sending both DISTANCE_SENSOR and OBSTACLE_DISTANCE messages at 100 Hz. Examples from watch command in the MAVProxy controlling my ArduCopter:
< DISTANCE_SENSOR {time_boot_ms : 429217, min_distance : 20, max_distance : 1200, current_distance : 30, type : 0, id : 1, orientation : 0, covariance : 0, horizontal_fov : 0.0, vertical_fov : 0.0, quaternion : [0.0, 0.0, 0.0, 0.0], signal_quality : 100}
and
< OBSTACLE_DISTANCE {time_usec : 450303, sensor_type : 0, distances : [30, 30, 30, 30, 30, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201, 1201], increment : 5, min_distance : 20, max_distance : 1200, increment_f : 0.0, angle_offset : 0.0, frame : 12}
Shortly after I reboot with PRX1_TYPE set, I get PreArm: PRX1: No Data in QGroundControl. Why is this happening? What am I missing?