> For the complete documentation index, see [llms.txt](https://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/flight-controller/aazmuth/sensor-integration-and-peripheral-hardware-connection/lidar-sensor.md).

# Lidar Sensor

#### Mission Planner configuration description of Benewake TF-Luna for the purpose of altitude hold

{% hint style="danger" %} <mark style="color:red;">**Attention:**</mark> <mark style="color:$primary;">**T**</mark><mark style="color:$primary;">**he installation height should be bigger than non-detection zone.**</mark>
{% endhint %}

* Connect the Aazmuth to Mission Planner.
* Select \[Full Parameter List] in the left from the below bar- \[CONFIG/TUNING]

<figure><img src="/files/N3Px1J3k7BmXKwyPognI" alt=""><figcaption></figcaption></figure>

* &#x20;Find and modify the following parameters:
* **SERIAL2\_PROTOCOL** = 9 \[Rangefinder option]
* **SERIAL2\_BAUD** = 115 \[Choose the current LiDAR baud rate, if haven’t been changed, the default baud rate 115200 should be selected, that is 115]

<figure><img src="/files/Uu0kZAI5f0Ek8aF3nkFK" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note: If SerialPort2 is engaged with other function you can use SerialPort4 make sure whenever you change the serial port you also write all the necessary BITMASK Carefully.**
{% endhint %}

* **RNGFND1\_TYPE** = 20 \[Same option with TFmini]

{% hint style="info" %}
**Note: Once you select the** <mark style="color:orange;">RNGFND1\_TYPE = 20</mark> <mark style="color:$primary;">**then click on write params after which the full configuration list will appear for setting up the LIDAR.**</mark>
{% endhint %}

* **RNGFND\_MIN\_CM** = 20/0.2\[It could be changed according to real demands and should be bigger LiDAR than non-detection zone, **unit is cm/unit is m**]&#x20;
* **RNGFND1\_MAX\_CM** = 200/2 \[It could be changed according to real demands but should be smaller than effective measure range of LiDAR, **unit is cm/unit is m**]
* **RNGFND1\_GNDCLEAR** = 15/0.15 \[**expressed in cm/expressed in m**, depending upon mounting height of the module and  &#x20;should be bigger LiDAR than non-detection zone]
* **RNGFND1\_ORIENT** =25 \[face down]

<figure><img src="/files/HfQkIWhDQp7y8hskWQJJ" alt=""><figcaption></figcaption></figure>

Upon setting of these parameters, click \[Write Params] on the right of the software to finish.

{% hint style="warning" %}
If the error message <mark style="color:red;">**“Bad Lidar Health”**</mark> appears, please check if the connection is correct and the power\
supply is normal, then restart Aazmuth.
{% endhint %}

**How to see the altitude value from LiDAR sensor:**&#x20;

**Go to Data tab under that tab below click the Quick Panel and then double click to any one of the values present in the Quick Tab and then select option Sonnarrange**

<figure><img src="/files/9gBrPLdeAc7sbQAkUqjm" alt=""><figcaption></figcaption></figure>

**Once Selected The altitude distance from the LiDAR will be displayed in Sonar Range(meters)**

#### Mission Planner configuration description of  Benewake TF-Luna for the purpose of Obstacle Avoidance

{% hint style="danger" %} <mark style="color:$danger;">**Warning: To be used in Loiter mode Only**</mark>
{% endhint %}

* Connect the Aazmuth board to MissionPlanner.&#x20;

{% hint style="warning" %} <mark style="color:red;">**Attention:**</mark> <mark style="color:$primary;">**Distance between UAV margin and LiDAR should bebigger than LiDAR non-detection zone.**</mark>
{% endhint %}

* Select \[Full Parameter List] in the left from the below bar-  \[CONFIG/TUNING]
* Find and modify the following parameters:

<figure><img src="/files/N3Px1J3k7BmXKwyPognI" alt=""><figcaption></figcaption></figure>

* **SERIAL2\_PROTOCOL** = 9 \[Rangefinder option]
* **SERIAL2\_BAUD** = 115 \[Choose the current LiDAR baud rate, if haven’t been changed, the default baud  &#x20;rate 115200 should be selected, that is 115]

<figure><img src="/files/Uu0kZAI5f0Ek8aF3nkFK" alt=""><figcaption></figcaption></figure>

* **RNGFND1\_TYPE** = 20 \[Same option with TFmini]

{% hint style="info" %}
**Note: Once you select the** <mark style="color:orange;">RNGFND1\_TYPE = 20</mark> <mark style="color:$primary;">**then click on write params after which the full configuration list will appear for setting up the LIDAR.**</mark>
{% endhint %}

* **RNGFND\_MIN\_CM** = 20/0.2\[It could be changed according to real demands and should be bigger LiDAR than non-detection zone, **unit is cm/unit is m**]&#x20;
* **RNGFND1\_MAX\_CM** = 200/2 \[It could be changed according to real demands but should be smaller than effective measure range of LiDAR, **unit is cm/unit is m**]
* **RNGFND1\_GNDCLEAR** = 15/0.15 \[**expressed in cm/expressed in m**, depending upon mounting height of the module and  &#x20;should be bigger LiDAR than non-detection zone]
* **RNGFND1\_ORIENT**=0 \[forward]

<figure><img src="/files/3roVuPbANoNlcyxcDp47" alt=""><figcaption></figcaption></figure>

* Then select Avoid from Full parameter list and Set AVOID\_MARGIN=3 \[Unit: m, set obstacle avoidance distance as required]

<figure><img src="/files/kMHVTOzLhGmEduVfG1bU" alt=""><figcaption></figcaption></figure>

* PRX1\_TYPE=4 \[Rangefinder should be selected for proximity sensor in obstacle avoidance mode]

<figure><img src="/files/FKRCQn2jtebeHCBOLETH" alt=""><figcaption></figcaption></figure>

Upon setting of these parameters, click \[Write Params] on the right of the software to finish.

{% hint style="warning" %}
If the error message <mark style="color:red;">**“Bad Lidar Health”**</mark> appears, please check if the connection is correct and the power\
supply is normal, then restart Aazmuth.
{% endhint %}

How to see the target distance from the LiDAR:(distance from LiDAR in obstacle avoidance can’t be\
displayed in sonarrange option) press CTRL+F button in keyboard, the following window will pop out:

<figure><img src="/files/39V2zNE5U6rGEYTun0Ga" alt=""><figcaption></figcaption></figure>

Click button Proximity,the following window will appear

<figure><img src="/files/5FNd55CIjcAOhubodVpi" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spaceandtech-engineerings.gitbook.io/space-and-tech-engineerings-docs/flight-controller/aazmuth/sensor-integration-and-peripheral-hardware-connection/lidar-sensor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
