Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rangefinder distance scaling fixes #6660

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions common/source/docs/common-aerotenna-usd1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ For a serial connection you can use any spare Serial/UART port. The example bel
- :ref:`SERIAL4_PROTOCOL <SERIAL4_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 11 (USD1-Serial)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 50
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 4500
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimeters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.5
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 45
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in meters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

For the CAN version, connect via CAN to the autopilot and set the following parameters:

- :ref:`CAN_P1_DRIVER<CAN_P1_DRIVER>` = 1 (first can port driver set to driver 1)
- :ref:`CAN_D1_PROTOCOL<CAN_D1_PROTOCOL>` = 7 (USD1 protocol for driver 1)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 33 (USD1_CAN)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 50
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 4500
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimeters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.5
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 45
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in meters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*


Testing the sensor
Expand Down
6 changes: 3 additions & 3 deletions common/source/docs/common-ainstein-lrd1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ For a serial connection you can use any spare Serial/UART port. The example bel
- :ref:`SERIAL4_PROTOCOL <SERIAL4_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 42 (Ainstein_LR_D1)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 100
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 50000
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimeters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 1.0
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 500
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in meters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

Testing the sensor
==================
Expand Down
2 changes: 1 addition & 1 deletion common/source/docs/common-arkflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Connection to Autopilot
To use the onboard lidar:

- Set :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 24 (DroneCAN)
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 3000 to set range finder's maximum range to 30m
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 30 to set range finder's maximum range to 30m

Additional Notes
-----------------
Expand Down
2 changes: 1 addition & 1 deletion common/source/docs/common-arkflow_mr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Connection to Autopilot
To use the onboard lidar:

- Set :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 24 (DroneCAN)
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 5000 to set range finder's maximum range to 50m
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 50 to set range finder's maximum range to 50m

Additional Notes
-----------------
Expand Down
6 changes: 3 additions & 3 deletions common/source/docs/common-benewake-tf02-lidar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ If the SERIAL4 is being used then the following parameters should be set for the
- :ref:`SERIAL4_PROTOCOL <SERIAL4_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 19 (Benewake TF02) for TF02, =20 (Benewake-Serial) for TF03 if Copter 3.6.12, =27 (Benewake TF03) for TF03 and TF02 Pro for Copter 4.0 and later, and =20 for TF-Luna. Note: using type = 20 on a TF03 will restrict its maximum range to that of a TF02.
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 30 for TFMini, 10 for TFminiPlus and TF-Luna.
- :ref:`RNGFND1_MAX <RNGFND1_MAX>`: for TF02 use **2000** for indoor, **1000** for outdoor. For TF03 use **3500** for indoor, **12000** for outdoor. For TF-Luna use **800** for indoor, **300** for outdoor. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.3 for TFMini, 0.1 for TFminiPlus and TF-Luna.
- :ref:`RNGFND1_MAX <RNGFND1_MAX>`: for TF02 use **20** for indoor, **10** for outdoor. For TF03 use **35** for indoor, **12** for outdoor. For TF-Luna use **8** for indoor, **3** for outdoor. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

If instead the Telem2 port was used then the serial parameters listed above should instead be:

Expand Down
12 changes: 6 additions & 6 deletions common/source/docs/common-benewake-tfmini-lidar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ If the SERIAL4 port on an autopilot is being used then the following parameters
- :ref:`SERIAL4_PROTOCOL <SERIAL4_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 20 (Benewake-Serial)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 30 for TFmini, 10 for TFminiPlus
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **1000** for indoor use OR **600** for outdoors. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.3 for TFmini, 0.1 for TFminiPlus
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **10** for indoor use OR **6** for outdoors. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

Connecting using I2C
--------------------
Expand All @@ -46,9 +46,9 @@ The diagram below shows how to connect to the autopilot's I2C port.

- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 25 (Benewake TFminiPlus-I2C)
- :ref:`RNGFND1_ADDR<RNGFND1_ADDR>` = 16 (I2C address of lidar in decimal, equivalent to 0x10 hexadecimal)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 30 for TFmini, 10 for TFminiPlus
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **1000** for indoor use OR **600** for outdoors. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.3 for TFmini, 0.1 for TFminiPlus
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **10** for indoor use OR **6** for outdoors. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

Testing the sensor
==================
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-bluerobotics-ping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ If the SERIAL2 port on the autopilot is being used then the following parameters
- :ref:`SERIAL2_PROTOCOL <SERIAL2_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL2_BAUD <SERIAL2_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 23 (BlueRoboticsPing)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 30
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 2600. This is the distance in centimeters that the rangefinder can reliably read.
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.3
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 26. This is the distance in meters that the rangefinder can reliably read.
- :ref:`RNGFND1_ORIENT <RNGFND1_ORIENT>` = 25 (down) if mounted on a boat

PingViewer to test and upgrade the sensor
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-echologger-ect400.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ If the SERIAL2 is used then the following parameters should be set:
Then the following range finder related parameters should be set:

- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 17 (NMEA)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 13
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 10000 (i.e. 100m). *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.13
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 100 (i.e. 100m). *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_ORIENT <RNGFND1_ORIENT>` = 25 (i.e. down) if mounted on a boat

Configuring the sensor
Expand Down
2 changes: 1 addition & 1 deletion common/source/docs/common-hereflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Connection to Autopilot
To use the onboard lidar (not recommended):

