# 거리 센서 (거리 측정기)

거리 센서는 지형 추적, 지형 유지 (예 : 사진 촬영을 위한 정밀 호버링), 향상된 착륙 동작(거리 지원), 규제 높이 제한 경고, 충돌 방지 등에서 사용할 수있는 거리측정 기능을 제공합니다.

이 섹션에는 PX4에서 지원하는 거리 센서(더 자세한 문서에 링크됨), 모든 거리 측정기에 필요한 일반 설정, 테스트시뮬레이션을 설명합니다. 보다 자세한 설정과 정보는 아래 링크(및 사이드 바)를 참고하십시오.

Lidar Lite V3LightWare SF11/C LidarARK Flow

# 지원되는 거리 측정기

# ARK Flow

ARK Flow는 8cm에서 30m까지의 거리를 측정할 수 있는 오픈 소스 ToF(Time-of-Flight) 및 광학 흐름 센서 모듈입니다. CAN1 포트를 통해 비행 콘트롤러에 연결할 수 있으므로, CAN2 포트를 통해 추가 센서를 연결할 수 있습니다. PX4 펌웨어를 실행하고 UAVCAN 펌웨어 업데이트를 지원하며 소형 폼 팩터에 담겨 있습니다.

# Holybro ST VL53L1X Lidar

The VL53L1X (opens new window) is a state-of-the-art, Time-of-Flight (ToF), laser-ranging sensor, enhancing the ST FlightSense™ product family. 최대 4m의 정확한 범위와 최대 50Hz의 빠른 범위 주파수를 제공하는 시장에서 가장 빠른 소형 ToF 센서입니다.

It comes with a JST GHR 4 pin connector that is compatible with the I2C port on Pixhawk 4, Pixhawk 5X, and other flight controllers that follow the Pixhawk Connector Standard (opens new window)).

# Lidar-Lite

Lidar-Lite is a compact, high-performance optical distant measurement rangefinder. It has a sensor range from (5cm - 40m) and can be connected to either PWM or I2C ports.

# MaxBotix I2CXL-MaxSonar-EZ

The MaxBotix I2CXL-MaxSonar-EZ (opens new window) range has a number of relatively short-ranged sonar based rangefinders that are suitable for assisted takeoff/landing and collision avoidance. These can be connected using an I2C port.

The rangefinders are enabled using the parameter SENS_EN_MB12XX.

# Lightware LIDARs

Lightware SFxx Lidar provide a broad range of lightweight "laser altimeters" that are suitable for many drone applications.

PX4 supports: SF11/c and SF/LW20. PX4 can also be used with the following discontinued models: SF02, SF10/a, SF10/b, SF10/c.

# TeraRanger 거리계

TeraRanger provide a number of lightweight distance measurement sensors based on infrared Time-of-Flight (ToF) technology. They are typically faster and have greater range than sonar, and smaller and lighter than laser-based systems.

PX4 supports the following models connected via the I2C bus: TeraRanger One, TeraRanger Evo 60m and TeraRanger Evo 600Hz.

# Ainstein US-D1 Standard Radar Altimeter

The Ainstein US-D1 Standard Radar Altimeter is compact microwave rangefinder that has been optimised for use on UAVs. It has a sensing range of around 50m. A particular advantages of this product are that it can operate effectively in all weather conditions and over all terrain types (including water).

# LeddarOne

LeddarOne is small Lidar module with a narrow, yet diffuse beam that offers excellent overall detection range and performance, in a robust, reliable, cost-effective package. It has a sensing range from 1cm to 40m and needs to be connected to a UART/serial bus.

# TFmini

The Benewake TFmini Lidar is a tiny, low cost, and low power LIDAR with 12m range.

# PSK-CM8JL65-CC5

The Lanbao PSK-CM8JL65-CC5 ToF Infrared Distance Measuring Sensor is a very small (38 mm x 18mm x 7mm, <10g) IR distance sensor with a 0.17m-8m range and millimeter resolution. It must be connected to a UART/serial bus.

# Avionics Anonymous UAVCAN Laser Altimeter Interface

The Avionics Anonymous UAVCAN Laser Altimeter Interface allows several common rangefinders (e.g. Lightware SF11/c, SF30/D, etc) to be connected to the UAVCAN bus, a more robust interface than I2C.

# 설정

Rangefinders are usually connected to either a serial (PWM) or I2C port (depending on the device driver), and are enabled on the port by setting a particular parameter.

The hardware and software setup that is specific to each distance sensor is covered in their individual topics.

The generic configuration that is common to all distance sensors, covering both the physical setup and usage, is given below.

# 일반 설정

The common rangefinder configuration is specified using EKF2*RNG** parameters. These include (non exhaustively):

  • EKF2_RNG_POS_X, EKF2_RNG_POS_Y, EKF2_RNG_POS_Z - 기체 무게 중심에서 X, Y, Z 방향의 오프셋
  • EKF2_RNG_PITCH - 0도 (기본값) 값은 기체 수직 축 (즉, 아래로 똑바로 아래)에 정확히 정렬된 거리 측정기에 해당하고, 90도는 거리 측정기가 앞을 향하고 있음을 나타냅니다. 0이 아닌 피치가 사용되는 경우 간단한 삼각법을 사용하여 지면까지의 거리를 계산합니다.
  • EKF2_RNG_DELAY - 센서에서 추정기에 도달하는 데이터의 대략적인 지연.
  • EKF2_RNG_SFE - 범위 파인더 범위 종속 노이즈 스케일러.
  • EKF2_RNG_NOISE - 거리 측정기 융합을 위한 측정 노이즈

# 시험

The easiest way to test the rangefinder is to vary the range and compare to the values detected by PX4. The sections below show some approaches to getting the measured range.

The QGroundControl MAVLink Inspector lets you view messages sent from the vehicle, including DISTANCE_SENSOR information from the rangefinder. The main difference between the tools is that the Analyze tool can plot values in a graph.

Note

The messages that are sent depend on the vehicle configuration. You will only get DISTANCE_SENSOR messages if the connected vehicle has a rangefinder installed and is publishing sensor values.

To view the rangefinder output:

  1. Open the menu Q > Select Tool > Analyze Tools:

    QGC 분석 도구 메뉴

  2. Select the message DISTANCE_SENSOR, and then check the plot checkbox against current_distance. 그러면, 도구가 결과를 플로팅합니다. QGC DISTANCE_SENSOR 값 분석

You can also use the QGroundControl MAVLink Console to observe the distance_sensor uORB topic:

listener distance_sensor 5

Note

The QGroundControl MAVLink Console works when connected to Pixhawk or other NuttX targets, but not the Simulator. On the Simulator you can run the commands directly in the terminal.

For more information see: Development > Debugging/Logging > Sensor/Topic Debugging using the Listener Command.

# 시뮬레이션

Lidar and sonar rangefinders can be used in the Gazebo Simulator. To do this you must start the simulator using a vehicle model that includes the rangefinder.

The iris optical flow model includes a Lidar rangefinder:

make px4_sitl gazebo_iris_opt_flow

The typhoon_h480 includes a sonar rangefinder:

make px4_sitl gazebo_typhoon_h480

If you need to use a different vehicle you can include the model in its configuration file. You can see how in the respective Iris and Typhoon configuration files: