User Manual

7 / 34
Copyright (c) 2009-2013 RoboPeak Team
Copyright (c) 2013-2016 Shanghai Slamtec Co., Ltd.
Figure 2-4 RPLIDAR Request Packets’ Format
A fixed 0xA5 byte is used for each request packet, RPLIDAR uses this byte as the
identification of a new request packet. An 8bit (1byte) command field must follow
the start flag byte.
If the current request carries extra payload data, an 8bit (1byte) payload size field is
required to be transmitted after sending the command field and then follows the
payload data. After the payload data has been transmitted, an 8bit (1byte) checksum
field calculated from the previous sent data should be transmitted.
The checksum value can be calculated using the following equation:
 





Note: Timing Consideration
All bytes within a request packet must be transmitted to RPLIDAR within 5 seconds.
Otherwise, the communication stack of RPLIDAR will discard the current request
packet.
Response Packets’ Format
All the response packets are divided into two classes: response descriptors and
data responses. If the current request received by RPLIDAR requires a response,
RPLDAR will always send a response descriptor packet first and then send one or
more data response packets based on the type of requests. Only one response
descriptor packet will be sent out during a request/response session. The response
descriptors carry the information of the incoming data responses. All the response
descriptors share a same format.
Start Flag
Command
Payload Size
Payload Data
Checksum
1byte
(0xA5)
1byte
1byte
0-255 bytes
1byte
Optional Section
Transmission Order
≤5 seconds