- Set :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 24 (DroneCAN)
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 300 to set range finder's maximum range to 3m
- Set :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 3 to set range finder's maximum range to 3m

Additional Notes
-----------------
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-hondex-sonar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ If the SERIAL2 is used then the following parameters should be set:
The following range finder related parameters should also be set:

- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 17 (NMEA)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 13
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 10000 (i.e. 100m). *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.13
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 100 (i.e. 100m). *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_ORIENT <RNGFND1_ORIENT>` = 25 (i.e. down) if mounted on a boat

Testing the sensor
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-jsn-sr04t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Connection to the autopilot

To setup as the first rangefinder. Reboot after setting parameters:

- :ref:`RNGFND1_MAX<RNGFND1_MAX>` = "450" (i.e. 4.5m max range for v2.0 ver)
- :ref:`RNGFND1_MIN<RNGFND1_MIN>` = "25" (i.e. 25cm min range for v2.0 ver)
- :ref:`RNGFND1_MAX<RNGFND1_MAX>` = "4.5" (i.e. 4.5m max range for v2.0 ver)
- :ref:`RNGFND1_MIN<RNGFND1_MIN>` = "0.25" (i.e. 0.25m min range for v2.0 ver)
- :ref:`RNGFND1_STOP_PIN<RNGFND1_STOP_PIN>` = Enter GPIO number for pin attached to JSN-SR04T "Trigger" pin. See :ref:`common-gpios`.
- :ref:`RNGFND1_PIN<RNGFND1_PIN>` = Enter GPIO number for pin attached to JSN-SR04T "Echo" pin.
- :ref:`RNGFND1_TYPE<RNGFND1_TYPE>` = “30" (HC-SR04 sonar)
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-kogger-sonar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ The sensor can be connected to any available serial/uart port on the autopilot.
Then the following range finder related parameters should be set:

- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 17 (NMEA)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 30
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 5000 (i.e. 50m). *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.3
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 50 (i.e. 50m). *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_ORIENT <RNGFND1_ORIENT>` = 25 (i.e. down) if mounted on a boat


Expand Down
6 changes: 3 additions & 3 deletions common/source/docs/common-leddar-one-lidar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ following parameters for the first rangefinder (this is done on the Mission Plan
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115200
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 12 (LeddarOne)
- :ref:`RNGFND1_SCALING <RNGFND1_SCALING>` = 1
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 5
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **4000** (40m) *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.05
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **40** (40m) *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

If you instead were using the Telem2 port on the Pixhawk then you would set :ref:`SERIAL2_PROTOCOL <SERIAL2_PROTOCOL>` = 9, and :ref:`SERIAL2_BAUD <SERIAL2_BAUD>` = 115200

Expand Down
6 changes: 3 additions & 3 deletions common/source/docs/common-leddartech-leddarvu8-lidar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ The following parameters should be set
- :ref:`SERIAL2_PROTOCOL <SERIAL2_PROTOCOL>` = 9 (Lidar)
- :ref:`SERIAL2_BAUD <SERIAL2_BAUD>` = 115 (115200 baud)
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 29 (LeddarVu8-Serial)
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 15
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 16000. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.15
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = 160. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

If you instead were using the Serial4 port on the autopilot then you would set :ref:`SERIAL4_PROTOCOL <SERIAL2_PROTOCOL>` = 9, and :ref:`SERIAL4_BAUD <SERIAL2_BAUD>` to 115

Expand Down
12 changes: 6 additions & 6 deletions common/source/docs/common-lightware-lw20-lidar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ following parameters if its the first rangefinder in the system (this can be don
- :ref:`SERIAL4_BAUD <SERIAL4_BAUD>` = 115 (115200 baud) for newer sensors, 19 (19200 baud) for sensors manufactured before mid 2018
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 8 (LightWareSerial)
- :ref:`RNGFND1_SCALING <RNGFND1_SCALING>` = 1
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 5
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **9500**. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.05
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **95**. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

If you instead were using the Telem2 port on the Pixhawk then you would set :ref:`SERIAL2_PROTOCOL <SERIAL2_PROTOCOL>` = 9, and :ref:`SERIAL2_BAUD <SERIAL2_BAUD>` to 115 (115200 baud) or 19 (19200 baud)

Expand All @@ -59,9 +59,9 @@ You then need to configure the rangefinder parameters as shown below
- :ref:`RNGFND1_TYPE <RNGFND1_TYPE>` = 7 (LightWareI2C)
- :ref:`RNGFND1_ADDR <RNGFND1_ADDR>` = 102 (I2C Address of lidar in decimal). *Note that this setting is in decimal. The default address is 0x66 hexadecimal which is 102 in decimal.*
- :ref:`RNGFND1_SCALING <RNGFND1_SCALING>` = 1
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 5
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **9500**. *This is the distance in centimeters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 10 *or more accurately the distance in centimetres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*
- :ref:`RNGFND1_MIN <RNGFND1_MIN>` = 0.05
- :ref:`RNGFND1_MAX <RNGFND1_MAX>` = **95**. *This is the distance in meters that the rangefinder can reliably read.*
- :ref:`RNGFND1_GNDCLR <RNGFND1_GNDCLR>` = 0.1 *or more accurately the distance in metres from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.*

Testing the sensor
==================
Expand Down
Loading
Loading