mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:43:35 +08:00
Move PX4 Guide source into /docs (#24490)
* Add vitepress tree * Update existing workflows so they dont trigger on changes in the docs path * Add nojekyll, package.json, LICENCE etc * Add crowdin docs upload/download scripts * Add docs flaw checker workflows * Used docs prefix for docs workflows * Crowdin obvious fixes * ci: docs move to self hosted runner runs on a beefy server for faster builds Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: don't run build action for docs or ci changes Signed-off-by: Ramon Roche <mrpollo@gmail.com> * ci: update runners Signed-off-by: Ramon Roche <mrpollo@gmail.com> * Add docs/en * Add docs assets and scripts * Fix up editlinks to point to PX4 sources * Download just the translations that are supported * Add translation sources for zh, uk, ko * Update latest tranlsation and uorb graphs * update vitepress to latest --------- Signed-off-by: Ramon Roche <mrpollo@gmail.com> Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
co-authored by
Ramon Roche
parent
8e6d2ebe4a
commit
88d623bedb
@@ -0,0 +1,12 @@
|
||||
# Accelerometer Hardware & Setup
|
||||
|
||||
PX4 uses accelerometer data for velocity estimation.
|
||||
|
||||
You should not need to attach an accelometer as a stand-alone external device:
|
||||
|
||||
- Most flight controllers, such as those in the [Pixhawk Series](../flight_controller/pixhawk_series.md), include an accelerometer as part of the flight controller's [Inertial Motion Unit (IMU)](https://en.wikipedia.org/wiki/Inertial_measurement_unit).
|
||||
- Gyroscopes are present as part of an [external INS, ARHS or INS-enhanced GNSS system](../sensor/inertial_navigation_systems.md).
|
||||
|
||||
The accelerometer must be calibrated before first use of the vehicle:
|
||||
|
||||
- [Accelerometer Calibration](../config/accelerometer.md)
|
||||
@@ -0,0 +1,82 @@
|
||||
# 空速传感器
|
||||
|
||||
Airspeed sensors are _highly recommended_ for fixed-wing and VTOL frames.
|
||||
They are so important because the autopilot does not have other means to detect stall.
|
||||
For fixed-wing flight it is the airspeed that guarantees lift — not ground speed!
|
||||
|
||||

|
||||
|
||||
## Hardware Options
|
||||
|
||||
Recommended digital airspeed sensors include:
|
||||
|
||||
- Based on [Pitot tube](https://en.wikipedia.org/wiki/Pitot_tube)
|
||||
- MEAS Spec series (e.g. [MS4525DO](https://www.te.com/usa-en/product-CAT-BLPS0002.html), [MS5525](https://www.te.com/usa-en/product-CAT-BLPS0003.html))
|
||||
- [mRo I2C Airspeed Sensor JST-GH MS4525DO](https://store.mrobotics.io/mRo-I2C-Airspeed-Sensor-JST-GH-p/m10030a.htm) (mRo store)
|
||||
- [Digital Differential Airspeed Sensor Kit](https://store-drotek.com/793-digital-differential-airspeed-sensor-kit-.html) (Drotek).
|
||||
- [Holybro Digital Air Speed Sensor - MS4525DO](https://holybro.com/collections/sensors/products/digital-air-speed-sensor-ms4525do)
|
||||
- [Holybro Digital Air Speed Sensor - MS5525DSO](https://holybro.com/collections/sensors/products/digital-air-speed-sensor-ms5525dso)
|
||||
- [Holybro High Precision DroneCAN Airspeed Sensor - DLVR](https://holybro.com/collections/sensors/products/high-precision-dronecan-airspeed-sensor-dlvr)
|
||||
- [RaccoonLab Cyphal/CAN and DroneCAN Airspeed Sensor](https://raccoonlab.co/tproduct/360882105-652259850171-cyphal-and-dronecan-airspeed-v2)
|
||||
- [Sensirion SDP3x Airspeed Sensor Kit](https://store-drotek.com/793-digital-differential-airspeed-sensor-kit-.html)
|
||||
- Based on [Venturi effect](https://en.wikipedia.org/wiki/Venturi_effect)
|
||||
- [TFSLOT](airspeed_tfslot.md) Venturi effect airspeed sensor.
|
||||
|
||||
All the above sensors are connected via the I2C bus/port.
|
||||
|
||||
::: info
|
||||
|
||||
Additionally, the [Avionics Anonymous Air Data Computer](https://www.tindie.com/products/avionicsanonymous/uavcan-air-data-computer-airspeed-sensor/) can be connected to the CAN bus to determine not only high-accuracy airspeed, but also true static pressure and air temperature via onboard barometer and an OAT probe.
|
||||
|
||||
:::
|
||||
|
||||
## 配置
|
||||
|
||||
### Enable Airspeed Sensors
|
||||
|
||||
Airspeed sensor drivers are not started automatically.
|
||||
Enable each type using its [corresponding parameter](../advanced_config/parameters.md):
|
||||
|
||||
- **Sensirion SDP3X:** [SENS_EN_SDP3X](../advanced_config/parameter_reference.md#SENS_EN_SDP3X)
|
||||
- **TE MS4525:** [SENS_EN_MS4525DO](../advanced_config/parameter_reference.md#SENS_EN_MS4525DO)
|
||||
- **TE MS5525:** [SENS_EN_MS5525DS](../advanced_config/parameter_reference.md#SENS_EN_MS5525DS)
|
||||
- **Eagle Tree airspeed sensor:** [SENS_EN_ETSASPD](../advanced_config/parameter_reference.md#SENS_EN_ETSASPD)
|
||||
|
||||
You should also check [ASPD_PRIMARY](../advanced_config/parameter_reference.md#ASPD_PRIMARY) is `1` (see next section - this is the default).
|
||||
|
||||
### Multiple Airspeed Sensors
|
||||
|
||||
:::warning
|
||||
Experimental
|
||||
Using multiple airspeed sensors is experimental.
|
||||
:::
|
||||
|
||||
If you have multiple airspeed sensors then you can select which sensor is _preferred_ as the primary source using [ASPD_PRIMARY](../advanced_config/parameter_reference.md#ASPD_PRIMARY), where `1`, `2` and `3` reflect the order in which the airspeed sensors were started:
|
||||
|
||||
- `0`: Synthetic airspeed estimation (groundspeed minus windspeed)
|
||||
- `1`: First airspeed sensor started (default)
|
||||
- `2`: Second airspeed sensor started
|
||||
- `3`: Third airspeed sensor started
|
||||
|
||||
The airspeed selector validates the indicated sensor _first_ and only falls back to other sensors if the indicated sensor fails airspeed checks ([ASPD_DO_CHECKS](../advanced_config/parameter_reference.md#ASPD_DO_CHECKS) is used to configure the checks).
|
||||
|
||||
The selected sensor is then used to [supply data to the estimator (EKF2)](../advanced_config/tuning_the_ecl_ekf.md#airspeed) and the controllers.
|
||||
|
||||
### Sensor-specific Configuration
|
||||
|
||||
Other than enabling the sensor, sensor-specific configuration is often not required.
|
||||
If it is needed, it should be covered in the appropriate sensor page (for example [TFSLOT > Configuration](airspeed_tfslot.md#configuration)).
|
||||
|
||||
The specific configuration for sensors that do not have a separate page is listed below:
|
||||
|
||||
- **Sensirion SDP3X:** [CAL_AIR_CMODEL](../advanced_config/parameter_reference.md#CAL_AIR_CMODEL) (provides overview of required settings), [CAL_AIR_TUBED_MM](../advanced_config/parameter_reference.md#CAL_AIR_TUBED_MM), [CAL_AIR_TUBELEN](../advanced_config/parameter_reference.md#CAL_AIR_TUBELEN).
|
||||
|
||||
## Calibration
|
||||
|
||||
Airspeed sensors should be calibrated by following the instructions: [Basic Configuration > Airspeed](../config/airspeed.md).
|
||||
|
||||
## See Also
|
||||
|
||||
- [Using PX4's Navigation Filter (EKF2) > Airspeed](../advanced_config/tuning_the_ecl_ekf.md#airspeed)
|
||||
- [Airspeed drivers](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/differential_pressure) (source code)
|
||||
- [VTOL Without an Airspeed Sensor](../config_vtol/vtol_without_airspeed_sensor.md)
|
||||
@@ -0,0 +1,67 @@
|
||||
# TFSLOT - Venturi effect airspeed sensor
|
||||
|
||||
[TFSLOT](https://github.com/ThunderFly-aerospace/TFSLOT01) is an open-source airspeed sensor based on the [Venturi effect](https://en.wikipedia.org/wiki/Venturi_effect) that also has an IMU.
|
||||
|
||||

|
||||
|
||||
[TFSLOT](https://github.com/ThunderFly-aerospace/TFSLOT01) is an airspeed sensor based on venturi effects.
|
||||
In the basic configuration, the TFSLOT is equipped with the [TFASPDIMU02](https://github.com/ThunderFly-aerospace/TFASPDIMU02) sensor board, which contains a differential pressure sensor ([Sensirion SDP3x series](https://sensirion.com/products/catalog/?filter_series=d1816d53-f5c8-47e3-ab47-818c3fd54259)) and a 9-axis motion tracking sensor ([ICM-20948](https://invensense.tdk.com/products/motion-tracking/9-axis/icm-20948/)).
|
||||
The IMU unit can be used as an external compass.
|
||||
|
||||
- This design brings several advantages when used on small-scale and slow-flying UAVs.
|
||||
- Better resolution at low airspeeds (below 10 m/s).
|
||||
- Configurable sensitivity brought by changing the profile.
|
||||
- Less tendency to clogging (For example, by clay after landing)
|
||||
- Weatherproof (rain, snow, etc.)
|
||||
- Direct differential pressure sensor integration without any additional tubing.
|
||||
Less chance of sensor malfunction.
|
||||
- Possibility of direct integration into the construction of the drone.
|
||||
Design is fully open source.
|
||||
- Integrated external IMU unit.
|
||||
|
||||
Thanks to the printed tube, it is very easy to change the measuring profile and thus to change the sensitivity in certain speed ranges.
|
||||
In the basic form, it is optimized so that the measured differential pressure corresponds to the pressure from the pitot tube.
|
||||
|
||||

|
||||
_First integration of TFSLOT into [TF-G2](https://github.com/ThunderFly-aerospace/TF-G2/) autogyro_
|
||||
|
||||
::: info
|
||||
|
||||
Full documentation and source files can be found on [GitHub](https://github.com/ThunderFly-aerospace/TFSLOT01).
|
||||
|
||||
:::
|
||||
|
||||
## Where to buy
|
||||
|
||||
TFSLOT is possible to buy at [Tindie store](https://www.tindie.com/products/thunderfly/tfslot01a-inovative-drone-airspeed-sensor/) or by sending us an inquiry via email at info@thunderfly.cz
|
||||
|
||||
## 接口定义
|
||||
|
||||
[TFASPDIMU02](https://github.com/ThunderFly-aerospace/TFASPDIMU02) is equipped with I2C JST-GH connector, which conforms to the pinout of the [dronecode standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf).
|
||||
Therefore the sensor can be connected directly to an I2C port of autopilot using an I2C 4pin JST-GH cable.
|
||||
|
||||
## 配置
|
||||
|
||||
Because there is an [IMU IC](https://invensense.tdk.com/products/motion-tracking/9-axis/icm-20948/) connected in front of the sensor, the IMU IC needs to be set into a bridge mode.
|
||||
Following this the airspeed sensor driver can be run. This can be done using the following command sequences. The commands assume a connection to I2C2 port.
|
||||
|
||||
```sh
|
||||
icm20948_i2c_passthrough start -X -b 2 -a 0x68
|
||||
sdp3x_airspeed start -X -b 2
|
||||
```
|
||||
|
||||
This sequence can be stored on the SD card in the `/etc/config.txt file`.
|
||||
You can read more about the configuration on the SD card on a [separate page](../concept/system_startup.md#replacing-the-system-startup).
|
||||
|
||||
Because the conversion of differential pressure to airspeed differs from the Pitot tube, this profile needs to be changed.
|
||||
This is done by setting parameter [`CAL_AIR_CMODEL`](../advanced_config/parameter_reference.md#CAL_AIR_CMODEL) to 3 (Venturi effect based airspeed sensor)
|
||||
|
||||
## Calibration
|
||||
|
||||
Calibration is a bit difficult because the current firmware version does not support calibration with negative values.
|
||||
Because the used sensor measures both airflow directions symmetrically and has zero offset, there is no need to calibrate repeatedly before every takeoff.
|
||||
But you have to ensure that there is no airflow during the calibration process.
|
||||
|
||||
The easiest way to do the calibration is to take the adhesive tape and tape it between the pressure inlets to the sensor.
|
||||
Then start the calibration process and blow from the back when prompted.
|
||||
If the pressure of at least 50 Pa is created, the calibration will be successful.
|
||||
@@ -0,0 +1 @@
|
||||
<Redirect to="../dronecan/avanon_laser_interface" />
|
||||
@@ -0,0 +1,46 @@
|
||||
# Barometers
|
||||
|
||||
Barometers measure atmospheric pressure, and are used in drones as altitude sensors.
|
||||
|
||||
Most [flight controllers](../flight_controller/index.md) on which PX4 runs include a barometer.
|
||||
By default PX4 will select the barometer with the highest priority (if any are present), and configure it as a data source for [Height estimation](../advanced_config/tuning_the_ecl_ekf.md#height).
|
||||
If a sensor fault is detected, PX4 will fall back to the next highest priority sensor.
|
||||
|
||||
Generally barometers require no user configuration (or thought)!
|
||||
|
||||
## Hardware Options
|
||||
|
||||
[Pixhawk standard](../flight_controller/autopilot_pixhawk_standard.md) flight controllers include a barometer, as do [many others](../flight_controller/index.md).
|
||||
|
||||
They are also present in other hardware:
|
||||
|
||||
- [CUAV NEO 3 Pro GNSS module](https://doc.cuav.net/gps/neo-series-gnss/en/neo-3-pro.html#key-data) ([MS5611](../modules/modules_driver_baro.md#ms5611))
|
||||
- [RaccoonLab L1 GNSS NEO-M8N](https://raccoonlab.co/tproduct/360882105-258620719271-cyphal-and-dronecan-gnss-m8n-magnetomete)
|
||||
|
||||
At time of writing, drivers/parts include: bmp280, bmp388 (and BMP380), dps310, goertek (spl06), invensense (icp10100, icp10111, icp101xx, icp201xx), lps22hb, lps25h, lps33hw, maiertek (mpc2520), mpl3115a2, ms5611, ms5837, tcbp001ta.
|
||||
|
||||
Note that the supported barometer part numbers can be inferred from the driver names listed in the [Modules Reference: Baro (Driver)](../modules/modules_driver_baro.md) documentation (and the driver source: [PX4-Autopilot/src/drivers/barometer](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer)).
|
||||
|
||||
## PX4 配置
|
||||
|
||||
Generally barometers require no user configuration.
|
||||
If needed, you can:
|
||||
|
||||
- Enable/Disable barometers as data source for [Height estimation](../advanced_config/tuning_the_ecl_ekf.md#height) using the [EKF2_BARO_CTRL](../advanced_config/parameter_reference.md#EKF2_BARO_CTRL) parameter.
|
||||
- Change the selection order of barometers using the [CAL_BAROx_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO) parameters for each barometer.
|
||||
- Disable a barometer by setting its [CAL_BAROx_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO) value to `0`.
|
||||
|
||||
## Calibration
|
||||
|
||||
Barometers don't require calibration.
|
||||
|
||||
<!-- Notes:
|
||||
- Absolute value isn't important since we just use the difference in altitude between "now" and the value when initializing EKF2
|
||||
- There is usually a scale factor error but it's compensated by the GNSS altitude using a bias estimator in EKF2 (we don't provide a way to calibrate that). This method is fine as long as the height change of the drone isn't too fast (below 200-300km/h probably; don't have real data on that).
|
||||
- The baro readings can be corrected using a param SENS_BARO_QNH (https://en.wikipedia.org/wiki/Altimeter_setting) parameter, but again, it is only necessary to adjust it if the absolute barometric altitude is required by the pilot.
|
||||
-->
|
||||
|
||||
## 开发人员信息
|
||||
|
||||
- [Baro driver source code](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/barometer)
|
||||
- [Modules Reference: Baro (Driver)](../modules/modules_driver_baro.md) documentation.
|
||||
@@ -0,0 +1,39 @@
|
||||
# Lanbao PSK-CM8JL65-CC5 ToF Infrared Distance Measuring Sensor (Discontinued)
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
:::warning
|
||||
This product has been discontinued and is no longer commercially available.
|
||||
:::
|
||||
|
||||
The [Lanbao PSK-CM8JL65-CC5](https://www.seeedstudio.com/PSK-CM8JL65-CC5-Infrared-Distance-Measuring-Sensor-p-4028.html) is a very small IR distance sensor with a 0.17m-8m range and millimeter resolution.
|
||||
It must be connected to a UART/serial bus.
|
||||
|
||||
- Dimensions: 38 mm x 18mm x 7mm
|
||||
- Weight: ≤10g
|
||||
|
||||

|
||||
|
||||
## 硬件安装
|
||||
|
||||
PSK-CM8JL65-CC5 can be connected to any unused _serial port_, e.g.: `TELEM2`, `TELEM3`, `GPS2` etc.
|
||||
|
||||
The pinouts are labeled on the bottom of the sensor:
|
||||
|
||||

|
||||
|
||||
## Parameter Setup
|
||||
|
||||
[Configure the serial port](../peripherals/serial_configuration.md) on which the lidar will run using [SENS_CM8JL65_CFG](../advanced_config/parameter_reference.md#SENS_CM8JL65_CFG).
|
||||
|
||||
:::info
|
||||
If the configuration parameter is not available in _QGroundControl_ then you may need to [add the driver to the firmware](../peripherals/serial_configuration.md#parameter_not_in_firmware):
|
||||
|
||||
```plain
|
||||
distance_sensor/cm8jl65
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
In order to use the sensor for _collision prevention_ you will further need to set the parameters [SENS_CM8JL65_R_0](../advanced_config/parameter_reference.md#SENS_CM8JL65_R_0) and [CP_DIST](../advanced_config/parameter_reference.md#CP_DIST).
|
||||
For more information see: [Collision Prevention](../computer_vision/collision_prevention.md#rangefinder).
|
||||
@@ -0,0 +1,12 @@
|
||||
# Gyroscope Hardware & Setup
|
||||
|
||||
PX4 uses a gyroscope for estimating the vehicle attitude (orientation).
|
||||
|
||||
You should not need to attach a gyroscope as a stand-alone external device:
|
||||
|
||||
- Most flight controllers, such as those in the [Pixhawk Series](../flight_controller/pixhawk_series.md), include a gyroscope as part of the flight controller's [Inertial Motion Unit (IMU)](https://en.wikipedia.org/wiki/Inertial_measurement_unit).
|
||||
- Gyroscopes are present as part of an [external INS, ARHS or INS-enhanced GNSS system](../sensor/inertial_navigation_systems.md).
|
||||
|
||||
The gyroscope must be calibrated before first use of the vehicle:
|
||||
|
||||
- [Gyroscope Calibration](../config/gyroscope.md)
|
||||
@@ -0,0 +1,47 @@
|
||||
# Sensor Hardware & Setup
|
||||
|
||||
This section describes the mandatory and optional sensors and their setup/configuration.
|
||||
|
||||
## 综述
|
||||
|
||||
PX4-based systems use sensors to estimate vehicle state, which is needed for stabilization and to enable autonomous control.
|
||||
Vehicle state information includes: position/altitude, heading, speed, airspeed, orientation (attitude), rates of rotation in different directions, battery level, and so on.
|
||||
|
||||
PX4 _minimally requires_ a gyroscope, accelerometer, magnetometer (compass), and barometer to measure the above states.
|
||||
Fixed-wing and VTOL-vehicles _should_ also include an airspeed sensor.
|
||||
A GPS or other positioning system is needed to enable all automatic modes, and some manual/assisted modes.
|
||||
|
||||
[Pixhawk Series](../flight_controller/pixhawk_series.md) flight controllers already have the minimum set of sensors (other controller platforms often do too).
|
||||
Additional/external sensors can be attached to the controller — an external GPS and compass are recommended, along with an airspeed sensor for VTOL and Fixed wing vehicles.
|
||||
|
||||
## Sensor Topics
|
||||
|
||||
Mandatory (included in Pixhawk series FCs):
|
||||
|
||||
- [Accelerometer](../sensor/accelerometer.md) — Measures changing acceleration.
|
||||
- [Gyroscope](../sensor/gyroscope.md) — Measures orientation.
|
||||
- [Magnetometer (Compass)](../gps_compass/magnetometer.md) — Measures heading/direction.
|
||||
External compass recommended!
|
||||
- [Barometers](../sensor/barometer.md) — Measures altitude (via air pressure).
|
||||
|
||||
Recommended:
|
||||
|
||||
- [Airspeed Sensors](../sensor/airspeed.md) — Measures airspeed.
|
||||
Highly recommended for VTOL and Fixed-wing as they are the only mechanism to detect stall.
|
||||
- [GNSS (GPS)](../gps_compass/index.md) — Measures global position.
|
||||
Needed for missions, and some other automatic and manual/assisted modes.
|
||||
- [RTK GNSS (GPS)](../gps_compass/rtk_gps.md) — GNSS with centimetre-level accuracy.
|
||||
Some setups also allow heading to be determine from GNSS rather than a magnetometer.
|
||||
|
||||
Optional:
|
||||
|
||||
- [Distance Sensors (Rangefinders)](../sensor/rangefinders.md) — Measures distance to target.
|
||||
Aids landing, object avoidance, and terrain following.
|
||||
- [Optical Flow](../sensor/optical_flow.md) — Estimates velocity using a downward facing camera and a downward facing distance sensor.
|
||||
Enables a more accurate position lock than GPS alone, and can be used indoors when no GPS signal is available.
|
||||
- [Tachometers (Revolution Counters)](../sensor/tachometers.md) — Only used for logging.
|
||||
|
||||
Other optional:
|
||||
|
||||
- [IMU/Compass Factory Calibration](../advanced_config/imu_factory_calibration.md) — Save calibration settings to persistent storage.
|
||||
- [Sensor Thermal Compensation](../advanced_config/sensor_thermal_calibration.md) — Compensate sensors for temperature variations.
|
||||
@@ -0,0 +1,31 @@
|
||||
# IMU, AHRS, and INS
|
||||
|
||||
PX4 typically runs on flight controllers that include an IMU, such as the Pixhawk series, and fuse the sensor data along with GNSS information in the EKF2 estimator to determine vehicle attitude, heading, position, and velocity.
|
||||
|
||||
However PX4 can also use some INS devices as either sources of raw data, or as an external estimator, replacing the EKF.
|
||||
|
||||
Systems that can be used in this way include:
|
||||
|
||||
- [VectorNav](../sensor/vectornav.md): IMU/AHRS, GNSS/INS, Dual GNSS/INS systems that can be used as an external INS or as a source of raw sensor data.
|
||||
|
||||
## Glossary
|
||||
|
||||
### Inertial Measurement Unit (IMU)
|
||||
|
||||
An IMU is a device that contains a 3-axis accelerometer (motion sensor), 3-axis gyroscope (rotation sensor), and sometimes a magnetometer (compass).
|
||||
The gyroscope and accelerometer provide raw sensor data that allow measurement of a system's angular rate and acceleration.
|
||||
The magnetometer, if present, provides sensor data that can be used to provide the direction that the vehicle is facing/heading.
|
||||
|
||||
### Attitude Heading Reference System (AHRS)
|
||||
|
||||
An AHRS system that includes both an IMU and a processing system that can provide attitude and heading information from the IMUs raw data.
|
||||
|
||||
### Inertial Navigation System (INS)
|
||||
|
||||
An INS is a navigation device that uses accelerometers, gyroscopes, possibly magnetometers, and a computer to calculate the attitude, position, and velocity of a moving object without the need for external references.
|
||||
Essentially it is an AHRS that also includes position/velocity estimation.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [What is an Inertial Navigation System?](https://www.vectornav.com/resources/inertial-navigation-articles/what-is-an-ins) (VectorNav)
|
||||
- [Inertial Navigation Primer](https://www.vectornav.com/resources/inertial-navigation-primer) (VectorNav)
|
||||
@@ -0,0 +1,39 @@
|
||||
# LeddarOne 激光雷达
|
||||
|
||||
[LeddarOne](https://leddartech.com/solutions/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.
|
||||
|
||||
<img src="../../assets/hardware/sensors/leddar_one.jpg" alt="LeddarOne Lidar rangefinder" width="200px" />
|
||||
|
||||
## 硬件安装
|
||||
|
||||
LeddarOne can be connected to any unused _serial port_ (UART), e.g.: TELEM2, TELEM3, GPS2 etc.
|
||||
|
||||
Build a cable following your board and pinout and LeddarOne pinout (shown below). You only will need to connect 5V, TX, RX and GND pins.
|
||||
|
||||
| 针脚 | LeddarOne |
|
||||
| -- | --------- |
|
||||
| 1 | GND |
|
||||
| 2 | - |
|
||||
| 3 | VCC |
|
||||
| 4 | RX |
|
||||
| 5 | TX |
|
||||
| 6 | - |
|
||||
|
||||
## Parameter Setup
|
||||
|
||||
[Configure the serial port](../peripherals/serial_configuration.md) on which the lidar will run using [SENS_LEDDAR1_CFG](../advanced_config/parameter_reference.md#SENS_LEDDAR1_CFG).
|
||||
There is no need to set the baud rate for the port, as this is configured by the driver.
|
||||
|
||||
:::info
|
||||
If the configuration parameter is not available in _QGroundControl_ then you may need to [add the driver to the firmware](../peripherals/serial_configuration.md#parameter_not_in_firmware):
|
||||
|
||||
```plain
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_LEDDAR_ONE=y
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [LeddarOne Spec sheet](https://leddartech.com/app/uploads/dlm_uploads/2021/04/Spec-Sheet_LeddarOne_V10.0_EN-1.pdf)
|
||||
@@ -0,0 +1,86 @@
|
||||
# Lidar-Lite
|
||||
|
||||
LIDAR-Lite is a compact, high-performance optical distant measurement sensor solution for drone, robot or unmanned vehicle applications. It can be connected to either I2C or PWM.
|
||||
|
||||

|
||||
|
||||
## 购买渠道
|
||||
|
||||
- [LIDAR-Lite v3](https://buy.garmin.com/en-AU/AU/p/557294) (5cm - 40m)
|
||||
|
||||
## 针脚定义
|
||||
|
||||
The Lidar-Lite (v2, v3) pinout is shown below.
|
||||
|
||||
| 针脚 | 参数名 | 描述 |
|
||||
| -- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 1 | POWER_IN | Power supply. 4.75-5.5V DC Nominal, Maximum 6V DC. |
|
||||
| 2 | POWER_EN | Active high, enables operation of the 3.3V micro-controller regulator. Low puts board to sleep, draws <40 μA. (Internal 100K pull-up) |
|
||||
| 3 | Mode Select Control | Provides trigger (high-low edge) PWM out (high) |
|
||||
| 4 | SCL | I2C Clock |
|
||||
| 5 | SDA | I2C Data |
|
||||
| 6 | GND | Signal/power ground. |
|
||||
|
||||
## 布线
|
||||
|
||||
The _Lidar-Lite v3_ can be used with either PWM or I2C.
|
||||
PWM is recommended if using an older model.
|
||||
The rangefinder must be separately powered via some ESC/BEC (whether connected via PWM or I2C).
|
||||
|
||||
:::info
|
||||
The I2C interface of non-blue-label Lidar-Lite (v1) devices has stability limitations and all silver-label generations of Lidar-Lite sensors are therefore excluded from the I2C interface.
|
||||
The use of the PWM interface (as detailed below) is advised for these sensors.
|
||||
The blue label (v2) devices can exhibit a constant offset if powered on with less than 5V under some conditions.
|
||||
This is currently (Q4/2015) under investigation by the manufacturer and potentially can be resolved by adhering to specific operational conditions.
|
||||
The recommended robust setup is a v1 device interfaced via PWM.
|
||||
:::
|
||||
|
||||
The standard wiring instructions for Lidar-Lite 3 (from the [Operation Manual](http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf)) are shown below.
|
||||
Lidar-Lite v2 and v3 are the same, except that the order of pins in the connector is reversed (i.e. it is as though the connector was turned over).
|
||||
|
||||

|
||||
|
||||
### PWM Interface Wiring
|
||||
|
||||
The pin connections for wiring LidarLite to the _Pixhawk 1_ AUX ports (PWM interface) are shown below.
|
||||
|
||||
| 针脚 | Lidar-Lite (v2, v3) | Pixhawk AUX Servo | Comment |
|
||||
| -- | -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| 1 | VCC | AUX 6 (center) | Power supply. 4.75-5.5V DC Nominal, Maximum 6V DC. |
|
||||
| 2 | RESET | AUX 6 (bottom) | Reset line of the sensor |
|
||||
| 3 | PWM | AUX 5 (bottom) | PWM output of the Lidar Lite. **Needs a 470 Ohm pull-down (to GND), Do not use a 1 K0hm resistor.** |
|
||||
| 4 | SCL | - | Not connected |
|
||||
| 5 | SDA | - | Not connected |
|
||||
| 6 | GND | AUX 6 (top) | Ground |
|
||||
|
||||
:::info
|
||||
On a flight controller that has no AUX port the equivalent MAIN pins are used (e.g. the PWM output on the lidar instead maps to MAIN 5).
|
||||
The pin numbers are hard-coded.
|
||||
:::
|
||||
|
||||
The wiring for LidarLite v2 is shown below.
|
||||
Lidar-Lite v3 is wired similarly, except that the pin-numbering on the connector is reversed.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### I2C Interface Wiring
|
||||
|
||||
The I2C wiring is the same for any other distance sensor.
|
||||
Simply connect the SLA, SLC, GND and VCC to the corresponding (same) pins on the flight controller and the sensor.
|
||||
|
||||
## 软件配置
|
||||
|
||||
The rangefinder/port is enabled using [SENS_EN_LL40LS](../advanced_config/parameter_reference.md#SENS_EN_LL40LS) - set to `1` for PWM, or `2` for I2C.
|
||||
|
||||
:::info
|
||||
The driver for this rangefinder is usually present in firmware.
|
||||
If missing, you would also need to add the driver (`drivers/ll40ls`) to the board configuration.
|
||||
:::
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf](http://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf) (Garmin)
|
||||
@@ -0,0 +1,104 @@
|
||||
# 光流
|
||||
|
||||
_Optical Flow_ uses a downward facing camera and a downward facing distance sensor for velocity estimation.
|
||||
It can be used to determine speed when navigating without GNSS — in buildings, underground, or in any other GNSS-denied environment.
|
||||
|
||||
The video below shows PX4 holding position using the [Ark Flow](../dronecan/ark_flow.md) sensor for velocity estimation in [Position Mode](../flight_modes_mc/position.md):
|
||||
|
||||
<lite-youtube videoid="aPQKgUof3Pc" title="ARK Flow with PX4 Optical Flow Position Hold"/>
|
||||
|
||||
<!-- ARK Flow with PX4 Optical Flow Position Hold: 20210605 -->
|
||||
|
||||
The image below shows an optical flow setup with a separate flow sensor ([PX4Flow](../sensor/px4flow.md)) and distance sensor ([Lidar-Lite](../sensor/lidar_lite.md)):
|
||||
|
||||

|
||||
|
||||
## 设置
|
||||
|
||||
An Optical Flow setup requires a downward facing camera and a downward facing [distance sensor](../sensor/rangefinders.md) (preferably a LiDAR).
|
||||
These can be combined in a single product, such as the [ARK Flow](../dronecan/ark_flow.md), [ARK Flow MR](../dronecan/ark_flow_mr.md) and [Holybro H-Flow](https://holybro.com/products/h-flow), or they may be separate sensors.
|
||||
|
||||
The sensor(s) can be connected via MAVLink, I2C or any other bus that supports the peripheral.
|
||||
|
||||
:::info
|
||||
If connected to PX4 via MAVLink the Optical Flow camera sensor must publish the [OPTICAL_FLOW_RAD](https://mavlink.io/en/messages/common.html#OPTICAL_FLOW_RAD) message, and the distance sensor must publish the [DISTANCE_SENSOR](https://mavlink.io/en/messages/common.html#DISTANCE_SENSOR) message.
|
||||
The information is written to the corresponding uORB topics: [DistanceSensor](../msg_docs/DistanceSensor.md) and [ObstacleDistance](../msg_docs/ObstacleDistance.md).
|
||||
:::
|
||||
|
||||
在不同方向移动时光流的输出必须如下所示:
|
||||
|
||||
| Vehicle movement | Integrated flow |
|
||||
| ---------------- | --------------- |
|
||||
| Forwards | + Y |
|
||||
| Backwards | - Y |
|
||||
| Right | - X |
|
||||
| Left | + X |
|
||||
|
||||
Sensor data from the optical flow device is fused with other velocity data sources.
|
||||
The approach used for fusing sensor data and any offsets from the center of the vehicle must be configured in the [estimator](#estimators).
|
||||
|
||||
### Scale Factor
|
||||
|
||||
For pure rotations the `OPTICAL_FLOW_RAD.integrated_xgyro` and `OPTICAL_FLOW_RAD.integrated_x` (respectively `integrated_ygyro` and `integrated_y`) have to be the same.
|
||||
If this is not the case, the optical flow scale factor can be adjusted using [SENS_FLOW_SCALE](../advanced_config/parameter_reference.md#SENS_FLOW_SCALE).
|
||||
|
||||
:::tip
|
||||
The low resolution of common optical flow sensors can cause slow oscillations when hovering at a high altitude above ground (> 20m).
|
||||
Reducing the optical flow scale factor can improve the situation.
|
||||
:::
|
||||
|
||||
## Flow Sensors/Cameras
|
||||
|
||||
### ARK Flow & ARK Flow MR
|
||||
|
||||
[ARK Flow](../dronecan/ark_flow.md) is a [DroneCAN](../dronecan/index.md) optical flow sensor, [distance sensor](../sensor/rangefinders.md), and IMU.
|
||||
It has a PAW3902 optical flow sensor, Broadcom AFBR-S50LV85D 30 meter distance sensor, and Invensense ICM-42688-P 6-Axis IMU.
|
||||
|
||||
[ARK Flow MR](../dronecan/ark_flow_mr.md) is a [DroneCAN](../dronecan/index.md) optical flow sensor, [distance sensor](../sensor/rangefinders.md), and IMU, for mid-range applications.
|
||||
It has a PixArt PAA3905 optical flow sensor, Broadcom AFBR-S50LX85D 50 meter distance sensor, and Invensense IIM-42653 6-Axis IMU.
|
||||
|
||||
### Holybro H-Flow
|
||||
|
||||
The [Holybro H-Flow](https://holybro.com/products/h-flow) is a compact [DroneCAN](../dronecan/index.md) optical flow and [distance sensor](../sensor/rangefinders.md) module.
|
||||
It combines a PixArt PAA3905 optical flow sensor, a Broadcom AFBR-S50LV85D distance sensor, and an InvenSense ICM-42688-P 6-axis IMU.
|
||||
An all-in-one design that simplifies installation, with an onboard infrared LED enhances visibility in low-light conditions.
|
||||
|
||||
### PMW3901-Based Sensors
|
||||
|
||||
[PMW3901](../sensor/pmw3901.md) is an optical flow tracking sensor similar to what you would find in a computer mouse, but adapted to work between 80 mm and infinity.
|
||||
It is used in a number of products, including some from: Bitcraze, Tindie, Hex, Thone and Alientek.
|
||||
|
||||
### Other Cameras/Sensors
|
||||
|
||||
It is also possible to use a board/quad that has an integrated camera.
|
||||
For this the [Optical Flow repo](https://github.com/PX4/OpticalFlow) can be used (see also [snap_cam](https://github.com/PX4/snap_cam)).
|
||||
|
||||
## Range Finders
|
||||
|
||||
You can use any supported [distance sensor](../sensor/rangefinders.md).
|
||||
然而,我们建议使用激光而不是超声波传感器,因为它的鲁棒性和准确性更高。
|
||||
|
||||
## 估计器
|
||||
|
||||
估计器融合数据从光流传感器和其他资源获得。
|
||||
The settings for how fusing is done, and relative offsets to vehicle center must be specified for the estimator used.
|
||||
|
||||
The offsets are calculated relative to the vehicle orientation and center as shown below:
|
||||
|
||||

|
||||
|
||||
Optical Flow based navigation is enabled by both [EKF2](#ekf2) and LPE (deprecated).
|
||||
|
||||
### Extended Kalman Filter (EKF2) {#ekf2}
|
||||
|
||||
For optical flow fusion using EKF2, set [EKF2_OF_CTRL](../advanced_config/parameter_reference.md#EKF2_OF_CTRL).
|
||||
|
||||
If your optical flow sensor is offset from the vehicle centre, you can set this using the following parameters.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="EKF2_OF_POS_X"></a>[EKF2_OF_POS_X](../advanced_config/parameter_reference.md#EKF2_OF_POS_X) | X position of optical flow focal point in body frame (default is 0.0m). |
|
||||
| <a id="EKF2_OF_POS_Y"></a>[EKF2_OF_POS_Y](../advanced_config/parameter_reference.md#EKF2_OF_POS_Y) | Y position of optical flow focal point in body frame (default is 0.0m). |
|
||||
| <a id="EKF2_OF_POS_Z"></a>[EKF2_OF_POS_Z](../advanced_config/parameter_reference.md#EKF2_OF_POS_Z) | Z position of optical flow focal point in body frame (default is 0.0m). |
|
||||
|
||||
See [Using PX4's Navigation Filter (EKF2) > Optical flow](../advanced_config/tuning_the_ecl_ekf.md#optical-flow) for more information.
|
||||
@@ -0,0 +1,206 @@
|
||||
# PMW3901-Based Flow Sensors
|
||||
|
||||
PMW3901 is an [optical flow](../sensor/optical_flow.md) ASIC that computes the flow internally and provides a difference in pixels between each frame.
|
||||
It uses a tracking sensor that is similar to what you would find in a computer mouse, but adapted to work between 80 mm and infinity.
|
||||
The PMW3901 is used in several products, including some from Bitcraze, Tindie, Hex, Thone, and Alientek
|
||||
|
||||

|
||||
|
||||
This topic provides links to sensors that have been tested, along with information about mounting and PX4 configuration (this is common to all sensors of this type).
|
||||
|
||||
## Boards using PMW3901
|
||||
|
||||
The following table shows some of the boards that use this sensor, listing the number of interfaces, the number of sensors, the input voltage, and the size.
|
||||
The board name links to board-specific sections that include wiring and purchase information.
|
||||
|
||||
| Manufacture | Board | Interface | Flow | 测距仪 | Gyro | Voltage (V) | Size (mm) | Max Height (m) |
|
||||
| ----------- | --------------------------------------------------------------------------------- | --------- | ---- | --- | ---- | ----------------------------------------- | ----------------------------------------- | --------------------------------- |
|
||||
| Bitcraze | [Flow breakout](#bitcraze-flow-breakout) | SPI | Y | Y | - | 3 - 5 | 21x20 | 1 |
|
||||
| Tindie | [PMW3901 Optical Flow Sensor](#tindie-pmw3901-optical-flow-sensor) | SPI | Y | - | - | 3 - 5 | AxB | - |
|
||||
| Hex | [HereFlow PMW3901 Optical Flow Sensor](#hex-hereflow-pmw3901-optical-flow-sensor) | CAN | Y | Y | Y | 3 - 5 | AxB | 4 |
|
||||
| Holybro | [Holybro PMW3901 Optical Flow Sensor](#holybro-pmw3901-optical-flow-sensor) | UART | Y | - | - | 3 - 5 | AxB | - |
|
||||
| Thone | [ThoneFlow-3901U](#thone-thoneflow-3901u) | UART | Y | - | - | 3 - 5 | AxB | - |
|
||||
| Alientek | [ATK-PMW3901](#alientek-atk-pmw3901) | SPI | Y | - | - | 3.3 - 4.2 | 27.5x16.5 | 1 |
|
||||
|
||||
## External Rangefinders
|
||||
|
||||
An external rangefinder/distance sensor is _required_ for the sensors that don't have a rangefinder (e.g. _Tindie_ or _Thone_) and _recommended_ for the other boards (as their range is quite limited).
|
||||
|
||||
The range needed is dependent on the application:
|
||||
|
||||
- Indoor flight: ≈4 metres
|
||||
- Outdoor flight: ≥10 metres (e.g. to support the position control in environments where GPS might have issues)
|
||||
|
||||
Any [rangefinder/distance sensor](../sensor/rangefinders.md) supported by PX4 may be used.
|
||||
The sensor can be mounted anywhere but must point down, and should be connected/configured as usual.
|
||||
|
||||
:::tip
|
||||
The PX4 team mainly tested using the [Lidar Lite V3](../sensor/lidar_lite.md) on larger vehicles and the [Lanbao CM8JL65](../sensor/cm8jl65_ir_distance_sensor.md) (Discontinued) on smaller vehicles.
|
||||
:::
|
||||
|
||||
## Mounting/Orientation
|
||||
|
||||
Flow modules are typically mounted near the centre of the vehicle.
|
||||
If mounted off-centre you will need to set offsets: [Optical Flow > EKF2](../sensor/optical_flow.md#ekf2).
|
||||
|
||||
The flow modules may be mounted with any yaw orientation relative to the vehicle body frame, but you must set the value used in [SENS_FLOW_ROT](../advanced_config/parameter_reference.md#SENS_FLOW_ROT).
|
||||
|
||||
The "zero" rotation is when the sensor board and [vehicle](../getting_started/px4_basic_concepts.md#heading-and-directions) X-axes are aligned (i.e. the "front" of the vehicle and the board are in the same direction), with rotations increasing in a clockwise direction.
|
||||
|
||||
PMW3901 modules have a small notch indicating the direction of the **back** of the board.
|
||||
The diagram shows the relative board and vehicle orientations that correspond to `SENS_FLOW_ROT=0` (note the notch at the back).
|
||||
|
||||

|
||||
|
||||
The diagram above shows the Bitcraze board.
|
||||
You can use the notch to find the orientation of the other boards in the same way:
|
||||
|
||||
| &nbsp; | &nbsp; |
|
||||
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| Tindie<br>![PMW3901 Tindie Notch][tindie_notch] | Hex Hereflow<br>![PMW3901 Hereflow Notch][hereflow_notch] |
|
||||
| Thone<br>![PMW3901 Thoneflow Notch][thoneflow_notch] | Alientek (also has an arrow indicating the front!)<br>![PMW3901 Alientek Notch][alientek_notch] |
|
||||
|
||||
[tindie_notch]: ../../assets/hardware/sensors/pmw3901/tindie_notch.jpg
|
||||
[thoneflow_notch]: ../../assets/hardware/sensors/pmw3901/thoneflow_3901u_notch.jpg
|
||||
[alientek_notch]: ../../assets/hardware/sensors/pmw3901/alientek_pmw3901_notch.jpg
|
||||
[hereflow_notch]: ../../assets/hardware/sensors/pmw3901/hex_hereflow_notch.jpg
|
||||
|
||||
## PX4 配置
|
||||
|
||||
The PX4 configuration that is common to all PMW3901-based boards:
|
||||
|
||||
- [Optical Flow > EKF2](../sensor/optical_flow.md#ekf2) explains how to fuse optical flow data in the EKF2 estimator and set position offsets for the mounting position of the flow sensor.
|
||||
- [SENS_FLOW_ROT](../advanced_config/parameter_reference.md#SENS_FLOW_ROT) sets the orientation of the flow sensor relative to vehicle heading.
|
||||
|
||||
In addition for:
|
||||
|
||||
- SPI-connected sensors you must set [SENS_EN_PMW3901](../advanced_config/parameter_reference.md#SENS_EN_PMW3901) to `1` in order to enable the sensor driver.
|
||||
- UART-connected sensors (e.g. ThoneFlow-3901UY) you must [configure the associated serial port](../peripherals/serial_configuration.md) by setting the parameter [SENS_TFLOW_CFG](../advanced_config/parameter_reference.md#SENS_TFLOW_CFG) to the value of the connected UART port (for example, if you connected this sensor to `TELEM 2`, you need to set `SENS_TFLOW_CFG` to `102`).
|
||||
- DroneCAN sensors you must set `UAVCAN_ENABLE` appropriately.
|
||||
For more information see [DroneCAN Peripherals](../dronecan/index.md) (and the [HereFlow PMW3901 docs below](#dronecan_wiring)).
|
||||
|
||||
Individual flow sensors are further setup/configured as described in the sections below.
|
||||
|
||||
## Bitcraze Flow Breakout
|
||||
|
||||
The [Bitcraze Flow breakout](https://www.bitcraze.io/products/flow-breakout/) directly exposes the [SPI interface](#spi-wiring) from the PMW3901 module.
|
||||
|
||||
The board also incorporates a distance sensor [wired to the Pixhawk I2C port](#i2c-wiring).
|
||||
This distance sensor is the VL53L0x ToF sensor from STMicroelectronics.
|
||||
The sensor range is minimal (2 metres) and will be reduced when flying in the sunlight.
|
||||
We therefore highly recommend that you use an [external distance sensor](#external-rangefinders).
|
||||
|
||||

|
||||
|
||||
[PX4 configuration](#px4-configuration) and [mounting/orientation](#mounting-orientation) instructions are provided above.
|
||||
|
||||
### SPI Wiring
|
||||
|
||||
The PMW3901, if connected to the SPI port on a Pixhawk 4, will automatically detect the Bitcraze flow module.
|
||||
This device's driver was explicitly written to be plugged into the SPI port using the chip select 1.
|
||||
No parameters will have to be configured other than the [orientation and position of the sensor](#mounting-orientation).
|
||||
|
||||
The pinout mapping for the Pixhawk SPI port to Bitcraze Flow Board is shown below (the port mapping is the same for all Pixhawk FMU versions).
|
||||
|
||||
| Pixhawk SPI Port (from left to right) | Bitcraze flow board |
|
||||
| -------------------------------------------------------- | ------------------- |
|
||||
| 1 (VCC) | VCC |
|
||||
| 2 (SCK) | CLK |
|
||||
| 3 (MISO) | MISO |
|
||||
| 4 (MOSI) | MOSI |
|
||||
| 5 (CS1) | CS |
|
||||
| 6 (CS2) | Do not connect |
|
||||
| 7 (GND) | GND |
|
||||
|
||||
To connect the bitcraze flow board to the Pixhawk, you will need to solder the wires of the Pixhawk SPI cable to the flow board.
|
||||
An SPI cable has 7 wires, from which you need to connect 6 to the flow board.
|
||||
|
||||
The following diagram shows how to wire the sensor to a Pixhawk 4.
|
||||
|
||||

|
||||
|
||||
### I2C Wiring
|
||||
|
||||
The I2C wiring is the same for any other distance sensor.
|
||||
Simply connect the SLA, SLC, GND, and VCC to the corresponding (same) pins on the Pixhawk and the sensor.
|
||||
|
||||
## Tindie PMW3901 Optical Flow Sensor
|
||||
|
||||
The Tindie [PMW3901 Optical Flow Sensor](https://www.tindie.com/products/onehorse/pmw3901-optical-flow-sensor/) exposes the SPI interface from the PMW3901 module exactly as on the Bitcraze module (see [SPI Wiring](#spi-wiring)).
|
||||
|
||||

|
||||
|
||||
The sensor doesn't have a distance sensor onboard, so you will need to use an [external distance sensor](#external-rangefinders).
|
||||
|
||||
[PX4 configuration](#px4-configuration) and [mounting/orientation](#mounting-orientation) instructions are provided above.
|
||||
|
||||
## AlienTek ATK-PMW3901
|
||||
|
||||
The AlienTek [ATK-PMW3901](https://www.aliexpress.com/i/32979605707.html) exposes the SPI interface from the PMW3901 module in the same way as the Bitcraze module (see [SPI Wiring](#spi-wiring)).
|
||||
|
||||

|
||||
|
||||
The board also incorporates a distance sensor (we recommend that you use an [external distance sensor](#external-rangefinders)).
|
||||
You can wire the internal sensor to the Pixhawk I2C port [in the same way as any other I2C peripheral.](#i2c-wiring)
|
||||
A screenshot showing the I2C pins (SLA, SLC, GND, and VCC) is provided below.
|
||||
|
||||

|
||||
|
||||
[PX4 configuration](#px4-configuration) and [mounting/orientation](#mounting-orientation) instructions are provided above.
|
||||
|
||||
## Hex HereFlow PMW3901 Optical Flow Sensor
|
||||
|
||||
The Hex [HereFlow PMW3901 Optical Flow Sensor](http://www.proficnc.com/all-products/185-pixhawk2-suite.html) is a tiny board containing the PMW3901 flow module, VL53L1X distance sensor, and an IMU (used to synchronize the flow data with the gyro data).
|
||||
|
||||
An onboard microcontroller samples the three sensors and publishes two DroneCAN messages containing all the information needed for the flow and distance sensor calculations.
|
||||
|
||||
The board can be connected to any CAN port on any Pixhawk board (see [DroneCAN wiring](#dronecan_wiring)).
|
||||
|
||||
As for the other optical flow boards, we recommend that you use an [external distance sensor](#external-rangefinders).
|
||||
|
||||
[PX4 configuration](#px4-configuration) and [mounting/orientation](#mounting-orientation) instructions are provided above.
|
||||
|
||||
<a id="dronecan_wiring"></a>
|
||||
|
||||
### DroneCAN Wiring/Setup
|
||||
|
||||
The diagram below shows how to connect the sensor to the Pixhawk 4 CAN bus.
|
||||
|
||||

|
||||
|
||||
In addition to any other configuration, you will need to set the parameter [UAVCAN_ENABLE](../advanced_config/parameter_reference.md#UAVCAN_ENABLE) to either 2 or 3, depending on your system:
|
||||
|
||||
- `UAVCAN_ENABLE=2`: DroneCAN sensors but no motor controllers.
|
||||
- `UAVCAN_ENABLE=3`: DroneCAN sensors and motor controllers.
|
||||
|
||||
For general information about DroneCAN wiring and configuration see: [DroneCAN Peripherals](../dronecan/index.md).
|
||||
|
||||
## Holybro PMW3901 Optical Flow Sensor
|
||||
|
||||
The [Holybro PMW3901 Optical Flow Sensor](https://holybro.com/products/pmw3901-optical-flow-sensor) exposes a PMW3901 optical flow module via a UART interface.
|
||||
|
||||
The board doesn't include a distance sensor onboard, so you will need to use an [external distance sensor](#external-rangefinders).
|
||||
|
||||
<img src="../../assets/hardware/sensors/pmw3901/holybro-pmw3901-1.jpg" width="350px" title="HB-pmw3901-1" />
|
||||
<img src="../../assets/hardware/sensors/pmw3901/holybro-pmw3901-2.jpg" width="350px" title="HB-pmw3901-2" />
|
||||
|
||||
It comes with a 3D printed case and has a pre-soldered TX, Voltage, and GND 4 pin connector that can be plugged into the telemetry port of your flight controller, as shown below (for the Pixhawk 6C).
|
||||
|
||||

|
||||
|
||||
## Thone ThoneFlow-3901U
|
||||
|
||||
The Thone [ThoneFlow-3901U](https://www.seeedstudio.com/ThoneFlow-3901U-UART-Serial-Version-PMW3901-Optical-Flow-Sensor-p-4040.html) exposes a PMW3901 optical flow module via a UART interface.
|
||||
|
||||
The board doesn't include a distance sensor onboard, so you will need to use an [external distance sensor](#external-rangefinders).
|
||||
|
||||

|
||||
|
||||
<!-- note, this will be set using SENS_TFLOW_CFG
|
||||
Wiring is also required.
|
||||
-->
|
||||
|
||||
[PX4 configuration](#px4-configuration) and [mounting/orientation](#mounting-orientation) instructions are provided above.
|
||||
|
||||
In addition, you must also set the parameter [SENS_TFLOW_CFG](../advanced_config/parameter_reference.md#SENS_TFLOW_CFG) to the value of the UART port you connected (e.g. if the sensor is connected to `TELEM 2` then set `SENS_TFLOW_CFG=102`.
|
||||
For more information see [Serial Port Configuration](../peripherals/serial_configuration.md).
|
||||
@@ -0,0 +1,8 @@
|
||||
# PX4FLOW Smart Camera (Deprecated)
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
PX4 does not support the PX4Flow [optical flow](../sensor/optical_flow.md) sensor from PX4 v1.13 (it doesn't work with current firmware).
|
||||
PX4 may work with older PX4Flow firmware.
|
||||
|
||||
Documentation has been removed (if needed, see [Legacy Docs for PX4Flow in v1.13](https://docs.px4.io/v1.13/en/sensor/px4flow.html)).
|
||||
@@ -0,0 +1,256 @@
|
||||
# 距离传感器(测距仪)
|
||||
|
||||
Distance sensors provide distance measurement that can be used for [terrain following](../flying/terrain_following_holding.md#terrain_following), [terrain holding](../flying/terrain_following_holding.md#terrain_hold) (i.e. precision hovering for photography), improved landing behaviour ([conditional range aid](../advanced_config/tuning_the_ecl_ekf.md#conditional-range-aiding)), warning of regulatory height limits, collision prevention, etc.
|
||||
|
||||
This section lists the distance sensors supported by PX4 (linked to more detailed documentation), and provides information about the [generic configuration](#configuration) required for all rangefinders, [testing](#testing), and simulation with [Gazebo](#gazebo-simulation) or [Gazebo-Classic](#gazebo-classic-simulation).
|
||||
更详细的设置和配置信息在下方(和侧边栏)的主题链接中提供
|
||||
|
||||
<img src="../../assets/hardware/sensors/lidar_lite/lidar_lite_v3.jpg" alt="Lidar Lite V3" width="200px" /><img src="../../assets/hardware/sensors/lidar_lightware/sf11c_120_m.jpg" alt="LightWare SF11/C Lidar" width="200px" /><img src="../../assets/hardware/sensors/optical_flow/ark_flow_distance_sensor.jpg" alt="ARK Flow" width="200px">
|
||||
|
||||
## 支持的测距仪
|
||||
|
||||
:::tip
|
||||
This is a subset of the rangefinders that can be used with PX4.
|
||||
[Modules: Distance Sensors](../modules/modules_driver_distance_sensor.md) lists PX4 drivers for other non-CAN rangefinders.
|
||||
There may also be other DroneCAN rangefinders than those listed here.
|
||||
:::
|
||||
|
||||
### ARK Flow & AKR Flow MR
|
||||
|
||||
[ARK Flow](../dronecan/ark_flow.md) and [ARK Flow](../dronecan/ark_flow_mr.md) are open-source Time-of-Flight (ToF) and optical flow sensor modules, which are capable of measuring distances from 8cm to 30m and from 8cm to 50m, respectively.
|
||||
它可以通过CAN1接口连接至飞控,允许通过CAN2接口添加传感器。
|
||||
It supports [DroneCAN](../dronecan/index.md), runs [PX4 DroneCAN Firmware](../dronecan/px4_cannode_fw.md), and is packed into a tiny form factor.
|
||||
|
||||
### Holybro ST VL53L1X 激光雷达
|
||||
|
||||
The [VL53L1X](https://holybro.com/products/st-vl53l1x-lidar) is a state-of-the-art, Time-of-Flight (ToF), laser-ranging sensor, enhancing the ST FlightSense™ product family.
|
||||
它是市场上速度最快的微型 ToF 传感器,精确测距可达 4 m,快速测距频率可达 50 Hz。
|
||||
|
||||
It comes with a JST GHR 4 pin connector that is compatible with the I2C port on [Pixhawk 4](../flight_controller/pixhawk4.md), [Pixhawk 5X](../flight_controller/pixhawk5x.md), and other flight controllers that follow the [Pixhawk Connector Standard](https://github.com/pixhawk/Pixhawk-Standards/blob/master/DS-009%20Pixhawk%20Connector%20Standard.pdf).
|
||||
|
||||
### Lidar-Lite
|
||||
|
||||
[Lidar-Lite](../sensor/lidar_lite.md) is a compact, high-performance optical distant measurement rangefinder.
|
||||
它的传感器范围为 (5cm - 40m),可以连接到 PWM 或 I2C 端口。
|
||||
|
||||
### MaxBotix I2CXL-MaxSonar-EZ
|
||||
|
||||
The MaxBotix [I2CXL-MaxSonar-EZ](https://www.maxbotix.com/product-category/i2cxl-maxsonar-ez-products) range has a number of relatively short-ranged sonar based rangefinders that are suitable for assisted takeoff/landing and collision avoidance.
|
||||
这些可以使用 I2C 端口连接。
|
||||
|
||||
The rangefinders are enabled using the parameter [SENS_EN_MB12XX](../advanced_config/parameter_reference.md#SENS_EN_MB12XX).
|
||||
|
||||
### Lightware LIDARs
|
||||
|
||||
[Lightware SFxx Lidar](../sensor/sfxx_lidar.md) provide a broad range of lightweight “laser altimeters” that are suitable for many drone applications.
|
||||
|
||||
PX4 支持: SF11/c 和 SF/LW20.
|
||||
PX4 也可用于一下停产的型号: SF02, SF10/a, SF10/b, SF10/c.
|
||||
|
||||
Others may be supported via the [RaccoonLab Cyphal and DroneCAN Rangefinder Adapter](#raccoonlab-cyphal-and-dronecan-rangefinder-adapter) described below.
|
||||
|
||||
PX4 also supports the [LightWare LiDAR SF45 Rotating Lidar](../sensor/sf45_rotating_lidar.md) for [collision prevention](../computer_vision/collision_prevention.md) applications.
|
||||
|
||||
### TeraRanger 测距仪
|
||||
|
||||
[TeraRanger](../sensor/teraranger.md) provide a number of lightweight distance measurement sensors based on infrared Time-of-Flight (ToF) technology.
|
||||
他们通常比声纳更快、范围更大、比基于激光的系统更小、更轻。
|
||||
|
||||
PX4 提供以下通过 I2C总线连接的型号:TeraRanger One, TeraRanger Evo 60m 和 TeraRanger Evo 600Hz。
|
||||
|
||||
### Ainstein US-D1 标准雷达高度计
|
||||
|
||||
The _Ainstein_ [US-D1 Standard Radar Altimeter](../sensor/ulanding_radar.md) is compact microwave rangefinder that has been optimised for use on UAVs.
|
||||
它有大约50米的感测范围。
|
||||
该产品的一个特别优势是它可以在所有天气条件下和所有地形类型(包括水)上有效运行。
|
||||
|
||||
### LeddarOne
|
||||
|
||||
[LeddarOne](../sensor/leddar_one.md) 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](../sensor/tfmini.md) is a tiny, low cost, and low power LIDAR with 12m range.
|
||||
|
||||
### PSK-CM8JL65-CC5
|
||||
|
||||
<Badge type="info" text="Discontinued" />
|
||||
|
||||
The [Lanbao PSK-CM8JL65-CC5 ToF Infrared Distance Measuring Sensor](../sensor/cm8jl65_ir_distance_sensor.md) 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](../dronecan/avanon_laser_interface.md) allows several common rangefinders (e.g. [Lightware SF11/c, SF30/D](../sensor/sfxx_lidar.md), etc) to be connected to the [CAN](../can/index.md) bus via [DroneCAN](../dronecan/index.md), a more robust interface than I2C.
|
||||
|
||||
### RaccoonLab Cyphal and DroneCAN Rangefinder Adapter
|
||||
|
||||
The [RaccoonLab Cyphal and DroneCAN Rangefinder Adapter](https://raccoonlab.co/tproduct/360882105-910084093051-cyphal-and-dronecan-rangefinder-adapter) allows several common rangefinders to be connected to the CAN bus via Cyphal or DroneCAN, providing a more robust interface than I2C or UART.
|
||||
This adapter efficiently reads measurements via I2C or UART and publishes range data in meters, making it a versatile solution for UAVs, robotics, and technical documentation applications.
|
||||
|
||||
Supported rangefinders include:
|
||||
|
||||
- LightWare LW20/C
|
||||
- TF-Luna
|
||||
- Garmin Lite V3
|
||||
- VL53L1CB
|
||||
|
||||
### RaccoonLab Cyphal and DroneCAN µRANGEFINDER
|
||||
|
||||
[RaccoonLab µRANGEFINDER](https://docs.raccoonlab.co/guide/rangefinder/uRANGEFINDER.html) is designed to measure distance and publish it via Cyphal/DroneCAN protocols.
|
||||
It can be used to estimate precision landing or object avoidance.
|
||||
|
||||
Features:
|
||||
|
||||
- [VL53L1CBV0FY-1](https://www.st.com/resource/en/datasheet/vl53l1.pdf) sensor
|
||||
- Input voltage sensor
|
||||
- CAN connectors: 2 [UCANPHY Micro (JST-GH 4)](https://raccoonlabdev.github.io/docs/guide/wires/).
|
||||
|
||||
## Configuration/Setup {#configuration}
|
||||
|
||||
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.
|
||||
|
||||
### Generic Configuration
|
||||
|
||||
The common rangefinder configuration is specified using [EKF2_RNG\_\*](../advanced_config/parameter_reference.md#EKF2_RNG_CTRL) parameters.
|
||||
These include (non exhaustively):
|
||||
|
||||
- [EKF2_RNG_POS_X](../advanced_config/parameter_reference.md#EKF2_RNG_POS_X), [EKF2_RNG_POS_Y](../advanced_config/parameter_reference.md#EKF2_RNG_POS_Y), [EKF2_RNG_POS_Z](../advanced_config/parameter_reference.md#EKF2_RNG_POS_Z) - offset of the rangefinder from the vehicle centre of gravity in X, Y, Z directions.
|
||||
- [EKF2_RNG_PITCH](../advanced_config/parameter_reference.md#EKF2_RNG_PITCH) - A value of 0 degrees (default) corresponds to the range finder being exactly aligned with the vehicle vertical axis (i.e. straight down), while 90 degrees indicates that the range finder is pointing forward.
|
||||
Simple trigonometry is used to calculate the distance to ground if a non-zero pitch is used.
|
||||
- [EKF2_RNG_DELAY](../advanced_config/parameter_reference.md#EKF2_RNG_DELAY) - approximate delay of data reaching the estimator from the sensor.
|
||||
- [EKF2_RNG_SFE](../advanced_config/parameter_reference.md#EKF2_RNG_SFE) - Range finder range dependent noise scaler.
|
||||
- [EKF2_RNG_NOISE](../advanced_config/parameter_reference.md#EKF2_RNG_NOISE) - Measurement noise for range finder fusion
|
||||
|
||||
## 测试
|
||||
|
||||
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.
|
||||
|
||||
### QGroundControl MAVLink Inspector
|
||||
|
||||
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.
|
||||
|
||||
:::info
|
||||
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**:
|
||||
|
||||

|
||||
|
||||
2. Select the message `DISTANCE_SENSOR`, and then check the plot checkbox against `current_distance`.
|
||||
The tool will then plot the result:
|
||||

|
||||
|
||||
### QGroundControl MAVLink Console
|
||||
|
||||
You can also use the _QGroundControl MAVLink Console_ to observe the `distance_sensor` uORB topic:
|
||||
|
||||
```sh
|
||||
listener distance_sensor 5
|
||||
```
|
||||
|
||||
:::info
|
||||
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](../debug/sensor_uorb_topic_debugging.md).
|
||||
|
||||
## 仿真
|
||||
|
||||
### Gazebo Simulation
|
||||
|
||||
Lidar and sonar rangefinders can be used in the [Gazebo](../sim_gazebo_gz/index.md) simulator.
|
||||
To do this you must start the simulator using a vehicle model that includes the rangefinder.
|
||||
|
||||
Downward facing sensors that write to the [DistanceSensor](../msg_docs/DistanceSensor.md) UORB topic can be used to test use cases such as [landing](../flight_modes_mc/land.md) and [terrain following](../flying/terrain_following_holding.md):
|
||||
|
||||
- [Quadrotor(x500) with 1D LIDAR (Down-facing)](../sim_gazebo_gz/vehicles.md#x500-quadrotor-with-1d-lidar-down-facing)
|
||||
|
||||
```sh
|
||||
make px4_sitl gz_x500_lidar_down
|
||||
```
|
||||
|
||||
Front-facing sensors that write to [ObstacleDistance](../msg_docs/ObstacleDistance.md) can be used to test [Collision Prevention](../computer_vision/collision_prevention.md#gazebo-simulation):
|
||||
|
||||
- [Quadrotor(x500) with 2D LIDAR](../sim_gazebo_gz/vehicles.md#x500-quadrotor-with-2d-lidar)
|
||||
|
||||
```sh
|
||||
make px4_sitl gz_x500_lidar_2d
|
||||
```
|
||||
|
||||
- [Quadrotor(x500) with 1D LIDAR (Front-facing)](../sim_gazebo_gz/vehicles.md#x500-quadrotor-with-1d-lidar-front-facing)
|
||||
|
||||
```sh
|
||||
make px4_sitl gz_x500_lidar_front
|
||||
```
|
||||
|
||||
### Gazebo-Classic Simulation
|
||||
|
||||
Lidar and sonar rangefinders can be used in the [Gazebo Classic](../sim_gazebo_classic/index.md) 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:
|
||||
|
||||
```sh
|
||||
make px4_sitl gazebo-classic_iris_opt_flow
|
||||
```
|
||||
|
||||
The typhoon_h480 includes a sonar rangefinder:
|
||||
|
||||
```sh
|
||||
make px4_sitl gazebo-classic_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:
|
||||
|
||||
- [iris_opt_flow.sdf](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/models/iris_opt_flow/iris_opt_flow.sdf)
|
||||
|
||||
```xml
|
||||
<include>
|
||||
<uri>model://lidar</uri>
|
||||
<pose>-0.12 0 0 0 3.1415 0</pose>
|
||||
</include>
|
||||
<joint name="lidar_joint" type="revolute">
|
||||
<child>lidar::link</child>
|
||||
<parent>iris::base_link</parent>
|
||||
<axis>
|
||||
<xyz>0 0 1</xyz>
|
||||
<limit>
|
||||
<upper>0</upper>
|
||||
<lower>0</lower>
|
||||
</limit>
|
||||
</axis>
|
||||
</joint>
|
||||
```
|
||||
|
||||
- [typhoon_h480.sdf](https://github.com/PX4/PX4-SITL_gazebo-classic/blob/main/models/typhoon_h480/typhoon_h480.sdf.jinja#L1131-L1145)
|
||||
|
||||
```xml
|
||||
<include>
|
||||
<uri>model://sonar</uri>
|
||||
</include>
|
||||
<joint name="sonar_joint" type="revolute">
|
||||
<child>sonar_model::link</child>
|
||||
<parent>typhoon_h480::base_link</parent>
|
||||
<axis>
|
||||
<xyz>0 0 1</xyz>
|
||||
<limit>
|
||||
<upper>0</upper>
|
||||
<lower>0</lower>
|
||||
</limit>
|
||||
</axis>
|
||||
</joint>
|
||||
```
|
||||
@@ -0,0 +1,129 @@
|
||||
# Lightware SF45/B Rotary Lidar
|
||||
|
||||
LightWare [SF45/B](https://lightwarelidar.com/shop/sf45-b-50-m/) is an extremely small and light rotating Lidar with a range of 50m.
|
||||
It can be used to enable [Collision Prevention](../computer_vision/collision_prevention.md) without a companion computer.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
The lidar driver is not included in the default build of PX4.
|
||||
You will need to [create and use a custom build](#add-the-driver-to-the-px4-build).
|
||||
:::
|
||||
|
||||
## LightWare Studio Setup
|
||||
|
||||
In the [LightWare Studio](https://www.lightwarelidar.com/resources-software) app set following values:
|
||||
|
||||
| 参数 | 描述 |
|
||||
| --------- | ------ |
|
||||
| Baud rate | 921600 |
|
||||
|
||||
Make sure the scan angles are set so that nothing on the drone interferes with the measurements.
|
||||
The driver and [Collision Prevention](../computer_vision/collision_prevention.md) automatically handle angles different from the maximum angles.
|
||||
|
||||
## 硬件安装
|
||||
|
||||
The rangefinder can be connected to any unused serial port, such as `TELEM2`.
|
||||
[Parameter Configuration](#parameter-configuration) explains how to configure the port to use and the other properties of the rangefinder.
|
||||
|
||||
## PX4 Setup
|
||||
|
||||
### Add the Driver to the PX4 Build
|
||||
|
||||
The driver for this LiDar is not included in PX4 firmware by default.
|
||||
|
||||
You will need to:
|
||||
|
||||
1. Add the [lightware_sf45_serial](../modules/modules_driver_distance_sensor.md#lightware-sf45-serial) driver to firmware:
|
||||
- Install and open [menuconfig](../hardware/porting_guide_config.md#px4-menuconfig-setup)
|
||||
- In [menuconfig](../hardware/porting_guide_config.md#px4-menuconfig-setup), navigate to **Drivers > Distance sensors**
|
||||
- Select/Enable `lightware_sf45_serial`
|
||||
2. [Build PX4](../dev_setup/building_px4.md) for your flight controller target and then upload the new firmware.
|
||||
|
||||
### Parameter Configuration
|
||||
|
||||
You will need to configure PX4 to indicate the serial port to which the sensor is connected (as per [Serial Port Configuration](../peripherals/serial_configuration.md)) and also the orientation and other properties of the sensor.
|
||||
|
||||
The [parameters to change](../advanced_config/parameters.md) are listed in the table.
|
||||
|
||||
| 参数 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
| <a id="SENS_EN_SF45_CFG"></a>[SENS_EN_SF45_CFG](../advanced_config/parameter_reference.md#SENS_EN_SF45_CFG) | Set to the serial port you have the sensor connected to. |
|
||||
| <a id="SF45_ORIENT_CFG"></a>[SF45_ORIENT_CFG](../advanced_config/parameter_reference.md#SF45_ORIENT_CFG) | Set the orientation of the sensor (facing up or down) |
|
||||
| <a id="SF45_UPDATE_CFG"></a>[SF45_UPDATE_CFG](../advanced_config/parameter_reference.md#SF45_UPDATE_CFG) | Set the update rate |
|
||||
| <a id="SF45_YAW_CFG"></a>[SF45_YAW_CFG](../advanced_config/parameter_reference.md#SF45_YAW_CFG) | Set the yaw orientation |
|
||||
|
||||
## 测试
|
||||
|
||||
You can confirm that the sensor is correctly configured by connecting QGroundControl, and observing that [OBSTACLE_DISTANCE](https://mavlink.io/en/messages/common.html#OBSTACLE_DISTANCE) is present in the [MAVLink Inspector](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_inspector.html).
|
||||
|
||||
The obstacle overlay in QGC will look like this:
|
||||
|
||||

|
||||
|
||||
## Driver Implementation
|
||||
|
||||
The [sensor driver](../modules/modules_driver_distance_sensor.md#lightware-sf45-serial) publishes the [ObstacleDistance](../msg_docs/ObstacleDistance.md) UORB Message that is used by PX4 [Collision Prevention](../computer_vision/collision_prevention.md).
|
||||
The measurements in each sector will correspond to the lowest measurement the sensor had in that corresponding sector.
|
||||
The data is then published to the [OBSTACLE_DISTANCE](https://mavlink.io/en/messages/common.html#OBSTACLE_DISTANCE) MAVLink message.
|
||||
|
||||
## 故障处理
|
||||
|
||||
### Errors and Jerky Movements
|
||||
|
||||
Start-up issues, jerky movements, or a lot of communication errors displayed with `lightware_sf45_serial status` could mean that the sensor is not getting enough power.
|
||||
|
||||
According to its datasheet, the sensor needs 300 mA of current at 5V.
|
||||
The supplied cable is fairly long and when connected to the 5V supply, such as the flight controller `TELEM2` port, the voltage at the rangefinder may drop below the required level.
|
||||
One mitigation/alternative is to power the SF45 via a separate step-down converter from battery voltage, ensuring that there are 5V across the rangefinder itself.
|
||||
|
||||
### Debugging with PlotJuggler
|
||||
|
||||
Debugging problems with distance sensors is much easier if you can plot the [OBSTACLE_DISTANCE](https://mavlink.io/en/messages/common.html#OBSTACLE_DISTANCE) message in an x-y plot, because this lets you directly see the orientation of the measurement in respect of the drone.
|
||||
|
||||
The video below shows how you can view such a plot in PlotJuggler.
|
||||
|
||||
<lite-youtube videoid="VwEd_7aiLEo" title="PX4 Autopilot: SF45 rangefinder - collision prevention "/>
|
||||
|
||||
In order to generate this kind of plot you will need to add the following reactive Lua scripts to PlotJuggler.
|
||||
If you save these scripts and then add new data, you will see a new timeseries called `obstacle_distance_xy`, which is the same as is displayed in the video.
|
||||
|
||||
:::tip
|
||||
The [Plotting Obstacle Distance and Minimum Distance in Real-Time with PlotJuggler](../computer_vision/collision_prevention.md#plotting-obstacle-distance-and-minimum-distance-in-real-time-with-plotjuggler) in the _Collision Prevention_ topic has a more detailed example of how use Reactive scripts in PlotJuggler.
|
||||
:::
|
||||
|
||||
**Global code, executed once:**
|
||||
|
||||
```lua
|
||||
obs_dist_xy = ScatterXY.new("obstacle_distance_xy")
|
||||
```
|
||||
|
||||
**function(tracker_time)**
|
||||
|
||||
```lua
|
||||
obs_dist_xy:clear()
|
||||
|
||||
i = 0
|
||||
angle_offset = TimeseriesView.find("obstacle_distance/angle_offset")
|
||||
increment = TimeseriesView.find("obstacle_distance/increment")
|
||||
|
||||
while(true) do
|
||||
|
||||
str = string.format("obstacle_distance/distances.%02d", i)
|
||||
distance = TimeseriesView.find( str )
|
||||
|
||||
if distance == nil then break end
|
||||
angle = angle_offset:atTime(tracker_time) + i * increment:atTime(tracker_time)
|
||||
|
||||
y = distance:atTime(tracker_time) * math.cos(math.rad(angle))
|
||||
x = distance:atTime(tracker_time) * math.sin(math.rad(angle))
|
||||
|
||||
obs_dist_xy:push_back(x, y)
|
||||
|
||||
i = i + 1
|
||||
end
|
||||
```
|
||||
|
||||
:::tip
|
||||
To also see the fused `obstacle_distance`, you can just adapt the script to work on the `obstacle_distance_fused` message.
|
||||
:::
|
||||
@@ -0,0 +1,93 @@
|
||||
# LightWare Lidar (SF1X/SF02/LW20/SF45)
|
||||
|
||||
LightWare develops a range of light-weight, general purpose, laser altimeters ("Lidar") suitable for mounting on UAVs.
|
||||
These are useful for applications including terrain following, precision hovering (e.g. for photography), warning of regulatory height limits, anti-collision sensing etc.
|
||||
|
||||
<img src="../../assets/hardware/sensors/lidar_lightware/sf11c_120_m.jpg" width="350px" alt="LightWare SF11/C Lidar"/>
|
||||
|
||||
## Supported Models
|
||||
|
||||
The following models are supported by PX4, and can be connected to either the I2C or Serial bus (the tables below indicates what bus can be used for each model).
|
||||
|
||||
| Model | Range (m) | Bus | 描述 |
|
||||
| ---------------------------------------------------------- | ---------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| [SF11/C](https://lightwarelidar.com/products/sf11-c-100-m) | 100 | Serial or I2C bus | |
|
||||
| [LW20/C](https://lightware.co.za/products/lw20-c-100-m) | 100 | I2C bus | Waterproofed (IP67) with servo for sense-and-avoid applications |
|
||||
| [SF45/B](../sensor/sf45_rotating_lidar.md) | 50 | Serial | Rotary Lidar (Used for [Collision Prevention](../computer_vision/collision_prevention.md)) |
|
||||
|
||||
:::details
|
||||
Discontinued
|
||||
|
||||
The following models are supported by PX4 but are no longer available from the manufacturer.
|
||||
|
||||
| Model | 范围 | Bus | |
|
||||
| -------------------------------------------------------------------------------------------------- | ---- | ------------- | ---------------------------------------------------------------------------------- |
|
||||
| [SF02](http://documents.lightware.co.za/SF02%20-%20Laser%20Rangefinder%20Manual%20-%20Rev%208.pdf) | 50 | Serial | |
|
||||
| [SF10/A](http://documents.lightware.co.za/SF10%20-%20Laser%20Altimeter%20Manual%20-%20Rev%206.pdf) | 25 | Serial or I2C | |
|
||||
| [SF10/B](http://documents.lightware.co.za/SF10%20-%20Laser%20Altimeter%20Manual%20-%20Rev%206.pdf) | 50 | Serial or I2C | |
|
||||
| SF10/C | 100m | Serial or I2C | |
|
||||
| LW20/B | 50 | I2C bus | Waterproofed (IP67) with servo for sense-and-avoid applications |
|
||||
|
||||
:::
|
||||
|
||||
## I2C Setup
|
||||
|
||||
Check the tables above to confirm that which models can be connected to the I2C port.
|
||||
|
||||
### Lidar Configuration (SF11/C)
|
||||
|
||||
The SF11/C hardware (only) does not ship with Pixhawk I2C compatibility enabled by default.
|
||||
To enable support, you have to download [LightWare Studio](https://lightwarelidar.com/pages/lightware-studio) and got to **Parameters > Communication** and tick mark **I2C compatibility mode (Pixhawk)**
|
||||
|
||||

|
||||
|
||||
This step is not required for the other supported Lightware rangefinders.
|
||||
|
||||
### 硬件
|
||||
|
||||
Connect the Lidar the autopilot I2C port as shown below (in this case, for the [Pixhawk 1](../flight_controller/mro_pixhawk.md)).
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
Some older revisions cannot be used with PX4.
|
||||
Specifically they may be miss-configured to have an I2C address equal to `0x55`, which conflicts with `rgbled` module.
|
||||
On Linux systems you may be able to determine the address using [i2cdetect](https://linux.die.net/man/8/i2cdetect).
|
||||
If the I2C address is equal to `0x66` the sensor can be used with PX4.
|
||||
:::
|
||||
|
||||
### Parameter Setup {#i2c_parameter_setup}
|
||||
|
||||
Set the [SENS_EN_SF1XX](../advanced_config/parameter_reference.md#SENS_EN_SF1XX) parameter to match the rangefinder model and then reboot.
|
||||
|
||||
VTOL vehicles may choose to also set [SF1XX_MODE](../advanced_config/parameter_reference.md#SF1XX_MODE) to `2: Disabled during VTOL fast forward flight`.
|
||||
|
||||
## Serial Setup {#serial_hardware_setup}
|
||||
|
||||
:::tip
|
||||
[SF45/B](../sensor/sf45_rotating_lidar.md) setup is covered in the linked document.
|
||||
:::
|
||||
|
||||
### 硬件
|
||||
|
||||
The lidar can be connected to any unused _serial port_ (UART), e.g.: TELEM2, TELEM3, GPS2 etc.
|
||||
|
||||
<!-- Would be good to show serial setup! -->
|
||||
|
||||
### Parameter Setup {#serial_parameter_setup}
|
||||
|
||||
[Configure the serial port](../peripherals/serial_configuration.md) on which the lidar will run using [SENS_SF0X_CFG](../advanced_config/parameter_reference.md#SENS_SF0X_CFG).
|
||||
There is no need to set the baud rate for the port, as this is configured by the driver.
|
||||
|
||||
:::info
|
||||
If the configuration parameter is not available in _QGroundControl_ then you may need to [add the driver to the firmware](../peripherals/serial_configuration.md#parameter_not_in_firmware).
|
||||
:::
|
||||
|
||||
Then set the [SENS_EN_SF0X](../advanced_config/parameter_reference.md#SENS_EN_SF0X) parameter to match the rangefinder model and reboot.
|
||||
|
||||
VTOL vehicles may choose to also set [SF1XX_MODE](../advanced_config/parameter_reference.md#SF1XX_MODE) to `2: Disabled during VTOL fast forward flight`.
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Modules Reference: Distance Sensor (Driver) : lightware_laser_i2c](../modules/modules_driver_distance_sensor.md#lightware-laser-i2c)
|
||||
- [Modules Reference: Distance Sensor (Driver) : lightware_laser_serial](../modules/modules_driver_distance_sensor.md#lightware-laser-serial)
|
||||
@@ -0,0 +1,16 @@
|
||||
# 转速计(转数计数器)
|
||||
|
||||
Tachometers (also known as [revolution-counter sensors](https://en.wikipedia.org/wiki/Tachometer#In_automobiles,_trucks,_tractors_and_aircraft)) can be used to measure the rate of rotation turning vehicle parts like rotors, engines, or wheels.
|
||||
|
||||
:::info
|
||||
Currently PX4 just logs RPM data: it is not used for state estimation or control.
|
||||
:::
|
||||
|
||||
本节列出了 PX4 支持的转速计传感器(更详细的文档点击链接)。
|
||||
更详细的设置和配置信息在下方(和侧边栏)的主题链接中提供
|
||||
|
||||

|
||||
|
||||
## 支持的硬件
|
||||
|
||||
- [ThunderFly TFRPM01 Tachometer](../sensor/thunderfly_tachometer.md)
|
||||
@@ -0,0 +1,41 @@
|
||||
# TeraRanger 测距仪
|
||||
|
||||
TeraRanger provide a number of lightweight distance measurement sensor based on infrared Time-of-Flight (ToF) technology.
|
||||
他们通常比声纳更快、范围更大、比基于激光的系统更小、更轻。
|
||||
|
||||
PX4 supports:
|
||||
|
||||
- [TeraRanger Evo 60m](https://www.terabee.com/shop/lidar-tof-range-finders/teraranger-evo-60m/) (0.5 – 60 m)
|
||||
- [TeraRanger Evo 600Hz](https://www.terabee.com/shop/lidar-tof-range-finders/teraranger-evo-600hz/) (0.75 - 8 m)
|
||||
|
||||
:::info
|
||||
PX4 also supports _TeraRanger One_ (I2C adapter required).
|
||||
This has been discontinued.
|
||||
:::
|
||||
|
||||
## 购买渠道
|
||||
|
||||
- TBD
|
||||
|
||||
## 针脚定义
|
||||
|
||||
## 布线
|
||||
|
||||
All TeraRanger sensors must be connected via the I2C bus.
|
||||
|
||||
## 软件配置
|
||||
|
||||
The sensors are enabled using the parameter [SENS_EN_TRANGER](../advanced_config/parameter_reference.md#SENS_EN_TRANGER) (you can set the type of sensor or that PX4 should auto-detect the type).
|
||||
|
||||
:::info
|
||||
If using auto-detect for Evo sensors the minimum and maximum values for the range are set to the lowest and highest possible readings across the Evo family (currently 0.5 - 60 m).
|
||||
In order to use the correct max/min values the appropriate model of the Evo sensor should be set in the parameter (instead of using autodetect).
|
||||
:::
|
||||
|
||||
:::tip
|
||||
The driver for this rangefinder is usually present in firmware. If missing, you would also need to add the driver (`distance_sensor/teraranger`) to the board configuration.
|
||||
:::
|
||||
|
||||
## 更多信息
|
||||
|
||||
- [Modules Reference: Distance Sensor (Driver) : teraranger](../modules/modules_driver_distance_sensor.md#teraranger)
|
||||
@@ -0,0 +1,32 @@
|
||||
# Benewake TFmini LiDAR
|
||||
|
||||
The _Benewake TFmini LiDAR_ is a tiny, low cost, and low power LIDAR with 12m range.
|
||||
|
||||
PX4 supports all three variants in the series: TFmini-s, TFmini-i, TFmini Plus.
|
||||
These must be connected to a UART/serial bus.
|
||||
|
||||

|
||||
|
||||
## 购买渠道
|
||||
|
||||
- [TFmini-s](https://en.benewake.com/TFminiS/index_proid_325.html)
|
||||
- [TFmini-i](https://en.benewake.com/TFminii/index_proid_324.html) (industrial)
|
||||
- [TFmini Plus](https://en.benewake.com/TFminiPlus/index_proid_323.html)
|
||||
|
||||
## 硬件安装
|
||||
|
||||
TFmini can be connected to any unused _serial port_ (UART), such as: `TELEM2`, `TELEM3`, `GPS2` etc.
|
||||
|
||||
## Parameter Setup
|
||||
|
||||
[Configure the serial port](../peripherals/serial_configuration.md) on which the lidar will run using [SENS_TFMINI_CFG](../advanced_config/parameter_reference.md#SENS_TFMINI_CFG).
|
||||
There is no need to set the baud rate (this is hard coded in the sensor driver as only one rate is supported).
|
||||
|
||||
:::info
|
||||
If the configuration parameter is not available in _QGroundControl_ then the [tfmini](../modules/modules_driver_distance_sensor.md#tfmini) driver may not be in firmware.
|
||||
For information on how to add it see:
|
||||
|
||||
- [Serial port Configuration: Configuration Parameter Missing from QGroundControl](../peripherals/serial_configuration.md#parameter_not_in_firmware)
|
||||
- [PX4 Board Configuration (Kconfig)](../hardware/porting_guide_config.md#px4-menuconfig-setup).
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,129 @@
|
||||
# ThunderFly TFRPM01 Revolution Counter
|
||||
|
||||
The [TFRPM01](https://github.com/ThunderFly-aerospace/TFRPM01) tachometer is a small, and low system demanding revolution-counter.
|
||||
|
||||
The board itself does not include the actual sensor but can be used with many different sensors/probe types for revolution counting.
|
||||
It has an I²C connector for connecting to PX4 and is connected to the actual sensor via a 3-pin connector.
|
||||
It also has an LED that offers basic diagnostic information.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
The TFRPM01 sensor is open-source hardware commercially available from [ThunderFly s.r.o.](https://www.thunderfly.cz/) (manufacturing data is [available on GitHub](https://github.com/ThunderFly-aerospace/TFRPM01)).
|
||||
:::
|
||||
|
||||
## 硬件安装
|
||||
|
||||
The board is equipped with (two through pass) I²C connectors for connecting to PX4 and has a 3-pin connector that can be used to connect to various sensors:
|
||||
|
||||
- TFRPM01 may be connected to any I²C port.
|
||||
- TFRPM01 has a 3pin pin-header connector (with pull-up equipped input) that can be connected to different probe types.
|
||||
- The sensor/probe hardware needs a pulse signal.
|
||||
The signal input accepts +5V TTL logic or [open collector](https://en.wikipedia.org/wiki/Open_collector) outputs.
|
||||
The maximum pulse frequency is 20 kHz with a 50% duty cycle.
|
||||
- The probe connector provides a +5V power supply from the I²C bus, the maximum power which could be used is limited by RC filter (see schematics for details).
|
||||
|
||||
TFRPM01A electronics is equipped with signaling LED that can be used to check that the probe is connected properly.
|
||||
The LED lights up when the pulse input is grounded or exposed to logical 0, so you can check the probe is working correctly just by manually spinning a rotor.
|
||||
|
||||
### Hall-Effect Sensor Probe
|
||||
|
||||
Hall-Effect sensors (magnetically operated) are ideal for harsh environments, where dirt, dust, and water can contact the sensed rotor.
|
||||
|
||||
Many different hall effect sensors are commercially available.
|
||||
For example, a [55100 Miniature Flange Mounting Proximity Sensor](https://m.littelfuse.com/media?resourcetype=datasheets\&itemid=6d69d457-770e-46ba-9998-012c5e0aedd7\&filename=littelfuse-hall-effect-sensors-55100-datasheet) is a good choice.
|
||||
|
||||

|
||||
|
||||
### Optical Sensor Probe
|
||||
|
||||
An optical sensor can also be used (and may be a better fit, depending on the measurement requirements).
|
||||
Both transmissive and reflective sensor types may be used for pulse generation.
|
||||
|
||||

|
||||
|
||||
## 软件设置
|
||||
|
||||
### Starting driver
|
||||
|
||||
The driver is not started automatically (in any airframe).
|
||||
You will need to start it manually, either using the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) or by adding the driver to the [startup script](../concept/system_startup.md#customizing-the-system-startup) on an SD card.
|
||||
|
||||
#### Start driver from console
|
||||
|
||||
Start the driver from the [console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) using the command:
|
||||
|
||||
```sh
|
||||
pcf8583 start -X -b <bus number>
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
- `-X` means that it is an external bus.
|
||||
- `<bus number>` is the bus number to which the device is connected
|
||||
|
||||
:::info
|
||||
The bus number in code `-b <bus number>` may not match the bus labels on the autopilot.
|
||||
For example, when using CUAV V5+ or CUAV Nano:
|
||||
|
||||
| Autopilot label | -b number |
|
||||
| --------------- | --------- |
|
||||
| I2C1 | -X -b 4 |
|
||||
| I2C2 | -X -b 2 |
|
||||
| I2C3 | -X -b 1 |
|
||||
|
||||
The `pcf8583 start` command outputs the corresponding autopilot bus name/label for each bus number.
|
||||
:::
|
||||
|
||||
### 测试
|
||||
|
||||
You can verify the counter is working using several methods
|
||||
|
||||
#### PX4 (NuttX) MAVLink Console
|
||||
|
||||
The [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) can also be used to check that the driver is running and the UORB topics it is outputting.
|
||||
|
||||
To check the status of the TFRPM01 driver run the command:
|
||||
|
||||
```sh
|
||||
pcf8583 status
|
||||
```
|
||||
|
||||
If the driver is running, the I²C port will be printed along with other basic parameters of the running instance.
|
||||
If the driver is not running it can be started started using theprocedure described above.
|
||||
|
||||
The [listener](../modules/modules_command.md#listener) command allows you to monitor RPM UORB messages from the running driver.
|
||||
|
||||
```sh
|
||||
listener rpm
|
||||
```
|
||||
|
||||
For periodic display, you can add `-n 50` parameter after the command, which prints the next 50 messages.
|
||||
|
||||
#### QGroundControl MAVLink Inspector
|
||||
|
||||
The QGroundControl [Mavlink Inspector](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_inspector.html) can be used to observe MAVLink messages from PX4, including [RAW_RPM](https://mavlink.io/en/messages/common.html#RAW_RPM) emitted by the driver:
|
||||
|
||||
1. Start the inspector from the QGC menu: **Analyze tools > Mavlink Inspector**
|
||||
2. Check that `RAW_RPM` is present in the list of messages (if it is missing, check that the driver is running).
|
||||
|
||||
### Parameter Setup
|
||||
|
||||
Usually, sensors can be used without configuration, but the RPM values should correspond to multiples of real RPM. It is because the `PCF8583_MAGNET` parameter needs to correspond to the real number of pulses per single revolution of the sensed rotor.
|
||||
If needed, the following parameters should be tweaked:
|
||||
|
||||
- [PCF8583_POOL](../advanced_config/parameter_reference.md#PCF8583_POOL) — pooling interval between readout the counted number
|
||||
- [PCF8583_RESET](../advanced_config/parameter_reference.md#PCF8583_RESET) — Counter value where the counted number should be reset to zero.
|
||||
- [PCF8583_MAGNET](../advanced_config/parameter_reference.md#PCF8583_MAGNET) — Number of pulses per revolution e.g. number of magnets at a rotor disc.
|
||||
|
||||
:::info
|
||||
The parameters above appear in QGC after the driver/PX4 are restarted.
|
||||
|
||||
If the configuration parameters are not available after restart then you should check that the driver has started.
|
||||
It may be that the [driver is not present in the firmware](../peripherals/serial_configuration.md#configuration-parameter-missing-from-qgroundcontrol), in which case it must be added to the board configuration:
|
||||
|
||||
```sh
|
||||
drivers/rpm/pcf8583
|
||||
```
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,38 @@
|
||||
# Ainstein US-D1 标准雷达高度计
|
||||
|
||||
:::tip
|
||||
This supersedes the _Aerotenna uLanding Radar_ (discontinued) but uses the same driver/setup.
|
||||
:::
|
||||
|
||||
The _Ainstein_ [US-D1 Standard Radar Altimeter](https://ainstein.ai/us-d1-all-weather-radar-altimeter/) is a compact microwave rangefinder that has been optimised for use on UAVs.
|
||||
With a sensing range of about 50 metres, it is useful for applications including terrain following, precision hovering (e.g. for photography), anti-collision sensing etc.
|
||||
Particular advantages of this product are that it can operate effectively in all weather conditions and over all terrain types (including water).
|
||||
The user manual can be found [here](https://ainstein.ai/wp-content/uploads/US-D1-Technical-User-Manual-D00.02.05.docx.pdf).
|
||||
|
||||

|
||||
|
||||
The rangefinder is not automatically included in most firmware, and hence cannot be used just by setting a parameter through _QGroundControl_ (as is possible with some other rangefinders).
|
||||
To use it you will need to add the driver to firmware and update a configuration file to start the driver on boot.
|
||||
The sections below explain how.
|
||||
|
||||
## 硬件安装
|
||||
|
||||
The rangefinder is supported by any hardware which runs a NuttX or Posix OS and which can offer a serial port for the interface.
|
||||
Minimally this will include most, if not all, [Pixhawk Series](../flight_controller/pixhawk_series.md) controllers.
|
||||
|
||||
US-D1 can be connected to any unused _serial port_ (UART), e.g.: TELEM2, TELEM3, GPS2 etc.
|
||||
|
||||
## Parameter Setup
|
||||
|
||||
[Configure the serial port](../peripherals/serial_configuration.md) on which the lidar will run using [SENS_ULAND_CFG](../advanced_config/parameter_reference.md#SENS_ULAND_CFG).
|
||||
There is no need to set the baud rate for the port, as this is configured by the driver.
|
||||
|
||||
::: info
|
||||
|
||||
If the configuration parameter is not available in _QGroundControl_ then you may need to [add the driver to the firmware](../peripherals/serial_configuration.md#parameter_not_in_firmware):
|
||||
|
||||
```plain
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_ULANDING_RADAR=y
|
||||
```
|
||||
|
||||
:::
|
||||
@@ -0,0 +1,142 @@
|
||||
# VectorNav
|
||||
|
||||
VectorNav Technologies designs and develops high-performance, low-SWaP [IMU/AHRS](https://www.vectornav.com/resources/inertial-navigation-primer/theory-of-operation/theory-ahrs), [GNSS/INS](https://www.vectornav.com/resources/inertial-navigation-primer/theory-of-operation/theory-gpsins), and [Dual GNSS/INS](https://www.vectornav.com/resources/inertial-navigation-primer/theory-of-operation/theory-gnsscompass) solutions that enable safe and reliable autonomy at scale.
|
||||
|
||||

|
||||
|
||||
VectorNav products provide a range of benefits to PX4 users and can be integrated for:
|
||||
|
||||
- Higher accuracy heading, pitch, and roll estimates
|
||||
- More robust and reliable GNSS positioning
|
||||
- Improved positioning and attitude performance in GNSS-contested environments
|
||||
- Performance under challenging dynamic conditions (e.g. catapult launches, VTOL operations, high-g or high angular rate operations)
|
||||
|
||||
The VectorNav PX4 Driver is streamlined to provide a simple plug-and-play architecture, removing engineering obstacles and allowing the acceleration of the design, development, and launch of platforms to keep pace with the rapid rate of innovation.
|
||||
|
||||
PX4 can use these as an [external INS](../sensor/inertial_navigation_systems.md), bypassing/replacing the EKF2 estimator, or as a source of raw sensor data provided to the estimator.
|
||||
|
||||
The driver supports [all VectorNav sensors](https://www.vectornav.com/store/products).
|
||||
In particular the following systems are recommended:
|
||||
|
||||
- **VN-200 GNSS/INS:** Recommended for fixed-wing systems without hovering, where static heading is not necessary.
|
||||
- **VN-300 DUAL GNSS/INS:** Recommended for multicopter systems where hovering and low dynamics requires the use of static heading.
|
||||
|
||||
## 购买渠道
|
||||
|
||||
VectorNav IMU/AHRS, GNSS/INS, and Dual GNSS/INS solutions are available directly from [VectorNav Technologies](https://www.vectornav.com/store/products) (US) or through their Global Sales Representatives. For more information on their solutions or for international orders, please contact sales@vectornav.com.
|
||||
|
||||
[Purchase VN-200 Development Kit](https://www.vectornav.com/store/products/gnss-ins/p/vn-200-rugged-development-kit) (GNSS/INS)
|
||||
[Purchase VN-300 Development Kit](https://www.vectornav.com/store/products/dual-gnss-ins/p/vn-300-rugged-development-kit) (Dual GNSS/INS)
|
||||
|
||||
## 硬件安装
|
||||
|
||||
### 布线
|
||||
|
||||
Connect any unused flight controller serial interface, such as a spare `GPS` or `TELEM` port, to the VectorNav UART2 port (required by PX4).
|
||||
|
||||
### Mounting
|
||||
|
||||
The VectorNav sensor can be mounted in any orientation, in any position on the vehicle, without regard to center of gravity.
|
||||
All VectorNav sensors default to a coordinate system of x-forward, y-right, and z-down, making the default mounting as connector-back, base down.
|
||||
This can be changed to any rigid rotation using the VectorNav Reference Frame Rotation register.
|
||||
|
||||
If using a GNSS-enabled product, the GNSS antenna must be mounted rigidly with respect to the inertial sensor and with an unobstructed sky view. If using a dual-GNSS-enabled product (VN-3X0), the secondary antenna must be mounted rigidly with respect to the primary antenna and the inertial sensor with an unobstructed sky view.
|
||||
|
||||
For more mounting requirements and recommendations, see the relevant [Quick Start Guide](https://www.vectornav.com/resources/quick-start-guides).
|
||||
|
||||
## Firmware Configuration
|
||||
|
||||
### PX4 配置
|
||||
|
||||
To use the VectorNav driver:
|
||||
|
||||
1. Include the module in firmware in the [kconfig board configuration](../hardware/porting_guide_config.md#px4-board-configuration-kconfig) by setting the kconfig variables: `CONFIG_DRIVERS_INS_VECTORNAV` or `CONFIG_COMMON_INS`.
|
||||
|
||||
2. [Set the parameter](../advanced_config/parameters.md) [SENS_VN_CFG](../advanced_config/parameter_reference.md#SENS_VN_CFG) to the hardware port connected to the VectorNav (for more information see [Serial Port Configuration](../peripherals/serial_configuration.md)).
|
||||
|
||||
3. Disable magnetometer preflight checks by setting [SYS_HAS_MAG](../advanced_config/parameter_reference.md#SYS_HAS_MAG) to `0`.
|
||||
|
||||
4. Allow the VectorNav driver to initialize by restarting PX4.
|
||||
|
||||
5. Configure driver as either an external INS or to provide raw data:
|
||||
|
||||
- If using the VectorNav as an external INS, set [VN_MODE](../advanced_config/parameter_reference.md#VN_MODE) to `INS`.
|
||||
This disables EKF2.
|
||||
- If using the VectorNav as external inertial sensors:
|
||||
|
||||
1. Set [VN_MODE](../advanced_config/parameter_reference.md#VN_MODE) to `Sensors Only`
|
||||
2. If internal sensors are enabled, prioritize VectorNav sensors using [CAL_GYROn_PRIO](../advanced_config/parameter_reference.md#CAL_GYRO0_PRIO), [CAL_ACCn_PRIO](../advanced_config/parameter_reference.md#CAL_ACC0_PRIO), [CAL_BAROn_PRIO](../advanced_config/parameter_reference.md#CAL_BARO0_PRIO), [CAL_MAGn_PRIO](../advanced_config/parameter_reference.md#CAL_MAG0_PRIO), where _n_ is the instance number of the IMU component (0, 1, etc.).
|
||||
|
||||
::: tip
|
||||
In most cases the external IMU (VN) is the highest-numbered.
|
||||
You can get a list of the IMU components available using [`uorb top -1`](../middleware/uorb.md#uorb-top-command), you can differentiate between them using the [`listener`](../modules/modules_command.md#listener) command and looking through the data, or just the rates.
|
||||
|
||||
Alternatively, you can check [CAL_GYROn_ID](../advanced_config/parameter_reference.md#CAL_GYRO0_ID) to see the device id.
|
||||
The priority is 0-255, where 0 is entirely disabled and 255 is highest priority.
|
||||
|
||||
:::
|
||||
|
||||
6. Restart PX4.
|
||||
|
||||
Once enabled, the module will be detected on boot.
|
||||
IMU data should be published at 800Hz (400Hz if using VN-300).
|
||||
|
||||
## VectorNav Configuration
|
||||
|
||||
Definitions for all commands and registers referenced in this section can be found in the respective [VectorNav ICD](https://www.vectornav.com/resources/interface-control-documents).
|
||||
|
||||
Upon initialization, PX4 configures the VectorNav unit as follows:
|
||||
|
||||
- Enables necessary binary outputs
|
||||
- Disables ASCII outputs on active serial port
|
||||
- Configures VPE Heading Mode to Absolute
|
||||
- Autoscans baudrates and configures active port to 921600 bps
|
||||
|
||||
All other necessary configuration parameters must be separately loaded to the VectorNav unit manually. These most commonly include:
|
||||
|
||||
- `GNSS Antenna A Offset` Necessary if using a GNSS-enabled product and the GNSS antenna is mounted more than 10 cm from the VectorNav unit
|
||||
- `GNSS Antenna Baseline` Necessary if using a dual-GNSS-enabled product
|
||||
- `Reference Frame Rotation` Necessary if not mounted as connector-back, base-down
|
||||
- `IMU Filtering Config` Recommended to adjust the default 200Hz IMU filtering
|
||||
|
||||
After setting these parameters, the settings must be set to persist over a power cycle using a Write Non Volatile command.
|
||||
|
||||
## Published Data
|
||||
|
||||
Upon initialization, the driver should print the following information to console (printed using `PX4_INFO`)
|
||||
|
||||
- Unit model number
|
||||
- Unit hardware version
|
||||
- Unit serial number
|
||||
- Unit firmware number
|
||||
|
||||
This should be accessible using the [`dmesg`](../modules/modules_system.md#dmesg) command.
|
||||
|
||||
The VectorNav driver always publishes the unit's data to the following UOrb topics:
|
||||
|
||||
- [sensor_accel](../msg_docs/SensorAccel.md)
|
||||
- [sensor_gyro](../msg_docs/SensorGyro.md)
|
||||
- [sensor_mag](../msg_docs/SensorMag.md)
|
||||
- [sensor_baro](../msg_docs/SensorBaro.md)
|
||||
- [sensor_gps](../msg_docs/SensorGps.md)
|
||||
|
||||
and, if enabled as an external INS, publishes:
|
||||
|
||||
- [vehicle_local_position](../msg_docs/VehicleLocalPosition.md)
|
||||
- [vehicle_global_positon](../msg_docs/VehicleGlobalPosition.md)
|
||||
- [vehicle_attitude](../msg_docs/VehicleAttitude.md)
|
||||
|
||||
or, if enabled as external sensor only, publishes:
|
||||
|
||||
- `external_ins_local_position`
|
||||
- `external_ins_global_position`
|
||||
- `external_ins_attitude`
|
||||
|
||||
:::tip
|
||||
Published topics can be viewed using the `listener` command.
|
||||
:::
|
||||
|
||||
## Hardware Specifications
|
||||
|
||||
- [Product Briefs](https://www.vectornav.com/resources/product-briefs)
|
||||
- [Datasheets](https://www.vectornav.com/resources/datasheets)
|
||||
Reference in New Issue
Block a user