Slamtec RPLIDAR A1 Manual

Slamtec RPLIDAR A1 Manual

Laser range scanner interface protocol and application notes
Hide thumbs Also See for RPLIDAR A1:

Advertisement

RPLIDAR
Low Cost 360 Degree Laser Range Scanner
Interface Protocol and Application Notes
Applied to RPLIDAR A1 & A2
Shanghai Slamtec.Co.,Ltd

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RPLIDAR A1 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Slamtec RPLIDAR A1

  • Page 1: Contents

    RPLIDAR Low Cost 360 Degree Laser Range Scanner Interface Protocol and Application Notes Applied to RPLIDAR A1 & A2 Shanghai Slamtec.Co.,Ltd...
  • Page 2: Table Of Contents

    Contents CONTENTS ..............................1 OVERVIEW ..............................3 ROGRAM ..........................3 PROTOCOL BASICS ............................ 4 ASIC OMMUNICATION ........................4 ’ F EQUEST ACKETS ORMAT ........................... 6 ’ F ESPONSE ACKETS ORMAT ......................... 7 WORKING STATE AND MECHANISM ....................10 AJOR ORKING TATES AND RANSITION ONDITIONS...
  • Page 3: Overview

    SDK and Demo Program SLAMTEC provides open-sourced SDK and demo program for customers to integrate RPLIDAR into their systems quickly. The SDK implements all the communication stacks, driver logics and related data structures described in this...
  • Page 4: Protocol Basics

    Request/Response Modes Host System RPLIDAR Send a Request Packet Perform Waiting for Some Reply a Response Packet Response Operation Another Request Figure 2-1 RPLIDAR Request/Response Modes 4 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 5 The host system can interrupt RPLIDAR and let it leave the multiple responses mode by sending a STOP request or any request packet. After leaving the multiple 5 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 6: Request Packets ' Format

    Command Payload Size Payload Data Checksum 1byte 1byte 1byte 0-255 bytes 1byte (0xA5) Transmission Order Optional Section ≤5 seconds Figure 2-4 RPLIDAR Request Packets’ Format 6 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 7: Response Packets' Format

    The response descriptors carry the information of the incoming data responses. All the response descriptors share a same format. 7 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 8 Start Flag1 Start Flag2 Data Response Length Send Mode Data Type 30bits 2bits 1byte (0xA5) 1byte (0x5A) 1byte Transmission Order Figure 2-7 RPLIDAR Response Descriptors’ Format 8 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 9 Different from response descriptors, there is no common format used among response data packets. Each type of response data has its own data format and packet length based on its type. 9 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 10: Working State And Mechanism

    Protection Stop state. A host system can still communicate with an RPLIDAR in the Protection Stop state to query its working 10 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 11: Scanning Status

    Scan Request Rotation unstable Waiting rotation stable Rotation unstable Rotation stable Output data Incoming Requests Failure detected Rotation stable Figure 3-2 RPLIDAR’s Working Mode during Scanning 11 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 12: Request And Response Data

    Idle or Protection Stop state. Since RPLIDAR won’t send response packet for this request, host systems should wait for at least 1 millisecond (ms) before sending another request. 12 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 13: Rplidar Core Reset(Reset) Request

    Note: RPLIDAR A2 and other device models support 4khz sampling rate will lower the sampling rate when processing this request. Please use EXPRESS_SCAN for the best performance. 13 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 14 Format of the Data Response Packets: �� ҧ Quality Byte Offset angle_q6[6:0] angle_q6[14:7] distance_q2[7:0] distance_q2[15:8] Figure 4-4 Format of a RPLIDAR Measurement Result Data Response Packet 14 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 15 Figure 4-5 Field Definition of a RPLIDAR Measurement Result Data Response Packet The geometric definition of the included angle and distance value is shown as below: θ [0,360) Figure 4-6 Angle and Distance Value Geometric Definition for RPLIDAR A1 series 15 / 32 Copyright (c) 2009-2013 RoboPeak Team...
  • Page 16 Data transmission order: a new request … … … scan a new scan Figure 4-8 The Communication Status after Host System Sending a SCAN Request 16 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 17: Express Scan(Express_Scan) Request And Response

    RPLIDAR work at 4khz sampling rate and output measurement sample data accordingly; for the device models with the 2khz sample rate (such as RPLIDAR A1 series), this request will implement the same sampling rate as the scan(SCAN) request.
  • Page 18 0. Reserved Reserved field, set to 0. Reserved for future use, set to 0. Figure 4-10 Field Definition of RPLIDAR Express Scan Data Request Packet 18 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 19 Therefore, an express scan data response packet carries 32 measurement sampling data points. 19 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 20 A data response packet contains 16 group of cabin data. Figure 4-12 Field Definition of RPLIDAR Express Scan Data Response Packet 20 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 21 A new request … 82 05 … … … 360o scan A new scan Figure 4-14 The Communication Status Sending Out the Express Scan Request 21 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 22 �� . It carries the distance value ���������������� and the included angle compensation �� �� ���� corresponded with the current measurement sampling point. �� 22 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 23: Force Scan(Force_Scan) Request And Response

    RPLIDAR uses the similar processing logic for this request and the same response format as the one of the scan(SCAN) request, but uses the different response format. 23 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 24: Get Device Info (Get_Info) Request And Response

    Format of the Device Info Response Packets: Byte Offset model firmware_minor firmware_major hardware serialnumber[0] … serialnumber[15] Figure 4-16 Format of a Device Info Data Response Packet 24 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 25 Figure 4-17 Field Definition of Device Info Data Response Packet Data transmission order: A new request … Figure 4-18 The Timing Sequence of a GET_INFO Request 25 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 26: Get Device Health Status (Get_Health) Request And Response

    When a host system detects RPLIDAR has entered the Protection Stop state, it can set a RESET request to let RPLIDAR core system reboot to escape the Protection 26 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 27: Get Sample Rate(Get_Samplerate) Request

    RPLIDAR takes a single laser ranging uses the EXPRESS_SCAN request. Unit: microsecond(uS) Figure 4-22 Field Definition of Sample Rate Data Response Packet 27 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 28: Application Notes

    Process sample data Check motor status Send a STOP request End of operation? Wait for 1ms Figure 5-1 Recommendation for Starting RPLIDAR Scanning and Data Retrieving 28 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 29: Calculate Rplidar Scanning Speed

    PWM Motor Driver Motor Data Interface Rotation Speed Core System Detector Host System RPLIDAR A1 Figure 5-2 Block Diagram of RPLIDAR A1 Speed Detection and Control System RPLIDAR A2Mx Series PWM Motor Driver Motor Data Interface Rotation Speed Core System Detector...
  • Page 30 So the actual scan speed can be calculated using the following equation: RPM = ∗ 60 ∆�� The calculated value can be used as a feedback to control the motor speed. 30 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 31: Revision History

    Fixed a description bug in the EXPRESS_SCAN protocol section 2017-05-15 Release 1.0 Version 2018-03-08 Added notes for higher class scan modes in Express Mode protocol 31 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.
  • Page 32: Appendix

    IAGRAM OF PEED ETECTION AND ONTROL YSTEM ......29 5-3 B RPLIDAR A2 S IGURE LOCK IAGRAM OF PEED ETECTION AND ONTROL YSTEM ......29 32 / 32 Copyright (c) 2009-2013 RoboPeak Team Copyright (c) 2013-2017 Shanghai Slamtec Co., Ltd.

This manual is also suitable for:

Rplidar a2

Table of Contents