Initial commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
# LR-1F / LR-1BS
|
||||
# 2D LiDAR Sensor
|
||||
# Communication Data Protocol
|
||||
**v2.1**
|
||||
|
||||
## 1. Type of Connector
|
||||
|
||||
**1.1** Connector: RJ-45 standard internet connector
|
||||
|
||||
**1.2** Basic protocol: UDP/IP standard internet protocol
|
||||
Data are in **little-endian** format, lower byte first
|
||||
|
||||
---
|
||||
|
||||
## 2. Data Packet Format
|
||||
|
||||
### 2.1. General
|
||||
|
||||
The total length of a data frame is **1240 bytes**, including:
|
||||
|
||||
- Frame header: **40 bytes**
|
||||
- Data block: **150 × 8 = 1,200 bytes**
|
||||
Header Block0 Block1 ... Block149
|
||||
+40 bytes +8 bytes +8 bytes +8 bytes
|
||||
└───────────────────────────────┘
|
||||
1200 bytes
|
||||
┌───────────────────────────────┐
|
||||
1240 bytes total
|
||||
|
||||
### 2.2. Header
|
||||
|
||||
**Definition of Frame Header**
|
||||
|
||||
| Offset | Length | Description |
|
||||
|--------|--------|-------------------------------------------------------------------------------------------------------|
|
||||
| 0 | 4 | ID, it is always `0xFEF0010F` |
|
||||
| 4 | 2 | Protocol version code, the current code is `0x0200` |
|
||||
| 6 | 1 | Distance scale<br>distance = readout data × distance scale |
|
||||
| 7 | 3 | Brand name code, use capital letters and digits. Using "0" for missing code |
|
||||
| 10 | 12 | Commercial type code: ended with `\0` |
|
||||
| 22 | 2 | Internal type code |
|
||||
| 24 | 2 | Hardware version |
|
||||
| 26 | 2 | Software version |
|
||||
| 28 | 4 | **Time stamp**<br>• When NTP is **OFF**: Unit ms. represents the number of milliseconds after power-on<br>• When NTP is **ON**: Represents the fractional part of a timestamp in NTP64 format. |
|
||||
| 32 | 2 | **Bit[14:0]**: Rotation rate<br>**Bit[15]**: Rotation direction (0: clockwise, 1: counter clockwise) |
|
||||
| 34 | 1 | Safe zone status, same as the hardware INPUT/OUTPUT<br>**BIT[3:0]**: Same as OUTPUT[3:0]<br>**BIT[7:4]**: Same as INPUT[3:0] |
|
||||
| 35 | 1 | **Error status**. A corresponding bit of "1" indicates an error<br>• BIT0: Motor fault<br>• BIT1: Abnormal voltage<br>• BIT2: Temperature fault |
|
||||
| 36 | 4 | • When NTP is **OFF**: Reserved<br>• When NTP is **ON**: Represents the integer part of a timestamp in NTP64 format. |
|
||||
|
||||
### 2.3. Data block definition
|
||||
|
||||
Each data block is **8 bytes**
|
||||
|
||||
| Offset | Length | Description |
|
||||
|--------|--------|-------------------------------------------------------------------------------------------------------|
|
||||
| 0 | 2 | **Angle**, unsigned integer. Range: 0~35999<br>Unit: 0.01°/LSB, range 0° ~ 359.99°<br>**Note**: Data block is invalid if this value is greater or equal than `0xFF00` |
|
||||
| 2 | 2 | **Distance readout data**, unsigned integer<br>Actual distance = readout data × distance scale |
|
||||
| 4 | 2 | **Signal strength**, indicates the strength of the received signal, range 0~65535 |
|
||||
| 6 | 2 | Reserved (TBD) |
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user