> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable basic RPLIDAR handling with rplidar-ros2

The `rplidar-ros2` sample application provides basic device handling for the 2D laser scanner RPLIDAR A1/A2/A3/S1/S2/S3.

## **Pipeline flow for** `rplidar-ros2`

The figure shows the pipeline of the rplidar-ros2 sample. The sample application gets the driver data from the `rplidar` SDK, and then publishes the `/scan` topic.

<img
  src="https://mintcdn.com/qualcomm-prod/IP0o0G5fE3MFmCJ8/SDKs/QIR-SDK-2.0/media/80-65220-2-qirp-sdk-qsg/rplidar-ros2-pipeline.svg?fit=max&auto=format&n=IP0o0G5fE3MFmCJ8&q=85&s=a3e54de47ea8eb89965bd2a5c9fd754c"
  style={{
width: "60%",
display: "block",
margin: "0 auto" }}
  width="362"
  height="402"
  data-path="SDKs/QIR-SDK-2.0/media/80-65220-2-qirp-sdk-qsg/rplidar-ros2-pipeline.svg"
/>

<p style={{ textAlign: 'center', fontWeight: 'bold' }}>
  Figure : rplidar-ros2 pipeline
</p>

## ROS topics used in the `rplidar-ros2 ` pipeline

<table>
  <thead>
    <tr>
      <th style={{ width: '15%' }}>ROS topic</th>
      <th style={{ width: '25%' }}>Message type</th>
      <th style={{ width: '25%' }}>Published/Subscribed by</th>
      <th style={{ width: '40%' }}>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`/scan`</td>
      <td>`sensor_msgs::msg::LaserScan`</td>
      <td>Published by `rplidar-ros2`</td>
      <td>The `/scan` topic publishes the laser scan data from the RPLIDAR.</td>
    </tr>
  </tbody>
</table>

## Prerequisites

* You have **Set up the device** according to [Set up the environment for running sample applications](./set-up-env-for-sample-app).

* Connect the power supply and USB port of RPLIDAR A3M1.

## Run out-of-the-box `rplidar-ros2`

To set up the QIR SDK and ROS2 environment on the device and run `rplidar-ros2`, start a terminal and run the following commands:

```powershell theme={null}
ssh root@[ip-addr]
(ssh) source /usr/share/qirp-setup.sh
(ssh) ros2 launch rplidar_ros rplidar_a3_launch.py
```
