# Lidar \[Melodic]

## Running the Lidar (YDLIDAR)

![Image courtesy of Omorobot.](https://3827101858-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McPC4jDSGGTd1f6bAav%2F-MdX4_0edszXTg06ugJL%2F-MdX7Z1_eB0e3qxnuwI0%2Fyd.png?alt=media\&token=0e5ac0d6-a36a-403c-92b5-982a6d26c7e7)

#### Download package

In the command line in the \~/catkin\_ws/src directory, run the below code to clone the R1mini package to use the lidar.

```
$ git clone https://github.com/PinkWink/ydlidar
```

Next, return to \~/catkin\_ws/ and run the below two lines.

```
$ catkin build
```

```
$ source ~/.bashrc
```

#### Running the Lidar (YDLIDAR)

Run the below command to run the lidar separately. Note, when the omo\_r1min&#x69;*\_*&#x72;obot.launch command is run, the lidar will be activated too and these following steps are not necessary.

{% hint style="info" %}
Only run this command if omo\_r1mini\_robot.launch is not running. This command will also activate the lidar.
{% endhint %}

```
$ roslaunch omo_r1mini_bringup omo_r1mini_lidar.launch
```

![](https://3827101858-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-McPC4jDSGGTd1f6bAav%2F-MeaNjXHw4H-pawQaykZ%2F-MeaO8chHR5GLbTtQwVl%2FScreen%20Shot%202021-07-15%20at%204.00.32%20AM.png?alt=media\&token=2f496c1f-136f-48e6-bb6e-5b1411fb53af)

The terminal output should look something like the image above. An error may occur like above, give the robot a few seconds, and you should be able to hear the lidar turn on, see the green text above, and value outputs in grey.

## Video Demonstration

View the video demonstration for this page with this link: <https://www.youtube.com/watch?v=mIlVa8JqOrg>


---

# Agent Instructions: 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://kairosiann.gitbook.io/r1mini/running-r1-mini/slam-melodic.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.
