mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
CollisionPrevention: address https://github.com/PX4/Firmware/pull/12179
review comments
This commit is contained in:
committed by
Beat Küng
parent
ac67d5603f
commit
1fb80612f3
@@ -27,4 +27,4 @@ uint8 ROTATION_CUSTOM =100 # MAV_SENSOR_ROTATION_CUSTOM
|
||||
|
||||
float32 h_fov # Sensor horizontal field of view (rad)
|
||||
float32 v_fov # Sensor vertical field of view (rad)
|
||||
float32[4] q # Quaterion sensor orientation to specify the orientation ROTATION_CUSTOM
|
||||
float32[4] q # Quaterion sensor orientation with respect to the vehicle body frame to specify the orientation ROTATION_CUSTOM
|
||||
|
||||
@@ -22,6 +22,5 @@ parameters:
|
||||
0: ROTATION_FORWARD_FACING
|
||||
6: ROTATION_LEFT_FACING
|
||||
2: ROTATION_RIGHT_FACING
|
||||
100: ROTATION_CUSTOM
|
||||
reboot_required: true
|
||||
default: 25
|
||||
|
||||
@@ -126,7 +126,7 @@ void CollisionPrevention::_updateDistanceSensor(obstacle_distance_s &obstacle)
|
||||
obstacle.timestamp = distance_sensor.timestamp;
|
||||
obstacle.max_distance = distance_sensor.max_distance * 100; // convert to cm
|
||||
obstacle.min_distance = distance_sensor.min_distance * 100; // convert to cm
|
||||
memset(&obstacle.distances[0], UINT16_MAX, sizeof(obstacle.distances));
|
||||
memset(&obstacle.distances[0], 0xff, sizeof(obstacle.distances));
|
||||
obstacle.increment = math::degrees(distance_sensor.h_fov);
|
||||
obstacle.angle_offset = 0.f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user