> ## 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-ros

> 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_ros`

The following figure shows the pipeline flow for the `rplidar-ros2` sample. The sample gets the driver data from the RPLIDAR SDK, and then publishes the `/scan` topic.

<Frame caption="The rplidar_ros pipeline.">
  <img src="https://mintcdn.com/qualcomm-prod/eHVY1H1lLEVhgq58/SDKs/QIR-SDK-Ubuntu/images/image4.png?fit=max&auto=format&n=eHVY1H1lLEVhgq58&q=85&s=06c51ba3c36c57e013497214e8347ec7" style={{width: "50%"}} alt="RPLIDAR hardware feeding the Rplidar SDK, which feeds the Rplidar ROS node that publishes the /scan topic." width="1448" height="1608" data-path="SDKs/QIR-SDK-Ubuntu/images/image4.png" />
</Frame>

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

The following table lists the ROS topics used in the `rplidar-ros2` pipeline, with the message type and the publisher of each topic.

| ROS topic | Type                            | Published by        |
| --------- | ------------------------------- | ------------------- |
| `/scan`   | `<sensor_msgs::msg::LaserScan>` | `rplidar-ros2` node |

## Prerequisites

* You have set up the device, installed ROS2 Jazzy and the Qualcomm Intelligent Robotics (QIR) SDK on the device according to [Install the QIR SDK](./install-the-qir-sdk).

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

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

<Steps>
  <Step title="Launch lidar ROS node">
    ```bash Launch the lidar ROS node theme={null}
    source /opt/ros/jazzy/setup.bash
    ros2 launch rplidar_ros rplidar_a3_launch.py
    ```
  </Step>

  <Step title="Get the topic of this node">
    ```bash List the ROS topics theme={null}
    source /opt/ros/jazzy/setup.bash
    ros2 topic list
    ```
  </Step>

  <Step title="Echo scan in another terminal">
    ```bash Echo the scan topic theme={null}
    source /opt/ros/jazzy/setup.bash
    ros2 topic echo /scan
    ```

    <Frame>
      <img src="https://mintcdn.com/qualcomm-prod/eHVY1H1lLEVhgq58/SDKs/QIR-SDK-Ubuntu/images/image5.png?fit=max&auto=format&n=eHVY1H1lLEVhgq58&q=85&s=6b6ad70ac461a14d7cd2f003e382c4c6" alt="Terminal log from the RPLIDAR launch file reporting the RPLIDAR S/N, firmware and hardware revision, health status OK, and a 10 Hz scan frequency." width="1144" height="254" data-path="SDKs/QIR-SDK-Ubuntu/images/image5.png" />
    </Frame>
  </Step>
</Steps>
