!REDIRECT “https://docs.px4.io/master/zh/middleware/modules_driver_distance_sensor.html

Modules Reference: Distance Sensor (Driver)

leddar_one

Source: drivers/distance_sensor/leddar_one

Description

Serial bus driver for the LeddarOne LiDAR.

Most boards are configured to enable/start the driver on a specified UART using the SENS_LEDDAR1_CFG parameter.

Setup/usage information: https://docs.px4.io/master/en/sensor/leddar_one.html

Examples

Attempt to start driver on a specified serial device.

  1. leddar_one start -d /dev/ttyS1

Stop driver

  1. leddar_one stop

Usage

  1. leddar_one <command> [arguments...]
  2. Commands:
  3. start Start driver
  4. -d <val> Serial device
  5. [-r <val>] Sensor rotation - downward facing by default
  6. default: 25
  7. stop Stop driver

lightware_laser_i2c

Source: drivers/distance_sensor/lightware_laser_i2c

Description

I2C bus driver for Lightware SFxx series LIDAR rangefinders: SF10/a, SF10/b, SF10/c, SF11/c, SF/LW20.

Setup/usage information: https://docs.px4.io/master/en/sensor/sfxx_lidar.html

Usage

  1. lightware_laser_i2c <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. stop
  13. status print status info

lightware_laser_serial

Source: drivers/distance_sensor/lightware_laser_serial

Description

Serial bus driver for the LightWare SF02/F, SF10/a, SF10/b, SF10/c, SF11/c Laser rangefinders.

Most boards are configured to enable/start the driver on a specified UART using the SENS_SF0X_CFG parameter.

Setup/usage information: https://docs.px4.io/master/en/sensor/sfxx_lidar.html

Examples

Attempt to start driver on a specified serial device.

  1. lightware_laser_serial start -d /dev/ttyS1

Stop driver

  1. lightware_laser_serial stop

Usage

  1. lightware_laser_serial <command> [arguments...]
  2. Commands:
  3. start Start driver
  4. -d <val> Serial device
  5. [-R <val>] Sensor rotation - downward facing by default
  6. default: 25
  7. stop Stop driver

ll40ls

Source: drivers/distance_sensor/ll40ls

Description

I2C bus driver for LidarLite rangefinders.

The sensor/driver must be enabled using the parameter SENS_EN_LL40LS.

Setup/usage information: https://docs.px4.io/master/en/sensor/lidar_lite.html

Usage

  1. ll40ls <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. regdump
  13. stop
  14. status print status info

mappydot

Source: drivers/distance_sensor/mappydot

Usage

  1. mappydot <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. stop
  11. status print status info

mb12xx

Source: drivers/distance_sensor/mb12xx

Usage

  1. mb12xx <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-a <val>] I2C address
  11. default: 112
  12. set_address
  13. [-a <val>] I2C address
  14. default: 112
  15. stop
  16. status print status info

pga460

Source: drivers/distance_sensor/pga460

Description

Ultrasonic range finder driver that handles the communication with the device and publishes the distance via uORB.

Implementation

This driver is implented as a NuttX task. This Implementation was chosen due to the need for polling on a message via UART, which is not supported in the work_queue. This driver continuously takes range measurements while it is running. A simple algorithm to detect false readings is implemented at the driver levelin an attemptto improve the quality of data that is being published. The driver will not publish data at all if it deems the sensor data to be invalid or unstable.

Usage

  1. pga460 <command> [arguments...]
  2. Commands:
  3. start
  4. [device_path] The pga460 sensor device path, (e.g: /dev/ttyS6)
  5. status
  6. stop
  7. help

srf02

Source: drivers/distance_sensor/srf02

Usage

  1. srf02 <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. stop
  13. status print status info

srf05

Source: drivers/distance_sensor/srf05

Description

Driver for HY-SRF05 / HC-SR05 and HC-SR04 rangefinders.

The sensor/driver must be enabled using the parameter SENS_EN_HXSRX0X.

Usage

  1. srf05 <command> [arguments...]
  2. Commands:
  3. start Start driver
  4. [-R <val>] Sensor rotation - downward facing by default
  5. default: 25
  6. status Print driver status information
  7. stop Stop driver
  8. stop
  9. status print status info

teraranger

Source: drivers/distance_sensor/teraranger

Description

I2C bus driver for TeraRanger rangefinders.

The sensor/driver must be enabled using the parameter SENS_EN_TRANGER.

Setup/usage information: https://docs.px4.io/master/en/sensor/rangefinders.html#teraranger-rangefinders

Usage

  1. teraranger <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. stop
  13. status print status info

tfmini

Source: drivers/distance_sensor/tfmini

Description

Serial bus driver for the Benewake TFmini LiDAR.

Most boards are configured to enable/start the driver on a specified UART using the SENS_TFMINI_CFG parameter.

Setup/usage information: https://docs.px4.io/master/en/sensor/tfmini.html

Examples

Attempt to start driver on a specified serial device.

  1. tfmini start -d /dev/ttyS1

Stop driver

  1. tfmini stop

Usage

  1. tfmini <command> [arguments...]
  2. Commands:
  3. start Start driver
  4. -d <val> Serial device
  5. [-R <val>] Sensor rotation - downward facing by default
  6. default: 25
  7. status Driver status
  8. stop Stop driver
  9. test Test driver (basic functional tests)
  10. status Print driver status

ulanding_radar

Source: drivers/distance_sensor/ulanding_radar

Description

Serial bus driver for the Aerotenna uLanding radar.

Setup/usage information: https://docs.px4.io/v1.9.0/en/sensor/ulanding_radar.html

Examples

Attempt to start driver on a specified serial device.

  1. ulanding_radar start -d /dev/ttyS1

Stop driver

  1. ulanding_radar stop

Usage

  1. ulanding_radar <command> [arguments...]
  2. Commands:
  3. start Start driver
  4. -d <val> Serial device
  5. values: <file:dev>, default: /dev/ttyS3
  6. [-R <val>] Sensor rotation - downward facing by default
  7. default: 25
  8. stop Stop driver

vl53l0x

Source: drivers/distance_sensor/vl53l0x

Usage

  1. vl53l0x <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. stop
  13. status print status info

vl53l1x

Source: drivers/distance_sensor/vl53l1x

Usage

  1. vl53l1x <command> [arguments...]
  2. Commands:
  3. start
  4. [-I] Internal I2C bus(es)
  5. [-X] External I2C bus(es)
  6. [-b <val>] board-specific bus (default=all) (external SPI: n-th bus
  7. (default=1))
  8. [-f <val>] bus frequency in kHz
  9. [-q] quiet startup (no message if no device found)
  10. [-R <val>] Sensor rotation - downward facing by default
  11. default: 25
  12. stop
  13. status print status info