diff --git a/How-to-use-lvx-file-under-ros.md b/How-to-use-lvx-file-under-ros.md
index 84590c5..635a8e6 100644
--- a/How-to-use-lvx-file-under-ros.md
+++ b/How-to-use-lvx-file-under-ros.md
@@ -1,10 +1,16 @@
-# How to use lvx file in ros
+**How to use lvx file in ros**([在ROS驱动程序下使用lvx文件的方法](./zh/如何在ROS驱动程序下使用lvx文件.md))
+
+
+
+[TOC]
+
+
lvx is a point cloud storage format customized by livox; if you want to use lvx file in ros, you need to convert it to rosbag file.
-## 1. Save lvx data file
+# 1. Save lvx data file
-### 1.1 Use livox viewer to store lvx files
+## 1.1 Use livox viewer to store lvx files
The operation steps are as follows :
@@ -15,13 +21,13 @@ The operation steps are as follows :

-### 1.2 Use Livox-SDK to store lvx files
+## 1.2 Use Livox-SDK to store lvx files
-#### 1.2.1 Git clone Livox-SDK
+### 1.2.1 Git clone Livox-SDK
`git clone https://github.com/Livox-SDK/Livox-SDK.git`
-#### 1.2.2 Connect Lidar device and save the lvx file
+### 1.2.2 Connect Lidar device and save the lvx file
- Open the terminal window under this file path: ../Livox_SDK/build/sample/lidar_lvx_file
- Execute the follow command: ./lidar_lvx_sample
@@ -34,23 +40,23 @@ The operation steps are as follows :

-## 2. Convert Lvx data file(v1.0/v1.1)to rosbag file(Only supports Ubuntu System)
+# 2. Convert Lvx data file(v1.0/v1.1)to rosbag file(Only supports Ubuntu System)
-### 2.1 Git clone livox_ros_driver
+## 2.1 Git clone livox_ros_driver
`git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src`
-### 2.2 Set publish frequency
+## 2.2 Set publish frequency
If you need to convert rosbag data with the frequency to 10Hz, please set the ‘publish_freq’ parameter to 10.0 in "../ws_livox/src/livox_ros_driver/launch/lvx_to_rosbag.launch file". Similarly, you can set other frequencies.

-### 2.3 Open a terminal window under this path
+## 2.3 Open a terminal window under this path
`../ws_livox`
-### 2.4 Convert lvx point cloud data file (v1.0/v1.1) to rosbag file
+## 2.4 Convert lvx point cloud data file (v1.0/v1.1) to rosbag file
livox_ros_driver supports the conversion of lvx pointcloud data files to rosbag files. Use the command as follows :
@@ -62,6 +68,6 @@ After replacing "/home/livox/test.lvx" in the above command with the local lvx d

-### 2.5 Playing the Rosbag data
+## 2.5 Playing the Rosbag data

diff --git a/Livox-SDK-Communication-Protocol.md b/Livox-SDK-Communication-Protocol.md
index 3a73c6a..ae41eab 100644
--- a/Livox-SDK-Communication-Protocol.md
+++ b/Livox-SDK-Communication-Protocol.md
@@ -1,18 +1,19 @@
-**Livox SDK Communication Protocol**
+**Livox SDK Communication Protocol**([Livox SDK 通信协议中文文档](./览沃SDK通信协议.md))
-| **Document Release History** | | |
-| ---------------------------- | ----------- | ------------------------------------------------------------ |
-| **Date** | **Release** | **Change Description** |
-| 2020/06/10 | v1.2.0 | 1. add write/read configuration parameters commands |
+| **Document Release History** | | |
+| ---------------------------- | ----------- | ---------------------------------------- |
+| **Date** | **Release** | **Change Description** |
+| 2020/10/26 | V1.3.0 | 1.Add Mid70/Avia LiDAR support |
+| 2020/06/10 | v1.2.0 | 1. add write/read configuration parameters commands |
| 2019/10/22 | v1.1.1 | 1. Update status code, add time synchronization status (Horizon: v06.05.00.00+, Mid-40/Mid-100: v03.07.00.00+)
2. Change IMU data push frequency |
-| 2019/9/25 | v1.1.0 | 1. Add Tele-15 / Horizon LiDAR's support |
+| 2019/9/25 | v1.1.0 | 1. Add Tele-15 / Horizon LiDAR's support |
| 2019/7/08 | v1.0.6 | 1. Fix crc32 bits error
2. Add system status code description |
-| 2019/5/17 | v1.0.5 | Fix partial description errors |
+| 2019/5/17 | v1.0.5 | Fix partial description errors |
| 2019/4/18 | v1.0.4 | 1. Update motor status code (v03.05.00.00+)
2. Add query Hub slot power status command (v08.05.00.00+) |
-| 2019/4/17 | v1.0.3 | Update Hub read LiDAR extrinsic parameters description |
-| 2019/3/25 | v1.0.2 | Update 3.2 Time Stamp description |
-| 2019/2/25 | v1.0.1 | Update 3.2 Time Stamp description |
-| 2019/1/16 | v1.0.0 | Initial release |
+| 2019/4/17 | v1.0.3 | Update Hub read LiDAR extrinsic parameters description |
+| 2019/3/25 | v1.0.2 | Update 3.2 Time Stamp description |
+| 2019/2/25 | v1.0.1 | Update 3.2 Time Stamp description |
+| 2019/1/16 | v1.0.0 | Initial release |
# 1 Summary
@@ -20,14 +21,14 @@
## 1.1 Data Class
There are two types of communication between the user and LiDAR unit(s), and the
-protocol formats of these two kinds of data are different. The specific functions
+protocol formats of these two kinds of data are different. The specific functions
and differences are as follows:
> - **Control Command Data**: Configuration and query of LiDAR parameters and status
-information;
-> - **Sample Data**: Sample data generated by LiDAR units including point cloud data and IMU data(Not supported by MID40/100);
-At present, both protocols are encapsulated in the data segment of the UDP
-package, and the data format in protocol is stored in little-endian form.
+> information;
+> - **Sample Data**: Sample data generated by LiDAR units including point cloud data and IMU data(Not supported by MID-40/70/100);
+> At present, both protocols are encapsulated in the data segment of the UDP
+> package, and the data format in protocol is stored in little-endian form.
## 1.2 Mode and State Description
@@ -47,16 +48,16 @@ unit(s) will be in the corresponding state:
The Protocol Frame is the smallest unit for control command. Format is as
follows:
-| Field | Index (byte) | Size (byte) | Description |
-|----------|--------------|-------------|---------------------------------------------|
-| sof | 0 | 1 | Starting Byte, Fixed to be 0xAA |
+| Field | Index (byte) | Size (byte) | Description |
+| -------- | ------------ | ----------- | ---------------------------------------- |
+| sof | 0 | 1 | Starting Byte, Fixed to be 0xAA |
| version | 1 | 1 | Protocol Version, 1 for The Current Version |
-| length | 2 | 2 | Length of The Frame, Max Value: 1400 |
+| length | 2 | 2 | Length of The Frame, Max Value: 1400 |
| cmd_type | 4 | 1 | Command Type:
0x00: CMD
0x01: ACK
0x02: MSG |
-| seq_num | 5 | 2 | Frame Sequence Number |
-| crc_16 | 7 | 2 | Frame Header Checksum |
-| data | 9 | n | Payload Data |
-| crc_32 | 9+n | 4 | Whole Frame Checksum |
+| seq_num | 5 | 2 | Frame Sequence Number |
+| crc_16 | 7 | 2 | Frame Header Checksum |
+| data | 9 | n | Payload Data |
+| crc_32 | 9+n | 4 | Whole Frame Checksum |
Command type description:
> - **CMD (request)**: Actively send data request - need to return a corresponding ACK;
@@ -68,7 +69,7 @@ Command type description:
Initial value of the CRC check:
| crc16 initial value | crc32 initial value |
-|---------------------|---------------------|
+| ------------------- | ------------------- |
| 0x4c49 | 0x564f580a |
## 2.2 Frame Data
@@ -78,7 +79,7 @@ Initial value of the CRC check:
Data segment format in Protocol Frame:
| Field | Index (byte) | Size (byte) |
-|----------|--------------|-------------|
+| -------- | ------------ | ----------- |
| cmd_set | 0 | 1 |
| cmd_id | 1 | 1 |
| cmd_data | 2 | Vary by cmd |
@@ -90,61 +91,61 @@ There are three kinds of CMD sets:
> - **LiDAR Command Set**: Only Livox LiDAR supports LiDAR Command Set.
> - **Hub Command Set**: Only Livox Hub supports Hub Command Set.
-| CMD Set | CMD ID | Function |
-| ------------------------ | ------ | --------------------------------------------------- |
-| 0x00 General Command Set | 0x00 | Broadcast Message |
-| | 0x01 | Handshake |
-| | 0x02 | Query Device Information |
-| | 0x03 | Heartbeat |
-| | 0x04 | Start/Stop Sampling |
-| | 0x05 | Change Coordinate System |
-| | 0x06 | Disconnect |
-| | 0x07 | Push Abnormal Status Information |
-| | 0x08 | Configure Static/Dynamic IP |
-| | 0x09 | Get Device IP Information |
-| | 0x0A | Reboot device |
-| | 0x0B | write configuration parameters |
-| | 0x0C | read configuration parameters |
-| 0x01 LiDAR Command Set | 0x00 | Set Mode |
-| | 0x01 | Write LiDAR Extrinsic Parameters |
-| | 0x02 | Read LiDAR Extrinsic Parameters |
-| | 0x03 | Turn On/Off Rain/Fog Suppression |
-| | 0x04 | Set Turn On/Off Fan |
-| | 0x05 | Get Turn On/Off Fan State |
-| | 0x06 | Set LiDAR Return Mode |
-| | 0x07 | Get LiDAR Return Mode |
-| | 0x08 | Set IMU Data Push Frequency |
-| | 0x09 | Get IMU Data Push Frequency |
-| | 0x0A | Update UTC synchronization time |
-| 0x02 Hub Command Set | 0x00 | Query Connected LiDAR Device |
-| | 0x01 | Set LiDAR Mode |
-| | 0x02 | Turn On/Off Designated Slot Power |
-| | 0x03 | Write LiDAR Extrinsic Parameters |
-| | 0x04 | Read LiDAR Extrinsic Parameters |
-| | 0x05 | Query LiDAR Device Status |
+| CMD Set | CMD ID | Function |
+| ------------------------ | ------ | ---------------------------------------- |
+| 0x00 General Command Set | 0x00 | Broadcast Message |
+| | 0x01 | Handshake |
+| | 0x02 | Query Device Information |
+| | 0x03 | Heartbeat |
+| | 0x04 | Start/Stop Sampling |
+| | 0x05 | Change Coordinate System |
+| | 0x06 | Disconnect |
+| | 0x07 | Push Abnormal Status Information |
+| | 0x08 | Configure Static/Dynamic IP |
+| | 0x09 | Get Device IP Information |
+| | 0x0A | Reboot device |
+| | 0x0B | write configuration parameters |
+| | 0x0C | read configuration parameters |
+| 0x01 LiDAR Command Set | 0x00 | Set Mode |
+| | 0x01 | Write LiDAR Extrinsic Parameters |
+| | 0x02 | Read LiDAR Extrinsic Parameters |
+| | 0x03 | Turn On/Off Rain/Fog Suppression |
+| | 0x04 | Set Turn On/Off Fan |
+| | 0x05 | Get Turn On/Off Fan State |
+| | 0x06 | Set LiDAR Return Mode |
+| | 0x07 | Get LiDAR Return Mode |
+| | 0x08 | Set IMU Data Push Frequency |
+| | 0x09 | Get IMU Data Push Frequency |
+| | 0x0A | Update UTC synchronization time |
+| 0x02 Hub Command Set | 0x00 | Query Connected LiDAR Device |
+| | 0x01 | Set LiDAR Mode |
+| | 0x02 | Turn On/Off Designated Slot Power |
+| | 0x03 | Write LiDAR Extrinsic Parameters |
+| | 0x04 | Read LiDAR Extrinsic Parameters |
+| | 0x05 | Query LiDAR Device Status |
| | 0x06 | Turn On/Off Hub Calculation of Extrinsic Parameters |
-| | 0x07 | Turn On/Off LiDAR Rain/Fog Suppression |
-| | 0x08 | Query Hub Slot Power Status |
-| | 0x09 | Set LiDAR Turn On/Off Fan |
-| | 0x0A | Get LiDAR Turn On/Off Fan State |
-| | 0x0B | Set LiDAR Return Mode |
-| | 0x0C | Get LiDAR Return Mode |
-| | 0x0D | Set LiDAR IMU Data Push Frequency |
-| | 0x0E | Get LiDAR IMU Data Push Frequency |
+| | 0x07 | Turn On/Off LiDAR Rain/Fog Suppression |
+| | 0x08 | Query Hub Slot Power Status |
+| | 0x09 | Set LiDAR Turn On/Off Fan |
+| | 0x0A | Get LiDAR Turn On/Off Fan State |
+| | 0x0B | Set LiDAR Return Mode |
+| | 0x0C | Get LiDAR Return Mode |
+| | 0x0D | Set LiDAR IMU Data Push Frequency |
+| | 0x0E | Get LiDAR IMU Data Push Frequency |
## 2.3 SDK Connection
In the process of communication, LiDAR or Hub are defined as slave, and the
computer which receives point cloud data is defined as master.
The communication flow between master and slave is as follows:
1. When the slave is powered on, it broadcasts the device information data to
-port 55000 of the master using source port 65000;
+ port 55000 of the master using source port 65000;
2. After receiving the broadcast data, the master sends a connection request to
-the slave port 65000, which contains the source port information;
+ the slave port 65000, which contains the source port information;
3. The slave replies ACK data to this source port after receiving the master's
-connection request;
+ connection request;
4. When the user receives ACK data, the handshake is completed. It can start
-sending heartbeat data to maintain the connection, and transmit commands and
-data.
+ sending heartbeat data to maintain the connection, and transmit commands and
+ data.
**NOTE**: *The Livox LiDAR/Hub will re-broadcast if heartbeat is timeout.*
@@ -158,27 +159,27 @@ Flow Chart:
Point cloud data format output by LiDAR:
-| Field | Index (byte) | Size (byte) | Description |
-|----------------|--------------|-------------|-------------------------------------------------------|
-| version | 0 | 1 | Packet Protocol Version, 5 for the Current Version |
+| Field | Index (byte) | Size (byte) | Description |
+| -------------- | ------------ | ----------- | ---------------------------------------- |
+| version | 0 | 1 | Packet Protocol Version, 5 for the Current Version |
| slot_id | 1 | 1 | ID of the Slot Connecting LiDAR Device:
If LiDAR connects directly to computer without Hub, default 1;
If LiDAR connects to computer through Hub,
then the ‘slot_id’ is the corresponding slot number of the hub (range: 1 ~ 9); |
-| LiDAR_id | 2 | 1 | LiDAR ID:
1: Mid-100 Left / Mid-40 / Tele-15 / Horizon
2: Mid-100 Middle
3: Mid-100 Right
 |
-| reserved | 3 | 1 | |
+| LiDAR_id | 2 | 1 | LiDAR ID:
1: Mid-100 Left / Mid-40 / Tele-15 / Horizon/Mid-70/Avia
2: Mid-100 Middle
3: Mid-100 Right
 |
+| reserved | 3 | 1 | |
| status_code | 4 | 4 | LiDAR Status Indicator Information, For details, see 3.4 |
-| timestamp_type | 8 | 1 | Timestamp Type, For details, see [3.2](#timestamp) |
-| data_type | 9 | 1 | Data Type, For details, see [3.3](#data_type) |
+| timestamp_type | 8 | 1 | Timestamp Type, For details, see [3.2](#3.2 Time Stamp {#timestamp}) |
+| data_type | 9 | 1 | Data Type, For details, see [3.3](#3.3 Point Cloud/IMU Data {#data_type}) |
| timestamp | 10 | 8 | Nanosecond or UTC Format Timestamp, For details, see 3.2 |
-| data | 18 | -- | Data information, For details, see [3.3](#data_type) |
+| data | 18 | -- | Data information, For details, see [3.3](#3.3 Point Cloud/IMU Data {#data_type}) |
## 3.2 Time Stamp {#timestamp}
-LiDAR system supports three synchronization modes:
+LiDAR system supports three synchronization modes:
- PTP: IEEE 1588v2.0 PTP network protocol synchronization.
-- GPS: In order to synchronize with GPS, LiDAR/Hub have to receive PPS and UTC timestamps. For Horizon and Tele-15, LiDAR unit can receive UTC timestamps in control command over Ethernet. Livox Hub unit can receive UTC timestamps in $GPRMC message over RS485 serial port.
+- GPS: In order to synchronize with GPS, LiDAR/Hub have to receive PPS and UTC timestamps. For Horizon/Tele-15/Mid-70/Avia, LiDAR unit can receive UTC timestamps in control command over Ethernet. Livox Hub unit can receive UTC timestamps in $GPRMC message over RS485 serial port.
- PPS: Pulse synchronization (only supported by LiDAR).
-**Synchronization Priority:** PTP > GPS > PPS, when there are multiple synchronization sources in the system, the synchronization mode with the highest priority will be selected. If the highest priority synchronization source is offline, the timestamp type will continue to be maintained and will not fall back to the lower priority, and `time_sync_status` in [Status Code](# 3.5.1 LiDAR Status Code) will be set to 4(the highest priority synchronization signal is abnormal).
+**Synchronization Priority:** PTP > GPS > PPS, when there are multiple synchronization sources in the system, the synchronization mode with the highest priority will be selected. If the highest priority synchronization source is offline, the timestamp type will continue to be maintained and will not fall back to the lower priority, and `time_sync_status` in [Status Code](#3.5.1 LiDAR Status Code) will be set to 4(the highest priority synchronization signal is abnormal).
-Each packet contains a timestamp indicating the time of the first point in the packet.The time interval of each point in the packet is equal.
+Each packet contains a timestamp indicating the time of the first point in the packet.The time interval of each point in the packet is equal.
Taking Mid-40 as an example, the sampling frequency is 100 KHz , and the interval of each point is 10 us.
@@ -212,7 +213,7 @@ mode has the highest priority.
**Timestamp Type 3**
-A timestamp of 3 indicates LIDAR/Hub unit is sync with GPS. For LiDAR unit, PPS in RS485 level and UTC timestamp through SDK control command (refer to [**Update UTC synchronization time**](#_0xA_Update_UTC) for details) are needed. The sequence diagram is as follows:
+A timestamp of 3 indicates LIDAR/Hub unit is sync with GPS. For LiDAR unit, PPS in RS485 level and UTC timestamp through SDK control command (refer to [**Update UTC synchronization time**](#0x0A Update UTC synchronize time {#utc_cmd}) for details) are needed. The sequence diagram is as follows:

For Livox Hub unit, PPS and $GPRMC message in RS485 level are needed. The sequence
@@ -223,24 +224,24 @@ diagram is as follows:
An example $GPRMC message is shown below:
$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
-| 123519 | Fix taken at 12:35:19 UTC |
-|-----------|------------------------------------------|
-| A | Status A=active or V=Void. |
-| 4807.038 | Current Latitude |
-| N | North/South |
-| 01131.000 | Current Longitude |
-| E | East/West |
-| 022.4 | Speed in knots |
-| 084.4 | True course |
-| 230394 | Date stamp, 23rd of March 1994 |
-| 003.1 | Magnetic Variation |
-| W | West/East |
-| *6A | The checksum data, always begins with * |
+| 123519 | Fix taken at 12:35:19 UTC |
+| --------- | --------------------------------------- |
+| A | Status A=active or V=Void. |
+| 4807.038 | Current Latitude |
+| N | North/South |
+| 01131.000 | Current Longitude |
+| E | East/West |
+| 022.4 | Speed in knots |
+| 084.4 | True course |
+| 230394 | Date stamp, 23rd of March 1994 |
+| 003.1 | Magnetic Variation |
+| W | West/East |
+| *6A | The checksum data, always begins with * |
The timestamp in cloud point data package UTC time format:
-| Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 ~ 7 |
-|--------|--------|--------|--------|----------------------------------|
+| Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 ~ 7 |
+| ------ | ------ | ------ | ------ | -------------------------------- |
| Year | Month | Day | Hour | Offset within the Hour, Unit: us |
**Timestamp Type 4**
@@ -249,26 +250,28 @@ PPS synchronization source, using the RS485 level. The sequence diagram is as fo

## 3.3 Point Cloud/IMU Data {#data_type}
-There are N samples in each data package. N depends on the user's configuration. The sample data can be one of the following formats.
+There are N samples in each data package. N depends on the data type. The sample data can be one of the following formats.
Data Type:
-| Data Type |Sample Type |Return Mode | Coordinate Format |N| Data Frequency | Supported Devices |
-|----------------|-------------------|-------------------|--------------------|------------------|-------------------|-------------------|
-| 0 |Point Cloud Data |Single Return Mode |Cartesian Coordinate | 100 | 100,000 points/s |Mid-40 |
-| 1 |Point Cloud Data |Single Return Mode |Spherical Coordinate |100 | 100,000 points/s |Mid-40 |
-| 2 |Point Cloud Data |Single Return Mode |Cartesian Coordinate |96 | 240,000 points/s |Horizon
Tele-15 |
-| 3 |Point Cloud Data |Single Return Mode |Spherical Coordinate |96 | 240,000 points/s |Horizon
Tele-15 |
-| 4 |Point Cloud Data |Dual Return Mode |Cartesian Coordinate |48 | 480,000 points/s |Horizon
Tele-15 |
-| 5 |Point Cloud Data |Dual Return Mode |Spherical Coordinate |48 | 480,000 points/s |Horizon
Tele-15 |
-| 6 |IMU Data |--- |--- |1 | see [IMU Data Push Frequency](#imu_freq) |Horizon
Tele-15 |
+| Data Type | Sample Type | Coordinate Format | Return Mode | N | Data Frequency | Supported Devices |
+| --------- | ---------------- | -------------------- | ------------------ | ---- | ------------------------------------------------------------ | ------------------------------------ |
+| 0 | Point Cloud Data | Cartesian Coordinate | Single Return Mode | 100 | 100,000 points/s | Mid-40 |
+| 1 | Point Cloud Data | Spherical Coordinate | Single Return Mode | 100 | 100,000 points/s | Mid-40 |
+| 2 | Point Cloud Data | Cartesian Coordinate | Single Return Mode | 96 | Horizon/Tele-15/Avia:
240,000 points/s
Mid-70:
100,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 3 | Point Cloud Data | Spherical Coordinate | Single Return Mode | 96 | Horizon/Tele-15/Avia:
240,000 points/s
Mid-70:
100,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 4 | Point Cloud Data | Cartesian Coordinate | Dual Return Mode | 48 | Horizon/Tele-15/Avia:
480,000 points/s
Mid-70:
200,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 5 | Point Cloud Data | Spherical Coordinate | Dual Return Mode | 48 | Horizon/Tele-15/Avia:
480,000 points/s
Mid-70:
200,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 6 | IMU Data | --- | --- | 1 | see [IMU Data Push Frequency](#0x08 Set IMU Data Push Frequency {#imu_freq}) | Horizon
Tele-15
Avia |
+| 7 | Point Cloud Data | Cartesian Coordinate | Triple Return Mode | 30 | Avia:
720,000 points/s | Avia |
+| 8 | Point Cloud Data | Spherical Coordinate | Triple Return Mode | 30 | Avia:
720,000 points/s | Avia |
**Data Type 0**
Single return cartesian coordinate data format:
| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|------------------|
+| ------------ | ------------- | --------- | ---------------- |
| x | 0 | int32_t | X axis, Unit: mm |
| y | 4 | int32_t | Y axis, Unit: mm |
| z | 8 | int32_t | Z axis, Unit: mm |
@@ -278,92 +281,132 @@ Single return cartesian coordinate data format:
Single return spherical coordinate data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|-------------------------------------------|
-| depth | 0 | uint32_t | Depth, Unit: mm |
+| Field | Offset (byte) | Data Type | Description |
+| ------------ | ------------- | --------- | ---------------------------------------- |
+| depth | 0 | uint32_t | Depth, Unit: mm |
| theta | 4 | uint16_t | Zenith angle[0, 18000], Unit: 0.01 degree |
-| phi | 6 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
-| reflectivity | 8 | uin8_t | Reflectivity |
+| phi | 6 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
+| reflectivity | 8 | uin8_t | Reflectivity |
**Data Type 2**
Single return cartesian coordinate data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|------------------|
-| x | 0 | int32_t | X axis, Unit: mm |
-| y | 4 | int32_t | Y axis, Unit: mm |
-| z | 8 | int32_t | Z axis, Unit: mm |
-| reflectivity | 12 | uin8_t | Reflectivity |
-| tag | 13 | uint8_t | For details, see [tag information](#tag_info)|
+| Field | Offset (byte) | Data Type | Description |
+| ------------ | ------------- | --------- | ---------------------------------------- |
+| x | 0 | int32_t | X axis, Unit: mm |
+| y | 4 | int32_t | Y axis, Unit: mm |
+| z | 8 | int32_t | Z axis, Unit: mm |
+| reflectivity | 12 | uin8_t | Reflectivity |
+| tag | 13 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info) |
**Data Type 3**
Single return spherical coordinate data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|-------------------------------------------|
-| depth | 0 | uint32_t | Depth, Unit: mm |
+| Field | Offset (byte) | Data Type | Description |
+| ------------ | ------------- | --------- | ---------------------------------------- |
+| depth | 0 | uint32_t | Depth, Unit: mm |
| theta | 4 | uint16_t | Zenith angle[0, 18000], Unit: 0.01 degree |
-| phi | 6 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
-| reflectivity | 8 | uin8_t | Reflectivity |
-| tag | 9 | uint8_t | For details, see [tag information](#tag_info)|
+| phi | 6 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
+| reflectivity | 8 | uin8_t | Reflectivity |
+| tag | 9 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
**Data Type 4**
Dual return Cartesian coordinate data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|------------------|
-| x1 | 0 | int32_t | X axis, Unit: mm |
-| y1 | 4 | int32_t | Y axis, Unit: mm |
-| z1 | 8 | int32_t | Z axis, Unit: mm |
-| reflectivity1 | 12 | uin8_t | Reflectivity |
-| tag1 | 13 | uint8_t | For details, see [tag information](#tag_info)|
-| x2 | 14 | int32_t | X axis, Unit: mm |
-| y2 | 18 | int32_t | Y axis, Unit: mm |
-| z2 | 22 | int32_t | Z axis, Unit: mm |
-| reflectivity2 | 26 | uin8_t | Reflectivity |
-| tag2 | 27 | uint8_t | For details, see [tag information](#tag_info)|
+| Field | Offset (byte) | Data Type | Description |
+| ------------- | ------------- | --------- | ---------------------------------------- |
+| x1 | 0 | int32_t | X axis, Unit: mm |
+| y1 | 4 | int32_t | Y axis, Unit: mm |
+| z1 | 8 | int32_t | Z axis, Unit: mm |
+| reflectivity1 | 12 | uin8_t | Reflectivity |
+| tag1 | 13 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| x2 | 14 | int32_t | X axis, Unit: mm |
+| y2 | 18 | int32_t | Y axis, Unit: mm |
+| z2 | 22 | int32_t | Z axis, Unit: mm |
+| reflectivity2 | 26 | uin8_t | Reflectivity |
+| tag2 | 27 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
**Data Type 5**
Dual return spherical coordinate data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|-------------------------------------------|
-| theta | 0 | uint16_t | Zenith angle[0, 18000], Unit: 0.01 degree |
-| phi | 2 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
-| depth1 | 4 | uint32_t | Depth, Unit: mm |
-| reflectivity1| 8 | uin8_t | Reflectivity |
-| tag1 | 9 | uint8_t | For details, see [tag information](#tag_info)|
-| depth2 | 10 | uint32_t | Depth, Unit: mm |
-| reflectivity2| 14 | uin8_t | Reflectivity |
-| tag2 | 15 | uint8_t | For details, see [tag information](#tag_info)|
+| Field | Offset (byte) | Data Type | Description |
+| ------------- | ------------- | --------- | ---------------------------------------- |
+| theta | 0 | uint16_t | Zenith angle[0, 18000], Unit: 0.01 degree |
+| phi | 2 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
+| depth1 | 4 | uint32_t | Depth, Unit: mm |
+| reflectivity1 | 8 | uin8_t | Reflectivity |
+| tag1 | 9 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| depth2 | 10 | uint32_t | Depth, Unit: mm |
+| reflectivity2 | 14 | uin8_t | Reflectivity |
+| tag2 | 15 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
**Data Type 6**
IMU data format:
-| Field | Offset (byte) | Data Type | Description |
-|--------------|---------------|-----------|-------------------------------------------|
-| gyro_x | 0 | float | Unit: rad/s |
-| gyro_y | 4 | float | Unit: rad/s |
-| gyro_z | 8 | float | Unit: rad/s |
-| acc_x | 12 | float | Unit: g |
-| acc_y | 16 | float | Unit: g |
-| acc_z | 20 | float | Unit: g |
+| Field | Offset (byte) | Data Type | Description |
+| ------ | ------------- | --------- | ----------- |
+| gyro_x | 0 | float | Unit: rad/s |
+| gyro_y | 4 | float | Unit: rad/s |
+| gyro_z | 8 | float | Unit: rad/s |
+| acc_x | 12 | float | Unit: g |
+| acc_y | 16 | float | Unit: g |
+| acc_z | 20 | float | Unit: g |
+
+**Data Type 7**
+
+Triple return Cartesian coordinate data format:
+
+| Field | Offset (byte) | Data Type | Description |
+| ------------- | ------------- | --------- | ------------------------------------------------------------ |
+| x1 | 0 | int32_t | X axis, Unit: mm |
+| y1 | 4 | int32_t | Y axis, Unit: mm |
+| z1 | 8 | int32_t | Z axis, Unit: mm |
+| reflectivity1 | 12 | uint8_t | Reflectivity |
+| tag1 | 13 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| x2 | 14 | int32_t | X axis, Unit: mm |
+| y2 | 18 | int32_t | Y axis, Unit: mm |
+| z2 | 22 | int32_t | Z axis, Unit: mm |
+| reflectivity2 | 26 | uint8_t | Reflectivity |
+| tag2 | 27 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| x3 | 28 | int32_t | X axis, Unit: mm |
+| y3 | 32 | int32_t | Y axis, Unit: mm |
+| z3 | 36 | int32_t | Z axis, Unit: mm |
+| reflectivity3 | 40 | uint8_t | Reflectivity |
+| tag3 | 41 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+
+**Data Type 8**
+
+Triple return spherical coordinate data format:
+
+| Field | Offset (byte) | Data Type | Description |
+| ------------- | ------------- | --------- | ------------------------------------------------------------ |
+| theta | 0 | uint16_t | Zenith angle[0, 18000], Unit: 0.01 degree |
+| phi | 2 | uin16_t | Azimuth[0, 36000], Unit: 0.01 degree |
+| depth1 | 4 | uint32_t | Depth, Unit: mm |
+| reflectivity1 | 8 | uint8_t | Reflectivity |
+| tag1 | 9 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| depth2 | 10 | uint32_t | Depth, Unit: mm |
+| reflectivity2 | 14 | uint8_t | Reflectivity |
+| tag2 | 15 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
+| depth3 | 16 | uint32_t | Depth, Unit: mm |
+| reflectivity3 | 20 | uint8_t | Reflectivity |
+| tag3 | 21 | uint8_t | For details, see [tag information](#3.4 Tag Information {#tag_info}) |
## 3.4 Tag Information {#tag_info}
-| Bit | Description |
-| ---- | ------------------------------------------------------------ |
-| 7:6 | Reserved |
+| Bit | Description |
+| ---- | ---------------------------------------- |
+| 7:6 | Reserved |
| 5:4 | Return Number:
00: Return 0
01: Return 1
02: Return 2
03: Return 4 |
| 3:2 | Point property based on return intensity:
00: Normal
01: High confidence level of the noise
02: Moderate confidence level of the noise
03: Reserved |
| 1:0 | Point property based on spatial position:
0: Normal
1: High confidence level of the noise
2: Moderate confidence level of the noise
3: Low confidence level of the noise |
-> For details, see Livox Horizon/Tele-15 user manual.
+> For details, see Livox Horizon/Tele-15/Mid-70/Avia user manual.
## 3.5 Status Code
@@ -381,7 +424,7 @@ LiDAR status_code consists of 32 bits, which has the following meanings:
| Bit9 | pps_status | 0: No PPS Signal
1: PPS Signal is OK |
| Bit10 | device_status | 0: Normal
1: Warning for Approaching the End of Service Life |
| Bit11 | fan_status | 0: Fan in Normal State
1: Fan in Warning State
**Supported devices:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
-| Bit12 | self_heating | 0: Low Temperature Self Heating On
1: Low Temperature Self Heating Off
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
+| Bit12 | self_heating | 0: Low Temperature Self Heating On
1: Low Temperature Self Heating Off
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
|
| Bit13 | ptp_status | 0: No 1588 Signal
1: 1588 Signal is OK |
| Bit14:16 | time_sync_status | 0: System dose not start time synchronization
1: Using PTP 1588 synchronization
2: Using GPS synchronization
3: Using PPS synchronization
4: System time synchronization is abnormal (The highest priority synchronization signal is abnormal) |
| Bit17:29 | RSVD | |
@@ -391,14 +434,14 @@ LiDAR status_code consists of 32 bits, which has the following meanings:
Hub Status Code consists of 32 bits, which has the following meanings:
-| Bits | Data | Description |
-| -------- | ----------------- | ------------------------------------------------------------ |
+| Bits | Data | Description |
+| -------- | ----------------- | ---------------------------------------- |
| Bit0:1 | sync_status | 0: No synchronization signal
1: 1588 synchronization
2: GPS synchronization
3: System time synchronization is abnormal (The highest priority synchronization signal is abnormal) |
| Bit2:3 | temp_status | 0: Temperature in Normal State
1: High or Low
2: Extremely High or Extremely Low |
-| Bit4 | LiDAR_status | 0: LiDAR State is Normal
1: LiDAR State is Abnormal |
+| Bit4 | LiDAR_status | 0: LiDAR State is Normal
1: LiDAR State is Abnormal |
| Bit5 | LiDAR_link_status | 0: LiDAR Connection is Normal
1: LiDAR Connection is Abnormal |
| Bit6 | firmware_status | 0: LiDAR Firmware is OK
1: LiDAR Firmware is Abnormal, Need to be Upgraded |
-| Bit7:29 | RSVD | |
+| Bit7:29 | RSVD | |
| Bit30:31 | system_status | 0: Normal
1: Warning
Any of the following situations will trigger warning:
1.1 `temp_status` is 1;
2: Error
Any of the following situations will trigger error:
2.1 `temp_status` is 2;
2.2 `LiDAR_status` is 1;
2.3 `firmware_status` is 1; |
# 4 Configuration Parameters
@@ -406,59 +449,51 @@ Hub Status Code consists of 32 bits, which has the following meanings:
The configuration parameter table is designed to configure the Livox device more easily. It is stored in the non-volatile area of the device. So configuration parameters will not lose after reboot.
-Each configuration has an independent key. The following are all available configuration parameters:
+Each configuration has an independent key. The following are all available configuration parameters:
-| Key | Name | Supported Device | Description |
-|------|------|------------------|-----------------------|
-| 0x00 | Reserved | -- | Invalid key |
-| 0x01 | High Sensitivity Function | Tele-15/07.09.0000+ | High Sensitivity Function enable/disable |
+| Key | Name | Supported Device | Value Length | Value Type | Value Description |
+| ---- | ------------------------------------------------- | --------------------------------------- | ------------ | ---------- | ------------------------------------------------------------ |
+| 0x00 | Reserved | -- | | | Invalid |
+| 0x01 | High Sensitivity Function | Tele-15/07.09.0000+
Avia/11.06.0000+ | 1 | uint8_t | 0:High Sensitivity Function disable
1:High Sensitivity Function enable(Default) |
+| 0x02 | Switch Repetitive/Non-repetitive Scanning Pattern | Avia/11.06.0000+ | 1 | uint8_t | 0:Non-repetitive Scanning Pattern(Default)
1:Repetitive Scanning Pattern |
+| 0x03 | Slot ID Configuration | Mid-70/10.03.0000+
Avia/11.06.0000+ | 1 | uint8_t | configure Slot ID,range 1 to 9 |
* See [Write Configuration Parameters](#0x0b-write-configuration-parameters) for writing configuration parameters;
* See [Read Configuration Parameters](#0x0c-read-configuration-parameters) for reading configuration parameters;
-## 4.2 Value Details
-
-### 0x01 High Sensitivity Mode
-
-**Value Length:** 1
-**Supported Device:**
Tele-15/07.09.0000+
-| name | Offset (byte) | Data Type | Description | Default Value |
-|---------|---------------|-----------|-----------------------|-----------------------|
-| enable | 0 | uint8_t | 0: High Sensitivity Function Disable
1: High Sensitivity Function Enable | 1 |
-
# 5 Control Command Detail
## 5.1 General CMD Set
### 0x00 Broadcast Message
message
-| MSG | Name | Offset (byte) | Data Type | Description |
-|------|------------------|---------------|-------------|-----------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
-| | broadcast_code | 2 | uint8_t[16] | Device Broadcast Code, C-Style string end with '\\0'
The Broadcast Code of Each Device is UNIQUE. |
-| | dev_type | 18 | uint8_t | Device Type:
0: Livox Hub
1: Mid-40
2: Tele-15
3: Horizon |
-| | reserved | 19 | uint16_t | Reserved |
+| MSG | Name | Offset (byte) | Data Type | Description |
+| ---- | -------------- | ------------- | ----------- | ------------------------------------------------------------ |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
+| | broadcast_code | 2 | uint8_t[16] | Device Broadcast Code, C-Style string end with '\\0'
The Broadcast Code of Each Device is UNIQUE. |
+| | dev_type | 18 | uint8_t | Device Type:
0: Livox Hub
1: Mid-40
2: Tele-15
3: Horizon
6: Mid-70
9:Avia
|
+| | reserved | 19 | uint16_t | Reserved |
### 0x01 Handshake
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | --------- | ------------- | ---------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | user_ip | 2 | uint8_t[4] | Host IP Address
Example: AA.BB.CC.DD
user_ip[0] = AA
user_ip[1] = BB
user_ip[2] = CC
user_ip[3] = DD |
-| | data_port | 6 | uint16_t | Host Point Cloud Data UDP Destination Port |
-| | cmd_port | 8 | uint16_t | Host Control Command UDP Destination Port |
+| | data_port | 6 | uint16_t | Host Point Cloud Data UDP Destination Port |
+| | cmd_port | 8 | uint16_t | Host Control Command UDP Destination Port |
| | imu_port | 10 | uint16_t | Host Control IMU UDP Destination Port,
**Supported Devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x02 Query Device Information
@@ -466,17 +501,17 @@ response
request
| CMD | name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
+| ---- | ------- | ------------- | --------- | --------------------- |
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|------------|---------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail|
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
| | version | 3 | uint8_t[4] | Firmware Version:
Example: AA.BB.CC.DD
version[0] = AA
version[1] = BB
version[2] = CC
version[3] = DD |
### 0x03 Heartbeat
@@ -487,55 +522,55 @@ connection with the device.
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
+| ---- | ------- | ------------- | --------- | --------------------- |
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
| | work_state | 3 | uint8_t | LiDAR State:
0x00: Initializing
0x01: Normal
0x02: Power-Saving
0x03: Standby
0x04: Error
Hub State:
0x00: Initializing
0x01: Normal
0x04: Error |
-| | feature_msg | 4 | uint8_t | LiDAR Feature Message:
Bit0: Rain/Fog Suppression Switch
0x00: Turn Off
0x01: Turn On
Bit1 ~ Bit7: Reserved
**Hub is Reserved** |
-| | ack_msg | 5 | uint32_t | ACK Message:
Related to ‘work_state’:
work_state is 0x00: Initialization Progress
work_state is other: Status Code |
+| | feature_msg | 4 | uint8_t | LiDAR Feature Message:
Bit0: Rain/Fog Suppression Switch
0x00: Turn Off
0x01: Turn On
Bit1 ~ Bit7: Reserved
**Hub is Reserved** |
+| | ack_msg | 5 | uint32_t | ACK Message:
Related to ‘work_state’:
work_state is 0x00: Initialization Progress
work_state is other: Status Code |
### 0x04 Start/Stop Sampling
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ----------- | ------------- | --------- | -------------------------------------------- |
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
| | sample_ctrl | 2 | uint8_t | 0x00: Stop Sampling
0x01: Start Sampling |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x05 Change Coordinate System
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-----------------|---------------|-----------|-------------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | --------------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
| | coordinate_type | 2 | uint8_t | 0x00: Cartesian Coordinate
0x01: Spherical Coordinate |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
**NOTE:** *This cmd only takes effect in RAM, the coordinate system will reset to Cartesian after reboot .*
@@ -545,16 +580,16 @@ response
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
+| ---- | ------- | ------------- | --------- | --------------------- |
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x07 Push Abnormal Status
@@ -565,7 +600,7 @@ When error occurs, the message is immediately pushed at 10Hz to report the
abnormal information.
| MSG | name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|-----------------------|
+| ---- | ----------- | ------------- | --------- | --------------------- |
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
| | status_code | 2 | uint32_t | Status Code |
@@ -574,28 +609,28 @@ abnormal information.
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|------------|-------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
-| | ip_mode | 2 | uint8_t | 0x00: Dynamic IP
0x01: Static IP |
-| | ip_addr | 3 | uint8_t[4] | For details, see: **IP Address Information** |
-| | net_mask| 7 | uint8_t[4] | IPV4 netmask
IP netmask is valid when ‘ip_mode’ is 0x01(Static IP)
Example: AA.BB.CC.DD
net_mask[0]: AA
net_mask[1]: BB
net_mask[2]: CC
net_mask[3]: DD
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
-| |gw_addr | 11 | uint8_t[4] |IPV4 gateway
IP gateway is valid when ‘ip_mode’ is 0x01(Static IP)
Example: AA.BB.CC.DD
gw_addr[0]: AA
gw_addr[1]: BB
gw_addr[2]: CC
gw_addr[3]: DD
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | ---------- | ------------------------------------------------------------ |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
+| | ip_mode | 2 | uint8_t | 0x00: Dynamic IP
0x01: Static IP |
+| | ip_addr | 3 | uint8_t[4] | For details, see: **IP Address Information** |
+| | net_mask | 7 | uint8_t[4] | IPV4 netmask
IP netmask is valid when ‘ip_mode’ is 0x01(Static IP)
Example: AA.BB.CC.DD
net_mask[0]: AA
net_mask[1]: BB
net_mask[2]: CC
net_mask[3]: DD
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ |
+| | gw_addr | 11 | uint8_t[4] | IPV4 gateway
IP gateway is valid when ‘ip_mode’ is 0x01(Static IP)
Example: AA.BB.CC.DD
gw_addr[0]: AA
gw_addr[1]: BB
gw_addr[2]: CC
gw_addr[3]: DD
**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ |
IP Address Information:
-| Device Type/Firmware version | IP Address Information |
-| ----------------------------------------------- | ------------------------------------------------------------ |
-| Livox Hub
Mid-40
| IPV4 Address
IP address is valid when ‘ip_mode’ is 0x01(Static IP)
ip_addr[0]: 192
ip_addr[1]: 168
ip_addr[2]: 1
ip_addr[3]: Range is as follows
Last bit of broadcast code:
1: 11 ~ 80
2: 81 ~ 150
3: 151 ~ 220 |
-| Horizon/06.04.0000+
Tele-15/07.03.0000+
| IPV4 Address
IP address is valid when ‘ip_mode’ is 0x01(Static IP)
ip_addr[0]:1 ~ 126 && 127 ~ 223
ip_addr[1]: 0 ~ 255
ip_addr[2]: 0 ~ 255
ip_addr[3]: 0 ~ 255 |
+| Device Type/Firmware version | IP Address Information |
+| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| Livox Hub
Mid-40
| IPV4 Address
IP address is valid when ‘ip_mode’ is 0x01(Static IP)
ip_addr[0]: 192
ip_addr[1]: 168
ip_addr[2]: 1
ip_addr[3]: Range is as follows
Last bit of broadcast code:
1: 11 ~ 80
2: 81 ~ 150
3: 151 ~ 220 |
+| Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ | IPV4 Address
IP address is valid when ‘ip_mode’ is 0x01(Static IP)
ip_addr[0]:1 ~ 126 && 127 ~ 223
ip_addr[1]: 0 ~ 255
ip_addr[2]: 0 ~ 255
ip_addr[3]: 0 ~ 255 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
**NOTE:** *For IP details, see:[IP_address](https://en.wikipedia.org/wiki/IP_address).*
@@ -605,114 +640,114 @@ response
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
+| ---- | ------- | ------------- | --------- | --------------------- |
| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|------------|---------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | ip_mode | 3 | uint8_t | 0x00: Dynamic IP
0x01: Static IP |
+| | ip_mode | 3 | uint8_t | 0x00: Dynamic IP
0x01: Static IP |
| | ip_addr | 4 | uint8_t[4] | Device IPV4 Address
Example: AA.BB.CC.DD
user_ip[0] = AA
user_ip[1] = BB
user_ip[2] = CC
user_ip[3] = DD |
-| | net_mask | 8 | uint8_t[4] | Device IPV4 netmask
Example: AA.BB.CC.DD
user_netmask[0] = AA
user_netmask[1] = BB
user_netmask[2] = CC
user_netmask[3] = DD
**Supported devices:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
-| |gw | 12 | uint8_t[4] | Device IPV4 gateway
Example: AA.BB.CC.DD
user_gw[0] = AA
user_gw[1] = BB
user_gw[2] = CC
user_gw[3] = DD
**Supported devices:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
+| | net_mask | 8 | uint8_t[4] | Device IPV4 netmask
Example: AA.BB.CC.DD
user_netmask[0] = AA
user_netmask[1] = BB
user_netmask[2] = CC
user_netmask[3] = DD
**Supported devices:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+ |
+| | gw | 12 | uint8_t[4] | Device IPV4 gateway
Example: AA.BB.CC.DD
user_gw[0] = AA
user_gw[1] = BB
user_gw[2] = CC
user_gw[3] = DD
**Supported devices:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+ |
### 0x0A Reboot Device
-**Supported devices/firmware version:**
Livox Hub/08.07.0000+
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices/firmware version:**
Livox Hub/08.07.0000+
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ------------------------ |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
| | timeout | 2 | uint16_t | Reboot device delay time |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|------------|---------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x0B Write Configuration Parameters
-**Supported devices/firmware version:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
+**Supported devices/firmware version:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
-| | param_list | 2 | -- | Configuration Parameters in the form of Key-Value pairs. See the following part |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
+| | param_list | 2 | -- | Configuration Parameters in the form of Key-Value pairs. See the following part |
In 'param_list', each of the configuration parameter has the following format:
#### Configuration Parameter List Format
-| Field | Offset (byte) | Data Type | Description |
-|--------|---------------|-----------|-------------|
-| key | 0 | uint16_t | Key|
-| length | 2 | uint16_t | Length of value |
-| value | 4 | -- | The type varies with different keys. For details, see [Value Details](#42-value-details) |
+| Field | Offset (byte) | Data Type | Description |
+| ------ | ------------- | --------- | ---------------------------------------- |
+| key | 0 | uint16_t | Key |
+| length | 2 | uint16_t | Length of value |
+| value | 4 | -- | The type varies with different keys. For details, see [Configuration Parameters](#4 Configuration Parameters) |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|------------|---------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail, an error occurred while writing a parameter |
-| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter|
-| | error_code | 5 | uint8_t | See the following part |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail, an error occurred while writing a parameter |
+| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter |
+| | error_code | 5 | uint8_t | See the following part |
The meaning of the 'error_code':
#### Configuration Parameter Error Code
-| Error Code | Description |
-| ---------- | ---------- |
-| 0 | No Error |
-| 1 | The key is not supported|
-| 2 | Execution failed|
-| 3 | The key cannot be written |
-| 4 | Wrong value |
-| 5 | Wrong value length |
-| 6 | Reading parameter length limit |
+| Error Code | Description |
+| ---------- | --------------------------------------- |
+| 0 | No Error |
+| 1 | The key is not supported |
+| 2 | Execution failed |
+| 3 | The key cannot be written |
+| 4 | Wrong value |
+| 5 | Wrong value length |
+| 6 | Reading parameter length limit |
| 7 | The number of parameters does not match |
### 0x0C Read Configuration Parameters
-**Supported devices/firmware version:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
+**Supported devices/firmware version:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
-| | param_num | 2 | uint8_t | The number of parameters |
-| | key_list | 3 | -- | Keys List to read |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | --------- | ------------------------ |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
+| | param_num | 2 | uint8_t | The number of parameters |
+| | key_list | 3 | -- | Keys List to read |
In 'key_list', each of the key has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|--------|---------------|-----------|-------------|
-| key | 0 | uint16_t | Key|
+| Field | Offset (byte) | Data Type | Description |
+| ----- | ------------- | --------- | ----------- |
+| key | 0 | uint16_t | Key |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|------------|---------------------|
-| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail, an error occurred while writing a parameter |
-| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter|
-| | error_code | 5 | uint8_t | For details, see [Configuration Parameter Error Code](#configuration-parameter-error-code) |
-| | param_list | 6 | -- | Configuration Parameters in the form of Key-Value pairs, see [Configuration Parameter List Format](#configuration-parameter-list-format)|
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | General Command: 0x00 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail, an error occurred while writing a parameter |
+| | error_key | 3 | uint16_t | The Key of the first error Configuration Parameter |
+| | error_code | 5 | uint8_t | For details, see [Configuration Parameter Error Code](#configuration-parameter-error-code) |
+| | param_list | 6 | -- | Configuration Parameters in the form of Key-Value pairs, see [Configuration Parameter List Format](#configuration-parameter-list-format) |
## 5.2 LiDAR CMD Set
@@ -720,25 +755,25 @@ response
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ---------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
| | LiDAR_mode | 2 | uint8_t | LiDAR Mode:
User can configure as follow:
0x01: Normal Mode
0x02: Power-Saving Mode
0x03: Standby Mode |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|-------------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail
0x02: Switching |
### 0x01 Write LiDAR Extrinsic Parameters
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|---------------------------|
+| ---- | ------- | ------------- | --------- | ------------------------- |
| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | roll | 2 | float32 | Roll Angle, Unit: degree |
@@ -750,70 +785,70 @@ request
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x02 Read LiDAR Extrinsic Parameters
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|---------------------|
+| ---- | ------- | ------------- | --------- | ------------------- |
| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | roll | 3 | float32 | Roll Angle, Unit: degree |
-| | pitch | 7 | float32 | Pitch Angle, Unit: degree |
-| | yaw | 11 | float32 | Yaw Angle, Unit: degree |
-| | x | 15 | int32_t | X Translation, Unit: mm |
-| | y | 19 | int32_t | Y Translation, Unit: mm |
-| | z | 23 | int32_t | Z Translation, Unit: mm |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | roll | 3 | float32 | Roll Angle, Unit: degree |
+| | pitch | 7 | float32 | Pitch Angle, Unit: degree |
+| | yaw | 11 | float32 | Yaw Angle, Unit: degree |
+| | x | 15 | int32_t | X Translation, Unit: mm |
+| | y | 19 | int32_t | Y Translation, Unit: mm |
+| | z | 23 | int32_t | Z Translation, Unit: mm |
### 0x03 Turn On/Off Rain/Fog Suppression
**Supported devices:**
Mid-40
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
| | state | 2 | uint8_t | Turn On/Off Rain/Fog Suppression:
0x00: Turn Off
0x01: Turn On |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x04 Set Turn On/Off Fan
**Supported devices:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
| | state | 2 | uint8_t | Turn On/Off Fan:
0x00: Turn Off
0x01: Turn On |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-| ---- | -------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail
This configuration is saved in Flash |
### 0x05 Get Turn On/Off Fan State
@@ -821,145 +856,145 @@ response
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | state | 3 | uint8_t | Turn On/Off Fan State:
0x00: Turn Off
0x01: Turn On |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | state | 3 | uint8_t | Turn On/Off Fan State:
0x00: Turn Off
0x01: Turn On |
### 0x06 Set LiDAR Return Mode
-**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
-| | mode | 2 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return|
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
+| | mode | 2 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-| ---- | -------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail
This configuration is saved in Flash |
### 0x07 Get LiDAR Return Mode
-**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | mode | 3 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return|
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | mode | 3 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
### 0x08 Set IMU Data Push Frequency {#imu_freq}
-**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
-| | frequency | 2 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU push)
0x01: 200Hz |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
+| | frequency | 2 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU push)
0x01: 200Hz |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-| ---- | -------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail
This configuration is saved in Flash. |
### 0x09 Get IMU Data Push Frequency
-**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | frequency | 3 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | frequency | 3 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
### 0x0A Update UTC synchronize time {#utc_cmd}
-**Supported devices:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+**Supported devices:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
-| | year | 2 | uint8_t | UTC Year:
0 is 2000 year
255 is 2255 year |
-| | month | 3 | uint8_t | UTC Month: Range is 1-12 |
-| | day | 4 | uint8_t | UTC Day: Range is 1-31 |
-| | hour | 5 | uint8_t | UTC Hour: Range is 0-23|
-| | microsecond | 6 | uint32_t | 1 Hour Microsecond Offset |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| | year | 2 | uint8_t | UTC Year:
0 is 2000 year
255 is 2255 year |
+| | month | 3 | uint8_t | UTC Month: Range is 1-12 |
+| | day | 4 | uint8_t | UTC Day: Range is 1-31 |
+| | hour | 5 | uint8_t | UTC Hour: Range is 0-23 |
+| | microsecond | 6 | uint32_t | 1 Hour Microsecond Offset |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | LiDAR Command: 0x01 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
## 5.3 Hub CMD SET
### 0x00 Query Connected LiDAR Device
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|-------|---------|---------------|-----------|-------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ----------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-----------|---------------|-----------|-----------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR Connected to the Hub Range: 0 ~ 27 |
-| | info_list | 4 | -- | Device Information List of Connected LiDAR |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x00 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | count | 3 | uint8_t | Number of LiDAR Connected to the Hub Range: 0 ~ 27 |
+| | info_list | 4 | -- | Device Information List of Connected LiDAR |
In ‘info_list’, each LiDAR device information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-| -------------- | ------------- | ----------- | ------------------------------------------------------------ |
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
-| dev_type | 16 | uint8_t | Device Type:
1: Mid-40
2: Tele-15
3: Horizon |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| dev_type | 16 | uint8_t | Device Type:
1: Mid-40
2: Tele-15
3: Horizon |
| version | 17 | uint8_t[4] | LiDAR Firmware Version
Example: AA.BB.CC.DD
version[0] = AA
version[1] = BB
version[2] = CC
version[3] = DD |
-| slot_id | 21 | uin8_t | Slot Used to Install LiDAR |
+| slot_id | 21 | uin8_t | Slot Used to Install LiDAR |
| LiDAR_id | 22 | uint8_t | LiDAR ID:
1: Mid-100 Left / Mid-40 / Tele-15 / Horizon
2: Mid-100 Middle
3: Mid-100 Right |
### 0x01 Set LiDAR Mode
@@ -967,7 +1002,7 @@ In ‘info_list’, each LiDAR device information has the following format:
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
+| ---- | ----------- | ------------- | --------- | ------------------------------------- |
| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | count | 2 | uint8_t | Number of LiDAR to Set Range: 1 \~ 27 |
@@ -975,62 +1010,62 @@ request
In ‘config_list’, each LiDAR mode configuration has the following format:
-| Field | Offset (byte) | Data Type | Description |
-| -------------- | ------------- | ----------- | ------------------------------------------------------------ |
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
| LiDAR_mode | 16 | uint8_t | LiDAR Mode:
User can configure as follows:
0x01: Normal Mode
0x02: Power-Saving Mode
0x03: Standby Mode |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|-------------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x01 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail
0x02: Switching |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
### 0x02 Turn On/Off Designated Slot Power
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-| ---- | ---------- | ------------- | --------- | --------------------------------------------------- |
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
-| | slot_id | 2 | uint8_t | Slot id of Hub Range: 1 ~ 9 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
+| | slot_id | 2 | uint8_t | Slot id of Hub Range: 1 ~ 9 |
| | power_ctrl | 3 | uint8_t | Power Control:
0x00: Turn Off
0x01: Turn On |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x02 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x03 Write LiDAR Extrinsic Parameters
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|------------|---------------|-----------|-----------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------- | ------------- | --------- | -------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
| | count | 2 | uint8_t | Number of LiDAR to Write Range: 1 ~ 27 |
-| | param_list | 3 | -- | LiDAR Parameter Configuration List |
+| | param_list | 3 | -- | LiDAR Parameter Configuration List |
In ‘param_list’, each LiDAR parameter configuration has the following format:
| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------|
+| -------------- | ------------- | ----------- | ------------------------- |
| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
| roll | 16 | float | Roll Angle, Unit: degree |
| pitch | 20 | float | Pitch Angle, Unit: degree |
@@ -1041,89 +1076,89 @@ In ‘param_list’, each LiDAR parameter configuration has the following format
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-| ---- | ----------- | ------------- | --------- | --------------------------------------------- |
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x03 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Write Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Write Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-| -------------- | ------------- | ----------- | -------------------------------------------------- |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
### 0x04 Read LiDAR Extrinsic Parameters
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-----------|---------------|-----------|----------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ----------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
response
-| ACK | Name | Offset (byte) | Type | Description |
-|------|------------|---------------|---------|----------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Read Range: 1 ~ 27 |
-| | param_list | 4 | -- | LiDAR Parameter List |
+| ACK | Name | Offset (byte) | Type | Description |
+| ---- | ---------- | ------------- | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x04 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | count | 3 | uint8_t | Number of LiDAR to Read Range: 1 ~ 27 |
+| | param_list | 4 | -- | LiDAR Parameter List |
In ‘param_list’, each LiDAR parameter information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
-| roll | 17 | float | Roll Angle, Unit: degree |
-| pitch | 21 | float | Pitch Angle, Unit: degree |
-| yaw | 25 | float | Yaw Angle, Unit: degree |
-| x | 29 | int32_t | X Translation, Unit: mm |
-| y | 33 | int32_t | Y Translation, Unit: mm |
-| z | 37 | int32_t | Z Translation, Unit: mm |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| roll | 17 | float | Roll Angle, Unit: degree |
+| pitch | 21 | float | Pitch Angle, Unit: degree |
+| yaw | 25 | float | Yaw Angle, Unit: degree |
+| x | 29 | int32_t | X Translation, Unit: mm |
+| y | 33 | int32_t | Y Translation, Unit: mm |
+| z | 37 | int32_t | Z Translation, Unit: mm |
### 0x05 Query LiDAR Device Status
request
| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-------------------|
+| ---- | ------- | ------------- | --------- | ----------------- |
| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-----------|---------------|-----------|-----------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR Connected to the Hub Range: 0 ~ 27 |
-| | info_list | 4 | -- | LiDAR Status List |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | --------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x05 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| | count | 3 | uint8_t | Number of LiDAR Connected to the Hub Range: 0 ~ 27 |
+| | info_list | 4 | -- | LiDAR Status List |
In ‘info_list’, each LiDAR status information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|-----------------------------------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
-| work_state | 16 | uint8_t | LiDAR State:
0x00: Initializing
0x01: Normal
0x02: Power-Saving
0x03: Standby
0x04: Error |
-| feature_msg | 17 | uint8_t | LiDAR Mode Message:
Bit0: Rain/Fog Suppression Switch
0x00: Turn Off
0x01: Turn On
Bit1 ~ Bit7: Reserved |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| work_state | 16 | uint8_t | LiDAR State:
0x00: Initializing
0x01: Normal
0x02: Power-Saving
0x03: Standby
0x04: Error |
+| feature_msg | 17 | uint8_t | LiDAR Mode Message:
Bit0: Rain/Fog Suppression Switch
0x00: Turn Off
0x01: Turn On
Bit1 ~ Bit7: Reserved |
| ack_msg | 18 | uint32_t | ACK Message:
Relevant to ‘work_state’:
work_state is 0x00: Initialization Progress
work_state is other: Status Code |
### 0x06 Turn On/Off Hub Extrinsic Parameters Calculation
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|---------|---------------|-----------|-----------------------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
| | state | 2 | uint8_t | Turn On/Off Parameter Calculation:
0: Turn Off
1: Turn On |
**NOTE:** *The Hub uses extrinsic parameters stored in each LiDAR for coordinate
@@ -1132,11 +1167,11 @@ described by Euler angles with the sequence of rotation axes being x-y-z.*
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|-------|----------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | -------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x06 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
### 0x07 Turn On/Off LiDAR Rain/Fog Suppression
@@ -1144,36 +1179,36 @@ response
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR Feature Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR Feature Configuration List |
In ‘config_list’, each LiDAR feature configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | -------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
| cmd_data | 1 | uint8_t | 0: Turn Off
1: Turn On |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
### 0x08 Query Hub Slot Power Status
@@ -1187,11 +1222,11 @@ request
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-| ---- | ---------------- | ------------- | --------- | ------------------------------------------------------------ |
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
-| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ---------------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x08 |
+| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
| | slot_power_state | 3 | uint16_t | Slot Power Status:
0x00: Turn Off
0x01: Turn On
bit0: First Slot
bit1: Second Slot
...
bit8: Ninth Slot |
### 0x09 Set LiDAR Turn On/Off Fan
@@ -1200,37 +1235,37 @@ response
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR Fan Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR Fan Configuration List |
In ‘config_list’, each LiDAR fan configuration information has the following
format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
-| state | 1 | uint8_t | Turn On/Off Fan:
0: Turn Off
1: Turn On |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| state | 1 | uint8_t | Turn On/Off Fan:
0: Turn Off
1: Turn On |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x09 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
**NOTE:** *This cmd data is saved to LiDAR's flash, and power down is not lost.*
@@ -1240,35 +1275,35 @@ In ‘return_list’, each return information has the following format:
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR Fan Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR Fan Configuration List |
In ‘config_list’, each LiDAR fan configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | -------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0A |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
| state | 17 | uint8_t | Turn On/Off Fan State:
0: Turn Off
1: Turn On |
### 0x0B Set LiDAR Return Mode
@@ -1277,34 +1312,34 @@ In ‘return_list’, each return information has the following format:
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR Return Mode Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR Return Mode Configuration List |
In ‘config_list’, each LiDAR return mode configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
-| mode | 1 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| mode | 1 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0B |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-| -------------- | ------------- | ----------- | ------------------------------------------------------------ |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code
This configuration is saved in Flash |
@@ -1314,36 +1349,36 @@ In ‘return_list’, each return information has the following format:
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR Return Mode Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR Return Mode Configuration List |
In ‘config_list’, each LiDAR return mode configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | -------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
-| mode | 17 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| mode | 17 | uint8_t | Return Mode:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
### 0x0D Set LiDAR IMU Data Push Frequency
@@ -1351,34 +1386,34 @@ In ‘return_list’, each return information has the following format:
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0D |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR IMU Frequency Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0D |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR IMU Frequency Configuration List |
In ‘config_list’, each LiDAR IMU Frequency configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
-| frequency | 1 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| frequency | 1 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0D |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0D |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-| -------------- | ------------- | ----------- | ------------------------------------------------------------ |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code
This configuration is saved in Flash |
@@ -1388,33 +1423,33 @@ In ‘return_list’, each return information has the following format:
request
-| CMD | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
-| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
-| | config_list | 3 | -- | LiDAR IMU Frequency Configuration List |
+| CMD | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x0C |
+| | count | 2 | uint8_t | Number of LiDAR to Configure Range: 1 ~ 27 |
+| | config_list | 3 | -- | LiDAR IMU Frequency Configuration List |
In ‘config_list’, each LiDAR IMU frequency configuration information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|------------------------|
-| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | -------------------- |
+| broadcast_code | 0 | uint8_t[16] | LiDAR Broadcast Code |
response
-| ACK | Name | Offset (byte) | Data Type | Description |
-|------|-------------|---------------|-----------|---------------------------------------|
-| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
-| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
+| ACK | Name | Offset (byte) | Data Type | Description |
+| ---- | ----------- | ------------- | --------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub Command: 0x02 |
+| | cmd_id | 1 | uint8_t | Command ID: 0x07 |
| | ret_code | 2 | uint8_t | Return Code:
0x00: Success
0x01: Fail |
-| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
-| | return_list | 4 | -- | Return Information List |
+| | count | 3 | uint8_t | Number of LiDAR to Set Range: 1 ~ 27 |
+| | return_list | 4 | -- | Return Information List |
In ‘return_list’, each return information has the following format:
-| Field | Offset (byte) | Data Type | Description |
-|----------------|---------------|-------------|---------------------------------------------|
+| Field | Offset (byte) | Data Type | Description |
+| -------------- | ------------- | ----------- | ---------------------------------------- |
| ret_code | 0 | uint8_t | LiDAR Return Code:
0x00: Success
0x01: Fail
0x02: Device not support |
-| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
-| frequency | 17 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
\ No newline at end of file
+| broadcast_code | 1 | uint8_t[16] | LiDAR Broadcast Code |
+| frequency | 17 | uint8_t | IMU Data Push Frequency:
0x00: 0Hz(Close IMU Data Push)
0x01: 200Hz |
\ No newline at end of file
diff --git a/Set-publish-frequency.md b/Set-publish-frequency.md
index ee0a3cd..a04917e 100644
--- a/Set-publish-frequency.md
+++ b/Set-publish-frequency.md
@@ -1,11 +1,16 @@
+**Set publish frequency**([在ROS驱动程序中设置发布频率](./zh/在ROS驱动程序中设置发布频率.md))
-# Set publish frequency
-## 1. Git clone livox_ros_driver
+
+[TOC]
+
+
+
+# 1. Git clone livox_ros_driver
`git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src`
-## 2. Set publish frequency
+# 2. Set publish frequency
Take the conversion of lvx files to rosbag files as an example :
@@ -13,11 +18,11 @@ If you need to convert rosbag data with the frequency to 10Hz, please set the

-## 3. Open a terminal window under this path
+# 3. Open a terminal window under this path
`../ws_livox`
-## 4. Convert lvx point cloud data file (v1.0/v1.1) to rosbag file
+# 4. Convert lvx point cloud data file (v1.0/v1.1) to rosbag file
livox_ros_driver supports the conversion of lvx pointcloud data files to rosbag files. Use the command as follows :
@@ -29,6 +34,6 @@ After replacing "/home/livox/test.lvx" in the above command with the local lvx d

-## 5. Playing the Rosbag data
+# 5. Playing the Rosbag data

diff --git a/The-installation-of-Livox-SDK-on-Linux-32-bit-system-and-Mac.md b/The-installation-of-Livox-SDK-on-Linux-32-bit-system-and-Mac.md
index 08dbe0c..8b711c5 100644
--- a/The-installation-of-Livox-SDK-on-Linux-32-bit-system-and-Mac.md
+++ b/The-installation-of-Livox-SDK-on-Linux-32-bit-system-and-Mac.md
@@ -1,3 +1,11 @@
+**The installation of Livox SDK on Linux 32-bit system and Mac**([在32位Linux系统和Mac系统中安装Livox SDK](./zh/在32位Linux系统和Mac系统中安装Livox SDK.md))
+
+
+
+[TOC]
+
+
+
# 1 Livox SDK API
Livox SDK API provides a set of C style functions which can be conveniently integrated in C/C++ programs. Please refer to the [Livox SDK API Reference](https://livox-sdk.github.io/Livox-SDK/) for further information.
diff --git a/Timestamp-Synchronization.md b/Timestamp-Synchronization.md
index b917694..74afb4b 100644
--- a/Timestamp-Synchronization.md
+++ b/Timestamp-Synchronization.md
@@ -46,7 +46,7 @@ Connect Livox LiDAR/Hub normally without additional wiring.
### 2.1.2 Attention
-Network environments with multiple master clocks are not supported. For the construction of master clock, please refer to Appendix [3.1 Set Up PTP Master Clock](#Appendix).
+Network environments with multiple master clocks are not supported. For the construction of master clock, please refer to Appendix [3.1 Set Up PTP Master Clock](#3.1).
### 2.1.3 Accuracy
@@ -82,7 +82,7 @@ Remarks: If the data output by the GPS module is 485 level, the TTL to 485 modul
#### 2.2.2.2 Configuration
-Mid firmware version: >= v03.07.0000, SDK version >= v2.1.0
+Mid firmware version: >= v03.07.0000, SDK version >= v2.0.0
**Use ROS driver**
@@ -178,49 +178,55 @@ LiDAR_time_last = LiDAR_time;
1 microsecond
-# Appendix
+# 3 Appendix
-## Set Up PTP Master Clock
+## 3.1 Set Up PTP Master Clock
-Address: [http://linuxptp.sourceforge.net](http://linuxptp.sourceforge.net)
+Address: [https://github.com/ptpd/ptpd](https://github.com/ptpd/ptpd)
Download, compile and install:
```bash
-git clone http://git.code.sf.net/p/linuxptp/code linuxptp
-cd linuxptp
+git clone https://github.com/ptpd/ptpd.git
+autoreconf -vi
+./configure
make
-sudo make install
+make install
```
-In order to run this software, you need Linux kernel version 3.0 or newer. Check whether your network interface supports PTP with the following command(example, network interface is 'eth0').
+Modify the configuration file client-e2e-socket.conf in the test folder according to your needs. You can use the following configuration:
-```bash
-ethtool -T eth0
+Add a network interface name, such as eth0:
+
+```
+; Network interface to use (required)
+ptpengine:interface = eth0
```
-This command shows whether a MAC supports hardware or software time stamping.
+Set the master clock function and set the parameters to masteronly:
-The following example output indicates support for hardware time stamping.
-
-
-
-The following example output indicates network interface not support for linuxptp/ptp4l, cannot be used.
-
-
-
- If MAC supports hardware time stamping, then run the following command:
-
-```bash
-sudo ptp4l -i eth0 -l 6 -m
+```
+; Options: none slaveonly masteronly masterslave
+ptpengine:preset = masteronly
```
-When a sync packet appears on the network, it indicates that the master clock of ptp4l is successfully turned on.
+Set clock_class to a value lower than 128:
-Use the following command, PTP Hardware Clock is synchronized to system clock.
+```
+; Clock class - announced in master state. Always 255 for slave-only mode.
+; Minimum, maximum and default values are controlled by presets.
+; If set to 13 (application specific time source), announced
+; time scale is always set to ARB. This setting controls the
+; states a PTP port can be in. If below 128, port will only
+; be in MASTER or PASSIVE states (master only). If above 127,
+; port will be in MASTER or SLAVE states.
+ptpengine:clock_class = 126
+```
-`phc2sys` usage: http://manpages.ubuntu.com/manpages/cosmic/man8/phc2sys.8.html
+Then run the following command:
```bash
-sudo phc2sys -c eth0 -s CLOCK_REALTIME -O 0
-```
\ No newline at end of file
+ptpd2 -c test/client-e2e-socket.conf
+```
+
+When a sync packet appears on the network, it indicates that the master clock of ptpd is successfully turned on.
\ No newline at end of file
diff --git a/images_timesync/RS485_sequence_digram.png b/images_timesync/RS485_sequence_digram.png
new file mode 100644
index 0000000..3c70669
Binary files /dev/null and b/images_timesync/RS485_sequence_digram.png differ
diff --git a/images_timesync/gps_sync.png b/images_timesync/gps_sync.png
new file mode 100644
index 0000000..b335717
Binary files /dev/null and b/images_timesync/gps_sync.png differ
diff --git a/images_timesync/gps_ttl_horizon.png b/images_timesync/gps_ttl_horizon.png
new file mode 100644
index 0000000..abab1d2
Binary files /dev/null and b/images_timesync/gps_ttl_horizon.png differ
diff --git a/images_timesync/gps_ttl_hub.png b/images_timesync/gps_ttl_hub.png
new file mode 100644
index 0000000..c325c9d
Binary files /dev/null and b/images_timesync/gps_ttl_hub.png differ
diff --git a/images_timesync/gps_ttl_mid.png b/images_timesync/gps_ttl_mid.png
new file mode 100644
index 0000000..ed86618
Binary files /dev/null and b/images_timesync/gps_ttl_mid.png differ
diff --git a/images_timesync/not_support.png b/images_timesync/not_support.png
new file mode 100644
index 0000000..8d9314c
Binary files /dev/null and b/images_timesync/not_support.png differ
diff --git a/images_timesync/ptp_1588.png b/images_timesync/ptp_1588.png
new file mode 100644
index 0000000..fcfa2bd
Binary files /dev/null and b/images_timesync/ptp_1588.png differ
diff --git a/images_timesync/sequence_diagram.png b/images_timesync/sequence_diagram.png
new file mode 100644
index 0000000..a7bec53
Binary files /dev/null and b/images_timesync/sequence_diagram.png differ
diff --git a/images_timesync/sequence_diagram_Hub.png b/images_timesync/sequence_diagram_Hub.png
new file mode 100644
index 0000000..977e9d9
Binary files /dev/null and b/images_timesync/sequence_diagram_Hub.png differ
diff --git a/images_timesync/sequence_diagram_Lidar.png b/images_timesync/sequence_diagram_Lidar.png
new file mode 100644
index 0000000..9371586
Binary files /dev/null and b/images_timesync/sequence_diagram_Lidar.png differ
diff --git a/images_timesync/support.png b/images_timesync/support.png
new file mode 100644
index 0000000..f7ff503
Binary files /dev/null and b/images_timesync/support.png differ
diff --git a/images_timesync/utc_time.png b/images_timesync/utc_time.png
new file mode 100644
index 0000000..943472a
Binary files /dev/null and b/images_timesync/utc_time.png differ
diff --git a/images_timesync/viewer_gps.png b/images_timesync/viewer_gps.png
new file mode 100644
index 0000000..9bef5b3
Binary files /dev/null and b/images_timesync/viewer_gps.png differ
diff --git a/images_timesync/viewer_ptp.png b/images_timesync/viewer_ptp.png
new file mode 100644
index 0000000..f400b63
Binary files /dev/null and b/images_timesync/viewer_ptp.png differ
diff --git a/images_timesync/wireshark_ptp.png b/images_timesync/wireshark_ptp.png
new file mode 100644
index 0000000..cd4119c
Binary files /dev/null and b/images_timesync/wireshark_ptp.png differ
diff --git a/livox device time synchronization manual.md b/livox device time synchronization manual.md
new file mode 100644
index 0000000..f00103e
--- /dev/null
+++ b/livox device time synchronization manual.md
@@ -0,0 +1,342 @@
+
+
+**Livox device time synchronization**([livox设备时间同步说明中文文档](./livox设备时间同步说明.md))
+
+
+
+[TOC]
+
+
+
+# 1 Time synchronization instructions
+
+Livox devices support 3 time synchronization methods:
+
+PTP: IEEE 1588v2.0 PTP network protocol synchronization;
+
+GPS: Pulse per second + GPRMC time data, forming a GPS time synchronization method;
+
+PPS: Pulse synchronization per second, requires the upper application program to obtain the time information of each pulse through other channels (such as uart) and correct the point cloud time. At present, only LiDAR supports this synchronization method, and because the usage is relatively complicated, it is not recommended for users to use this method for LiDAR time synchronization.
+
+Synchronization methods supported by different devices:
+
+| Devices | Supported synchronization method |
+| ----------- | ------------------------------------------- |
+| Livox LiDAR | 1. PTP v2
2. GPS
3. PPS(not recommanded) |
+| Livox Hub | 1. PTP v2
2. GPS |
+
+
+
+## 1.1 Synchronization principle
+
+### 1.1.1 PTP time synchronization principle
+
+The synchronization process uses the Delay request-response mechanism (two steps) of IEEE 1588v2.0 PTP. The Livox device acts as the slave and synchronizes the PTP time with the master clock device.
+
+
+
+The master and slave clocks obtain the t1, t2, t3, and t4 time through the interaction of Sync, Follow_Up, Delay_Req, Delay_Resp these data packets, and the transmission path delay and the offset of the two clocks are calculated as follows:
+
+Transmission path delay: Delay = [(t4 – t1) – (t3 – t2)]/2
+
+Time offset: Offset = (t2 - t1) - Delay = [(t2 – t1) + (t3 – t4)]/2
+
+### 1.1.2 GPS time synchronization principle
+
+The PPS port of the GPS clock source sends a hardware pulse (PPS signal) once per second, and then the data port sends the time information corresponding to the rising edge of this pulse (GPRMC format) once.
+
+After the Livox device receives the rising edge of the PPS signal and parses the correct time information from the GPRMC data, it will set the point cloud time as the GPS time, and keep this time reference for continuous accumulation to achieve time synchronization with the GPS device.
+
+- Livox Hub can directly receive RS485 level GPRMC signal;
+
+- Livox LiDAR cannot directly receive GPRMC signals, it needs to connect the GPRMC data port to the PC, and then send it to the radar through the SDK protocol;
+
+
+
+The timing requirements of PPS signal and GPRMC signal:
+
+| Time | Description | Effective Range | Recommended Value |
+| ---- | --------------------------------------- | ---------------- | -------------- |
+| t0 | Interval between rising edges of adjacent twice second pulse | 900 ms ~ 1100 ms | 1000 ms |
+| t1 | High level time of each second pulse | 5 ms ~ 900 ms | 10 ms ~ 200 ms |
+| t2 | GGPRMC transmission time (baud rate: 9600bps) | ≈ 70 ms | 70 ms |
+| t3 | The delay of GPRMC data transmission relative to the rising edge of the pulse | 0 ms ~ 900 ms | 0 ms ~ 430 ms |
+
+
+
+## 1.2 Application scenario
+
+**PTP:**
+
+In the absence of GPS and PPS hardware signals, PTP v2 can be used for time synchronization between Livox LiDAR/Hub and other devices. This method requires minimal external hardware support, and only requires a master clock device in the entire network.
+
+**GPS:**
+
+This synchronization method can be used when Livox Hub is connected to multiple LiDARs. Livox Hub needs to be connected to the PPS signal of the GPS receiver and the time signal in GPRMC format. At this time, the LiDAR point cloud time will be automatically corrected to the GPS time.
+
+Livox LiDAR can also use GPS synchronization, but it needs to connect the GPRMC signal to the PC, and then send the time data to the LiDAR through the SDK protocol.
+
+# 2 Instructions of use
+
+## 2.1 PTP
+
+When Livox LiDAR or Hub is connected to a network with a ptp master clock, the device will automatically synchronize its time to the master clock.
+
+### 2.1.1 Configuration and use
+
+**Step one: Check whether the master clock in the network is normal**
+
+For the method of configuring the master clock on the PC, please refer to the appendix [Configuring the PTP master clock](#Appendix);
+
+If there are datas of Sync and Follow_Up in the network, it means that the PTP master clock source is working normally:
+
+
+
+**Step 2: Connect Livox LiDAR/Hub**
+
+Livox LiDAR/Hub can be connected normally through the network cable, no additional wiring is required.
+
+**Step 3: How to check the device is using PTP 1588 synchronization**
+
+1、By checking the timestamp_type data in the point cloud data packet header, the point cloud data protocol: https://github.com/Livox-SDK/Livox-SDK/wiki/Livox-SDK-Communication-Protocol
+
+If timestamp_type is 1, it means that the device is performing PTP time synchronization:
+
+| timestamp_type | data_type | timestamp type |
+| -------------- | --------- | ---------- |
+| 1 | uint64_t | Nanosecond(ns) |
+
+2、Or check the Settings option in the Livox Viewer host computer, the Sync State in the figure below indicates that the Hub is using ptp 1588 synchronization.
+
+
+
+### 2.1.2 Precautions
+
+- PTP synchronization has the highest priority. When PTP, PPS or GPS are available at the same time, PTP network synchronization will be selected priority;
+- Does not support network environments with multiple master clocks;
+- Hundred nanoseconds accuracy;
+
+## 2.2 GPS
+
+In order to be compatible with LiDAR hardware from other manufacturers, Livox devices also support GPS time synchronization.
+
+Since Livox has different types of hardware (LiDAR/Hub), when using GPS synchronization, the hardware interfaces can be divided into 3 categories:
+
+1. Use Livox Hub;
+2. LiDAR connected with Livox Converter 1.0 (such as Mid-40, Mid-100);
+3. LiDAR connected with Livox Converter 2.0 (such as Tele-15, Horizon);
+
+The following will introduce how to use these three interfaces to synchronize GPS time.
+
+### 2.2.1 Configuration and use
+
+#### 2.2.1.1 Livox Hub
+
+##### Hardware connection
+
+If the GPS module's time signal and PPS signal are both RS485 level, directly connect the line to the GPS time synchronization port (GPS sync port) of Hub.
+
+If the time signal of the GPS module and the PPS signal are both TTL level, the following level conversion is required before the signal can be connected to the GPS time synchronization port of Hub (GPS sync port).
+
+
+
+Remarks:
+
+When the Hub uses GPS synchronization, there is no need to configure the SDK software.
+
+#### 2.2.1.2 Livox Converter 1.0
+
+Currently, the default devices using Livox Converter 1.0 include:
+
+1. Mid-40
+2. Mid-100
+
+##### Hardware connection
+
+Connect the GPS module's time signal (GPRMC) to the PC through the TTL-to-usb module, and connect the PPS signal to the Sync Port of the LiDAR adapter box.
+
+
+
+If the PPS output by the GPS module is an RS485 level signal, the TTL to 485 module can be omitted in the above figure.
+
+##### Software configuration
+
+Since the PC needs to receive the GPRMC data and then send it to LiDAR through the SDK protocol, the product firmware version has the following requirements:
+
+- Mid firmware version: >= **v03.07.0000**
+- SDK version >= **v2.1.0**
+
+**When using ROS driver**
+
+1. Connect the hardware correctly according to the above introduction;
+
+2. Check the port name of the usb module connected to the PC, such as `/dev/ttyUSB0`,add to the "device_name" of the "timesync_config" in the file [livox_lidar_config.json](https://github.com/Livox-SDK/livox_ros_driver/blob/master/livox_ros_driver/config/livox_lidar_config.json) ,and then configure "enable_timesync" to 'true',the baud rate "baudrate_index" can be set to specific value referring to https://github.com/Livox-SDK/livox_ros_driver ;
+
+```
+ "timesync_config": {
+ "enable_timesync": true,
+ "device_name": "/dev/ttyUSB0",
+ "comm_device_type": 0,
+ "baudrate_index": 2,
+ "parity_index": 0
+```
+
+3. Run launch file;
+
+**When using SDK only**
+
+The following link is a program for receiving and analyzing GPRMC data and sending it to LiDAR through the SDK protocol:
+
+[https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync](https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync)
+
+#### 2.2.1.3 Livox Converter 2.0
+
+Currently, the standard equipments using Livox Converter 2.0 in the box include:
+
+1. Horizon
+2. Tele-15
+
+##### Hardware connection
+
+Connect the GPS module's time signal (GPRMC) to the PC through the TTL-to-usb module, and connect the PPS signal to the Sync Port of the LiDAR adapter box.
+
+
+
+##### Software configuration
+
+Since the PC needs to receive the GPRMC data and then send it to LiDAR through the SDK protocol, the product firmware version has the following requirements:
+
+- Horizon firmware version: >= **v06.06.0000**
+- Tele-15 firmware version: >= **v07.09.0000**
+- SDK version >= **v2.1.0**
+
+**When using ROS driver**
+
+1. Connect the hardware correctly according to the above introductions;
+
+2. Check the port name of the usb module connected to the PC, such as `/dev/ttyUSB0`, add to the "device_name" of "timesync_config" in the file [livox_lidar_config.json](https://github.com/Livox-SDK/livox_ros_driver/blob/master/livox_ros_driver/config/livox_lidar_config.json) ,and then set "enable_timesync" to 'true',baud rate "baudrate_index" can be set to specific value referring to https://github.com/Livox-SDK/livox_ros_driver ;
+
+```
+ "timesync_config": {
+ "enable_timesync": true,
+ "device_name": "/dev/ttyUSB0",
+ "comm_device_type": 0,
+ "baudrate_index": 2,
+ "parity_index": 0
+```
+
+3. Run launch file;
+
+**Using SDK only**
+
+The following link is a program for receiving and analyzing GPRMC data and sending it to LiDAR through the SDK protocol:
+
+[https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync](https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync)
+
+### 2.2.3 Status check
+
+1. By viewing the timestamp_type data in the point cloud data packet header, the point cloud data protocol: https://github.com/Livox-SDK/Livox-SDK/wiki/Livox-SDK-Communication-Protocol
+
+If timestamp_type is 3, it means that the device is in GPS time synchronization:
+
+| timestamp_type | data_type | time type |
+| -------------- | -------------- | ----------- |
+| 3 | UTC(8 Bytes) | UTC time format |
+
+UTC time format:
+
+
+
+2. Or in the Livox Viewer host computer, check the Settings option, the Sync State in the figure below indicates that the Hub is using GPS synchronization.
+
+
+
+
+### 2.2.3 Precautions
+
+- Normally, the GPS module can output the PPS signal and time signal normally after receiving the GPS signal. When in use, you need to ensure that the GPS signal is stable;
+- Currently the time signal only supports the two formats: GPRMC and GNRMC;
+- 1 us level accuracy
+
+## 2.3 PPS
+
+**Due to the complexity of this usage, users are not recommended to use this synchronization method**
+
+Every time Livox LiDAR receives the rising edge of the PPS signal, it will set the point cloud time at the current moment to 0, and then restart timing until the next PPS pulse arrives. We can use this feature to realize the synchronization of the PPS pulse to the LiDAR time.
+
+The following is the pseudo code to implement this process:
+
+```c
+// PPS Time Synchronization
+static uint64_t lidar_time_last;
+static uint64_t lidar_time_real;
+
+// 1. Read the PPS rising edge time, Unit is nanosecond.
+uint64_t pps_time_ns = get_pps_rising_nsecond();
+// 2. Read LiDAR point time, Unit is nanosecond.
+uint64_t lidar_time = get_lidar_pack_time();
+// 3. Update real time.
+if (lidar_time < lidar_time_last)
+{
+ //LiDAR time jump indicates the generation of PPS rising edge.
+ lidar_time_real = pps_time_ns + lidar_time%(1000000000);
+}
+else
+{
+ lidar_time_real += lidar_time - lidar_time_last;
+}
+//Update history
+lidar_time_last = lidar_time;
+```
+
+Remarks:
+
+Users need to obtain the time information of the rising edge of the PPS through other methods, corresponding to the get_pps_rising_nsecond() interface in the above code.
+
+
+# Appendix
+
+## Configure PTP master clock
+
+Address: [http://linuxptp.sourceforge.net](http://linuxptp.sourceforge.net)
+
+Download, compile and install:
+
+```bash
+git clone http://git.code.sf.net/p/linuxptp/code linuxptp
+cd linuxptp
+make
+sudo make install
+```
+
+If you want ptp4l to work normally, you need the system's Linux kernel version 3.0 or later. Use the following command to check whether the network card supports the software/hardware timestamp function (for example: query the status of the network card'eth0').
+
+```bash
+ethtool -T eth0
+```
+
+In the example below, it shows that the eth0 network card supports hardware time stamping.
+
+
+
+In the example below, the wlan0 network card does not support hardware and software timestamps, linuxptp/ptp4l cannot work normally.
+
+
+
+Run the following command to enable the master clock function of ptp4l:
+
+```bash
+sudo ptp4l -i eth0 -l 6 -m
+```
+
+If the `Sync Message` data appears in the network, it means that the master clock function of the ptp4l program is operating normally:
+
+
+You can also use the following command to make sure that PTP hardware clock is synchronized to system clock:
+
+For more details of the usage, please refer to the [phc2sys link](http://manpages.ubuntu.com/manpages/cosmic/man8/phc2sys.8.html)
+
+```bash
+sudo phc2sys -c eth0 -s CLOCK_REALTIME -O 0
+```
+After completing the above steps, the LiDAR time and the PC system time can be synchronized through ptp4l.
\ No newline at end of file
diff --git a/livox设备时间同步说明.md b/livox设备时间同步说明.md
new file mode 100644
index 0000000..bb7c807
--- /dev/null
+++ b/livox设备时间同步说明.md
@@ -0,0 +1,341 @@
+
+
+**Livox设备时间同步**([livox device time synchronization manual](./livox device time synchronization manual.md))
+
+
+
+[TOC]
+
+
+
+# 1 时间同步说明
+
+Livox设备支持3种时间同步方式:
+
+PTP:IEEE 1588v2.0 PTP 网络协议同步;
+
+GPS:秒脉冲+GPRMC时间数据,组成GPS时间同步方式;
+
+PPS:秒脉冲同步,需要上层应用程序通过其他途径(如:uart)获取每个脉冲的时间信息,并修正点云时间。目前仅LiDAR支持这种同步方式,且由于用法较为复杂,不推荐用户使用这种方式进行LiDAR时间的同步。
+
+不同设备支持的同步方式:
+
+| 设备 | 支持的同步方式 |
+| ----------- | ------------------------------------------- |
+| Livox LiDAR | 1. PTP v2
2. GPS
3. PPS(不推荐使用) |
+| Livox Hub | 1. PTP v2
2. GPS |
+
+
+
+## 1.1 同步原理
+
+### 1.1.1 PTP时间同步原理
+
+同步过程使用IEEE 1588v2.0 PTP的Delay request-response机制(two steps),Livox设备作为slave端,和master时钟设备进行ptp时间同步。
+
+
+
+master和slave时钟通过Sync、Follow_Up、Delay_Req、Delay_Resp这几个数据包的交互,得到t1、t2、t3、t4时间,通过如下计算得到传输路径延迟和两时钟的偏移:
+
+传输路径延时:Delay = [(t4 – t1) – (t3 – t2)]/2
+
+时间偏移:Offset = (t2 - t1) - Delay = [(t2 – t1) + (t3 – t4)]/2
+
+### 1.1.2 GPS时间同步原理
+
+GPS时钟源的PPS端口每秒发送一次硬件脉冲(PPS信号),随后数据端口发送一次对应这个脉冲上升沿的时间信息(GPRMC格式)。
+
+Livox设备接收到PPS信号上升沿,并由GPRMC数据解析出正确的时间信息后,会设置点云时间为GPS时间,并保持此时间基准持续累加,来实现和GPS设备的时间同步。
+
+- Livox Hub可以直接接收RS485电平的GPRMC信号;
+
+- Livox LiDAR无法直接接收GPRMC信号,需要将GPRMC数据端口接入PC,然后通过sdk协议发送给雷达;
+
+
+
+PPS信号和GPRMC信号的时序要求:
+
+| 时间 | 描述 | 有效范围 | 推荐值 |
+| ---- | --------------------------------------- | ---------------- | -------------- |
+| t0 | 相邻两次秒脉冲上升沿的间隔 | 900 ms ~ 1100 ms | 1000 ms |
+| t1 | 秒脉冲的高电平时间 | 5 ms ~ 900 ms | 10 ms ~ 200 ms |
+| t2 | GPRMC的传输时间(波特率:9600bps) | ≈ 70 ms | 70 ms |
+| t3 | GPRMC数据开始发送相对于脉冲上升沿的延迟 | 0 ms ~ 900 ms | 0 ms ~ 430 ms |
+
+
+
+## 1.2 应用场景
+
+**PTP:**
+
+在没有GPS和PPS硬件信号的情况下,PTP v2可用于Livox LiDAR/Hub和其他设备之间的时间同步。这种方法所需要的外部硬件支持最少,只需要在整个网络中有一个master时钟设备即可。
+
+**GPS:**
+
+Livox Hub接入多个LiDAR时可以使用这种同步方式,Livox Hub需要接入GPS接收器的PPS信号,以及GPRMC格式的时间信号,此时LiDAR点云时间会自动修正成GPS时间。
+
+Livox LiDAR也可以使用GPS同步,但需要将GPRMC信号接入PC,然后通过SDK协议将时间数据发送给LiDAR。
+
+# 2 使用方法
+
+## 2.1 PTP
+
+当Livox LiDAR或者Hub连接到有ptp master时钟的网络中时,设备会自动同步自己的时间到主时钟。
+
+### 2.1.1 配置和使用
+
+**第一步:检查网络中的master时钟是否正常:**
+
+PC上配置主时钟的方法可参考附录 [配置PTP主时钟](#附录);
+
+如果网络中有Sync、Follow_Up这两个数据,则说明存在PTP master时钟源,且正常工作:
+
+
+
+**第二步:连接Livox LiDAR/Hub**
+
+通过网线正常连接Livox LiDAR/Hub即可,无需额外接线。
+
+**第三步:如何查看设备在使用PTP 1588同步**
+
+1、通过查看点云数据包头中的timestamp_type数据,点云数据协议:https://github.com/Livox-SDK/Livox-SDK/wiki/Livox-SDK-Communication-Protocol
+
+如果timestamp_type为1,则说明设备正在进行PTP时间同步:
+
+| timestamp_type | data_type | 时间类型 |
+| -------------- | --------- | ---------- |
+| 1 | uint64_t | 纳秒(ns) |
+
+2、或者在Livox Viewer上位机中,查看Settings选项,下图的Sync State表明Hub在使用ptp 1588同步。
+
+
+
+### 2.1.2 注意事项
+
+- PTP同步优先级最高,当PTP、PPS或GPS同时可用时,会优先使用PTP网络同步;
+- 不支持具有多个主时钟的网络环境;
+- 百纳秒精度;
+
+## 2.2 GPS
+
+为了兼容其他厂商的LiDAR硬件,Livox设备也支持GPS时间同步。
+
+由于Livox有不同种类的硬件(LiDAR/Hub),在使用GPS同步时,可以将硬件接口分为3类:
+
+1. 使用Livox Hub;
+2. 使用Livox Converter 1.0连接的LiDAR(如:Mid-40、Mid-100);
+3. 使用Livox Converter 2.0连接的LiDAR(如:Tele-15、Horizon);
+
+下面将分别介绍如何使用这3种接口进行GPS时间同步。
+
+### 2.2.1 配置和使用
+
+#### 2.2.1.1 Livox Hub
+
+##### 硬件连接
+
+如果GPS模块的时间信号和PPS信号是RS485电平,直接将线接入Hub的GPS时间同步口(GPS sync port)即可。
+
+如果GPS模块的时间信号和PPS信号是TTL电平,则需要进行如下的电平转换后,才能将信号接入Hub的GPS时间同步口(GPS sync port)。
+
+
+
+备注:
+
+Hub使用GPS同步时,不需要进行SDK软件的配置。
+
+#### 2.2.1.2 Livox Converter 1.0
+
+目前默认使用Livox Converter 1.0的设备有:
+
+1. Mid-40
+2. Mid-100
+
+##### 硬件连接
+
+将GPS模块的时间信号(GPRMC)通过TTL转usb模块接入PC,PPS信号接入LiDAR转接盒同步口(Sync Port)。
+
+如果GPS模块输出的PPS为RS485电平的信号,则上图可以省略TTL转485模块。
+
+##### 软件配置
+
+由于需要PC接收GPRMC数据,然后通过SDK协议发送给LiDAR,对产品的固件版本有如下要求:
+
+- Mid firmware version: >= **v03.07.0000**
+- SDK version >= **v2.1.0**
+
+**使用ROS driver的情况**
+
+1、按照上面的介绍正确连接硬件;
+
+2、查看接入PC的usb模块的端口名称,例如 `/dev/ttyUSB0`,添加到 [livox_lidar_config.json](https://github.com/Livox-SDK/livox_ros_driver/blob/master/livox_ros_driver/config/livox_lidar_config.json) 文件中"timesync_config"的"device_name",然后将"enable_timesync"配置为 `true`,波特率"baudrate_index"可以参考 https://github.com/Livox-SDK/livox_ros_driver 来配置具体数值;
+
+```
+ "timesync_config": {
+ "enable_timesync": true,
+ "device_name": "/dev/ttyUSB0",
+ "comm_device_type": 0,
+ "baudrate_index": 2,
+ "parity_index": 0
+```
+
+3、运行launch file;
+
+**只使用SDK的情况 **
+
+下面的链接是实现GPRMC数据接收和解析,并通过SDK协议发送给LiDAR的程序:
+
+[https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync](https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync)
+
+#### 2.2.1.3 Livox Converter 2.0
+
+目前包装盒中标配使用Livox Converter 2.0的设备有:
+
+1. Horizon
+2. Tele-15
+
+##### 硬件连接
+
+将GPS模块的时间信号(GPRMC)通过TTL转usb模块接入PC,PPS信号接入LiDAR转接盒同步口(Sync Port)。
+
+
+
+##### 软件配置
+
+由于需要PC接收GPRMC数据,然后通过SDK协议发送给LiDAR,对产品的固件版本有如下要求:
+
+- Horizon firmware version: >= **v06.06.0000**
+- Tele-15 firmware version: >= **v07.09.0000**
+- SDK version >= **v2.1.0**
+
+**使用ROS driver的情况**
+
+1、按照上面的介绍正确连接硬件;
+
+2、查看接入PC的usb模块的端口名称,例如 `/dev/ttyUSB0`,添加到 [livox_lidar_config.json](https://github.com/Livox-SDK/livox_ros_driver/blob/master/livox_ros_driver/config/livox_lidar_config.json) 文件中"timesync_config"的"device_name",然后将"enable_timesync"配置为 `true`,波特率"baudrate_index"可以参考 https://github.com/Livox-SDK/livox_ros_driver 来配置具体数值;
+
+```
+ "timesync_config": {
+ "enable_timesync": true,
+ "device_name": "/dev/ttyUSB0",
+ "comm_device_type": 0,
+ "baudrate_index": 2,
+ "parity_index": 0
+```
+
+3、运行launch file;
+
+**只使用SDK的情况 **
+
+下面的链接是实现GPRMC数据接收和解析,并通过SDK协议发送给LiDAR的程序:
+
+[https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync](https://github.com/Livox-SDK/Livox-SDK/tree/master/sample_cc/lidar_utc_sync)
+
+### 2.2.3 状态检查
+
+1、通过查看点云数据包头中的timestamp_type数据,点云数据协议:https://github.com/Livox-SDK/Livox-SDK/wiki/Livox-SDK-Communication-Protocol
+
+如果timestamp_type为3,则说明设备正在进行GPS时间同步:
+
+| timestamp_type | data_type | 时间类型 |
+| -------------- | -------------- | ----------- |
+| 3 | UTC(8 Bytes) | UTC时间格式 |
+
+UTC时间格式:
+
+
+
+2、或者在Livox Viewer上位机中,查看Settings选项,下图的Sync State表明Hub在使用GPS同步。
+
+
+
+
+
+### 2.2.3 注意事项
+
+- 通常情况下,GPS模块接收到GPS信号,才能正常输出PPS信号和时间信号。在使用时,需要确保GPS信号是稳定的;
+- 目前时间信号只支持GPRMC/GNRMC这两种格式;
+- 1 us级别精度
+
+## 2.3 PPS
+
+**由于这个用法较为复杂,不建议用户使用这种同步方式**
+
+Livox LiDAR每次接收到PPS信号的上升沿后,会将当前时刻的点云时间置为0,然后重新开始计时直到下一个PPS脉冲到来。我们可以利用这个特性,来实现PPS脉冲对LiDAR时间的同步。
+
+下面是实现这个流程的伪代码:
+
+```c
+// PPS Time Synchronization
+static uint64_t lidar_time_last;
+static uint64_t lidar_time_real;
+
+// 1. Read the PPS rising edge time, Unit is nanosecond.
+uint64_t pps_time_ns = get_pps_rising_nsecond();
+// 2. Read LiDAR point time, Unit is nanosecond.
+uint64_t lidar_time = get_lidar_pack_time();
+// 3. Update real time.
+if (lidar_time < lidar_time_last)
+{
+ //LiDAR time jump indicates the generation of PPS rising edge.
+ lidar_time_real = pps_time_ns + lidar_time%(1000000000);
+}
+else
+{
+ lidar_time_real += lidar_time - lidar_time_last;
+}
+//Update history
+lidar_time_last = lidar_time;
+```
+
+备注:
+
+用戶需要通过其他方式获得PPS上升沿的时间信息,对应上述代码中的get_pps_rising_nsecond()接口。
+
+# 附录
+
+## 配置PTP主时钟
+
+地址:[http://linuxptp.sourceforge.net](http://linuxptp.sourceforge.net)
+
+下载,编译和安装:
+
+```bash
+git clone http://git.code.sf.net/p/linuxptp/code linuxptp
+cd linuxptp
+make
+sudo make install
+```
+
+如果要让ptp4l正常工作,需要系统的Linux kernel version 3.0或者更新版本。通过下面的指令来检查网卡是否支持软件/硬件时间戳功能(如:查询网卡 'eth0' 的状态)。
+
+```bash
+ethtool -T eth0
+```
+
+下图的例子中,表明eth0网卡支持硬件时间戳。
+
+
+
+下图的例子中wlan0网卡不支持硬件和软件时间戳,linuxptp/ptp4l不能正常工作。
+
+
+
+运行如下指令,开启ptp4l的master时钟功能:
+
+```bash
+sudo ptp4l -i eth0 -l 6 -m
+```
+
+如果网络中出现 `Sync Message` 数据,说明ptp4l程序的master时钟功能正常运行:
+
+
+
+可以使用如下命令让系统时间和PTP硬件时钟同步:
+
+如果需要更多相关的信息, 请参考 [phc2sys 链接](http://manpages.ubuntu.com/manpages/cosmic/man8/phc2sys.8.html)
+
+```bash
+sudo phc2sys -c eth0 -s CLOCK_REALTIME -O 0
+```
+完成以上步骤,即可通过ptp4l实现雷达时间和PC本地系统时间的同步。
\ No newline at end of file
diff --git a/zh/在32位Linux系统和Mac系统中安装Livox SDK.md b/zh/在32位Linux系统和Mac系统中安装Livox SDK.md
new file mode 100644
index 0000000..90e02c9
--- /dev/null
+++ b/zh/在32位Linux系统和Mac系统中安装Livox SDK.md
@@ -0,0 +1,97 @@
+**在32位Linux系统和Mac系统中安装Livox SDK**([The installation of Livox SDK on Linux 32-bit system and Mac](../The-installation-of-Livox-SDK-on-Linux-32-bit-system-and-Mac.md))
+
+
+
+[TOC]
+
+
+
+# 1. Livox SDK API
+
+Livox SDK API 提供了一种C语言样式的函数,方便集成到C/C++程序中。如需更多信息,请查阅[Livox SDK API Reference](https://livox-sdk.github.io/Livox-SDK/)。
+
+## 1.1 安装
+
+下面以在Ubuntu 16.04/14.04 32-bit和Mac系统中安装过程为例。
+
+### 1.1.1 Ubuntu 16.04/14.04 32-bit LTS
+
+#### 安装依赖
+
+Livox SDK需要以下依赖 [CMake 3.0.0+](https://cmake.org/), [Apache Portable Runtime (APR) 1.61+](http://apr.apache.org/) 和 [Boost 1.54+](https://www.boost.org/)。需要用apt来安装boost、cmake:
+
+```
+sudo apt install cmake libboost-atomic-dev libboost-system-dev
+```
+
+在 [Apache Portable Runtime (APR) 1.61+](http://apr.apache.org/) 下载最新的apr linux源码:
+
+```
+tar -zxvf apr-1.X.X.tar.gz
+cd apr-1.X.X
+./configure --prefix=/usr/local/apr --disable-lfs
+make && sudo make install
+```
+
+#### 编译Livox SDK
+
+在Livox SDK目录中,运行以下命令来编译工程:
+
+```
+git clone https://github.com/Livox-SDK/Livox-SDK.git
+cd Livox-SDK/build
+PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/apr/lib/pkgconfig/ && export PKG_CONFIG_PATH
+cmake ..
+make
+sudo make install
+```
+
+由于 PKG_CONFIG_PATH 只在当前终端窗口有效,所以每个新的窗口都需要运行`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/apr/lib/pkgconfig/ && export PKG_CONFIG_PATH` ,除非在 .bashrc 文件中加入这一行作为环境变量。
+
+### 1.1.2 Mac
+
+#### 安装依赖
+
+Livox SDK需要以下依赖 [CMake 3.0.0+](https://cmake.org/), [Apache Portable Runtime (APR) 1.61+](http://apr.apache.org/) 和 [Boost 1.54+](https://www.boost.org/)。可以使用brew来安装这些依赖:
+
+```
+brew install cmake apr boost
+```
+
+然后运行以下命令:
+
+```
+brew info apr
+```
+
+可以看到以下信息并获取apr路径:
+
+```
+apr: stable 1.X.X (bottled) [keg-only]
+Apache Portable Runtime library
+https://apr.apache.org/
+/usr/local/Cellar/apr/1.X.X (XX files, X.XMB)
+ Poured from bottle on XXXX-XX-XX at XX:XX:XX
+From: https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/apr.rb
+==> Caveats
+apr is keg-only, which means it was not symlinked into /usr/local,
+because Apple's CLT package contains apr.
+
+If you need to have apr first in your PATH run:
+ echo 'export PATH="/usr/local/opt/apr/bin:$PATH"' >> ~/.bash_profile
+```
+
+#### 编译Livox SDK
+
+在Livox SDK目录中,运行以下命令来编译工程:
+
+```
+git clone https://github.com/Livox-SDK/Livox-SDK.git
+cd Livox-SDK/build
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/Cellar/apr/1.X.X/libexec/lib/pkgconfig
+cmake ..
+make
+sudo make install
+```
+
+由于 PKG_CONFIG_PATH 只在当前终端窗口有效,所以每个新的窗口都需要运行以上的命令,除非在 .bash_profile 文件中加入这一行作为环境变量。
diff --git a/zh/在ROS驱动程序中设置发布频率.md b/zh/在ROS驱动程序中设置发布频率.md
new file mode 100644
index 0000000..b4ddfac
--- /dev/null
+++ b/zh/在ROS驱动程序中设置发布频率.md
@@ -0,0 +1,39 @@
+**在Ros中设置发布频率**([Set publish frequency](../Set-publish-frequency.md))
+
+
+
+[TOC]
+
+
+
+# 1. Git clone livox_ros_driver
+
+`git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src`
+
+# 2. 设置发布频率
+
+以lvx文件到rosbag文件的转换为例:
+
+如果需要设置转换为rosbag数据的频率为10Hz,可以在 "../ws_livox/src/livox_ros_driver/launch/lvx_to_rosbag.launch file"文件中将‘publish_freq’参数设置为10.0。同理,可以将其设置成需要的频率。
+
+
+
+# 3. 在以下路径打开终端窗口
+
+`../ws_livox`
+
+# 4. 将lvx点云文件(v1.0/v1.1)转换为rosbag文件
+
+livox_ros_driver支持将lvx点云数据转换为rosbag文件。使用以下命令:
+
+`roslaunch livox_ros_driver lvx_to_rosbag.launch lvx_file_path:="/home/livox/test.lvx"`
+
+将上述命令中"/home/livox/test.lvx"替换为本地lvx文件的路径之后,即可以运行;如果转换成功,在上述路径下将会产生同名的rosbag格式的文件。
+
+
+
+
+
+# 5. 播放rosbag数据
+
+
diff --git a/zh/如何在ROS驱动程序下使用lvx文件.md b/zh/如何在ROS驱动程序下使用lvx文件.md
new file mode 100644
index 0000000..05118db
--- /dev/null
+++ b/zh/如何在ROS驱动程序下使用lvx文件.md
@@ -0,0 +1,73 @@
+**在ROS驱动程序下使用lvx文件的方法**([How to use lvx file in ros](../How-to-use-lvx-file-under-ros.md))
+
+
+
+[TOC]
+
+
+
+lvx文件是由览沃定义的点云存储格式;如果需要在ros中使用lvx文件,需要将其转换为rosbag文件。
+
+# 1、保存lvx格式的数据文件
+
+## 1.1 使用览沃Viewer保存lvx文件
+
+操作步骤如下所示:
+
+- 打开设备管理器;
+- 连接设备;
+- 开始采样;
+- 记录并保存lvx文件;
+
+
+
+## 1.2 使用Livox-SDK保存lvx文件
+
+### 1.2.1 Git clone Livox-SDK
+
+`git clone https://github.com/Livox-SDK/Livox-SDK.git`
+
+### 1.2.2 连接雷达设备并保存lvx文件
+
+- 在以下文件路径打开终端窗口: ../Livox_SDK/build/sample/lidar_lvx_file
+- 执行以下命令: ./lidar_lvx_sample
+- 连接指定的设备: -c “Lidar SN”
+- 设置点云持续时间: -t 10 (10 second)
+
+
+
+
+
+
+
+# 2 将lvx文件(v1.0/v1.1)转换为rosbag文件(仅支持Ubuntu系统)
+
+## 2.1 Git clone livox_ros_driver
+
+`git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src`
+
+## 2.2 设置点云发布频率
+
+如果需要设置转换为rosbag数据的频率为10Hz,可以在 "../ws_livox/src/livox_ros_driver/launch/lvx_to_rosbag.launch file"文件中将‘publish_freq’参数设置为10.0。同理,可以将其设置成需要的频率。
+
+
+
+## 2.3 在以下路径打开终端窗口
+
+`../ws_livox`
+
+## 2.4 将lvx点云文件(v1.0/v1.1)转换为rosbag文件
+
+livox_ros_driver支持将lvx点云数据转换为rosbag文件。使用以下命令:
+
+`roslaunch livox_ros_driver lvx_to_rosbag.launch lvx_file_path:="/home/livox/test.lvx"`
+
+将上述命令中"/home/livox/test.lvx"替换为本地lvx文件的路径之后,即可以运行;如果转换成功,在上述路径下将会产生同名的rosbag格式的文件。
+
+
+
+
+
+## 2.5 播放Rosbag数据
+
+
diff --git a/览沃SDK通信协议.md b/览沃SDK通信协议.md
new file mode 100644
index 0000000..88435d4
--- /dev/null
+++ b/览沃SDK通信协议.md
@@ -0,0 +1,1448 @@
+**览沃SDK通信协议**([Livox SDK Comunication Protocol](./Livox-SDK-Communication-Protocol.md))
+
+| **文件发布历史** | | |
+| ---------- | ------ | ---------------------------------------- |
+| **日期** | **版本** | **修改描述** |
+| 2020/10/26 | V1.3.0 | 1.增加对MId-70/Avia雷达的支持 |
+| 2020/06/10 | v1.2.0 | 1. 增加读/写配置参数指令 |
+| 2019/10/22 | v1.1.1 | 1.更新状态码,增加了时间同步状态码(Horizon: v06.05.00.00+, Mid-40/Mid-100: v03.07.00.00+)
2. 修改IMU数据推送频率 |
+| 2019/9/25 | v1.1.0 | 1. 增加对Tele-15/Horizon雷达的支持 |
+| 2019/7/08 | v1.0.6 | 1. 修正crc32错误
2. 增加系统状态码的描述 |
+| 2019/5/17 | v1.0.5 | 修改部分描述错误 |
+| 2019/4/18 | v1.0.4 | 1. 更新雷达状态码 (v03.05.00.00+)
2. 增加查询Hub插槽电源状态的指令 (v08.05.00.00+) |
+| 2019/4/17 | v1.0.3 | 更新了Hub读取雷达外部参数的描述 |
+| 2019/3/25 | v1.0.2 | 更新3.2 时间戳描述 |
+| 2019/2/25 | v1.0.1 | 更新3.2 时间戳描述 |
+| 2019/1/16 | v1.0.0 | 初始发布 |
+
+
+# 1 概述
+
+## 1.1 数据类型
+
+用户和雷达之间有两种通信方式,且这两种通信的数据协议格式是不相同的。不同点和相应功能如下:
+
+> - 控制指令数据:配置和查询雷达的参数和状态信息。
+>
+> - 采样数据:采样数据由雷达产生,包括点云数据和IMU数据(Mid40/100/70不支持);
+>
+> 目前,两种协议都被封装在UDP的数据段中,且协议数据为小端序。
+>
+
+## 1.2 模式和状态描述
+
+用户可以切换这些雷达模式:
+
+
+
+当用户设置雷达模式且雷达切换完成后,雷达将处于相应的状态。
+
+
+
+# 2 控制指令
+
+## 2.1 帧格式
+
+协议帧是控制指令的最小单元,格式如下:
+
+| 字段 | 偏移(字节) | 大小 (字节) | Description |
+| -------- | ------ | ------- | ---------------------------------------- |
+| sof | 0 | 1 | 起始字节,固定为 0xAA |
+| version | 1 | 1 | 协议版本, 当前为1 |
+| length | 2 | 2 | 数据帧长度,最大值: 1400 |
+| cmd_type | 4 | 1 | 命令类型:
0x00: CMD
0x01: ACK
0x02: MSG |
+| seq_num | 5 | 2 | 数据帧序列号 |
+| crc_16 | 7 | 2 | 包头校验码 |
+| data | 9 | n | 数据域 |
+| crc_32 | 9+n | 4 | 整个数据帧校验码 |
+
+命令类型描述:
+> - **CMD (请求)**: ACK主动发送数据请求-需要返回相应的应答ACK;
+> - **ACK (响应)**: 响应 CMD 数据;
+> - **MSG (消息)**: 主动推送消息数据-不需要返回响应数据,
+
+> e.g.广播数据,当发生错误时推送消息;
+
+CRC校验初始值:
+
+| crc16 初始值 | crc32 初始值 |
+| --------- | ---------- |
+| 0x4c49 | 0x564f580a |
+
+## 2.2 帧数据
+
+### 2.2.1 数据段格式
+
+协议帧中数据段格式如下:
+
+| 字段 | 偏移 (字节) | 大小 (字节) |
+| -------- | ------- | ------- |
+| cmd_set | 0 | 1 |
+| cmd_id | 1 | 1 |
+| cmd_data | 2 | 随命令变化 |
+
+### 2.2.2 CMD Set & CMD ID
+
+共有三种指令集:
+> - 通用指令集:包括Livox雷达和Hub在内的所有Livox设备均支持的通用指令集。
+> - 雷达指令集:只有Livox雷达支持雷达指令集。
+> - Hub指令集:只有Livox Hub支持的指令集
+
+| CMD Set | CMD ID | 功能 |
+| ----------- | ------ | ---------------- |
+| 0x00 通用指令集 | 0x00 | 广播信息 |
+| | 0x01 | 网络握手确认指令 |
+| | 0x02 | 查询设备信息 |
+| | 0x03 | 心跳指令 |
+| | 0x04 | 开始/停止采样 |
+| | 0x05 | 更改点云坐标模式 |
+| | 0x06 | 断开连接指令 |
+| | 0x07 | 设备异常推送 |
+| | 0x08 | 设置静态/动态IP模式 |
+| | 0x09 | 读取设备的IP模式 |
+| | 0x0A | 重启设备 |
+| | 0x0B | 设置设备配置参数 |
+| | 0x0C | 读取设备配置参数 |
+| 0x01 雷达指令集 | 0x00 | 设置模式指令 |
+| | 0x01 | 设置雷达外部参数 |
+| | 0x02 | 读取雷达外部参数 |
+| | 0x03 | 开启/关闭抗雨雾功能 |
+| | 0x04 | 设置开启/关闭风扇 |
+| | 0x05 | 获取风扇开/关状态 |
+| | 0x06 | 设置点云回波模式 |
+| | 0x07 | 读取点云回波模式 |
+| | 0x08 | 设置IMU数据推送频率 |
+| | 0x09 | 读取IMU推送频率 |
+| | 0x0A | 更新UTC同步时间 |
+| 0x02 Hub指令集 | 0x00 | 查询已连接雷达设备 |
+| | 0x01 | 设置子雷达模式 |
+| | 0x02 | 开启/关闭指定端口的电源 |
+| | 0x03 | 设置雷达的外部参数 |
+| | 0x04 | 读取雷达的外部参数 |
+| | 0x05 | 读取子雷达状态信息 |
+| | 0x06 | 开启/关闭Hub外部参数实时计算 |
+| | 0x07 | 开启/关闭子雷达抗雨雾功能 |
+| | 0x08 | 查询Hub端口电源使能状态 |
+| | 0x09 | 设置开启/关闭雷达风扇 |
+| | 0x0A | 读取雷达风扇开关状态 |
+| | 0x0B | 设置雷达点云回波模式 |
+| | 0x0C | 读取雷达点云回波模式 |
+| | 0x0D | 设置雷达IMU数据推送频率 |
+| | 0x0E | 获取雷达IMU数据推送频率 |
+## 2.3 SDK 连接
+
+在通信的过程中,雷达或中心板被定义为从设备,接收点云数据的电脑被被定义为主设备。
+
+主设备与从设备通信的流程如下:
+
+ 1.当从设备上电后,将会从65000端口向局域网中的55000端口广播设备信息数据。
+
+ 2.接收到广播数据后,主设备向65000端口发送数据请求,请求数据中包含源端口。
+
+ 3.从设备接收到连接请求后向这个源端口回复ACK数据。
+
+ 4.当用户接收到ACK数据,握手完成。可以开始发送心跳维持连接,并进行命令和数据的传输。
+
+注意:如果心跳超时,Livox雷达/Hub将会重新回到广播状态。
+
+流程图:
+
+
+
+# 3 采样数据包协议
+
+## 3.1 包格式
+
+雷达输出点云数据格式:
+
+| 字段 | 偏移量(字节) | 大小 (字节) | 详细描述 |
+| -------------- | ------------ | ----------- | ------------------------------------------------------------ |
+| version | 0 | 1 | 包协议版本:当前为5 |
+| slot_id | 1 | 1 | 雷达安装的端口号:
如果雷达直接与电脑连接,不经过中心板,默认为1;
如果雷达连接中心板,中心板与PC连接,端口号为中心板端口号,范围1~9; |
+| LiDAR_id | 2 | 1 | 雷达ID:
1: Mid-100 左/ Mid-40 / Tele-15 / Horizon/Mid-70
2: Mid-100 中
3: Mid-100 右
 |
+| reserved | 3 | 1 | |
+| status_code | 4 | 4 | 雷达状态指示信息,详见 3.4 |
+| timestamp_type | 8 | 1 | 时间戳类型,详见 [3.2](#3.2 时间戳) |
+| data_type | 9 | 1 | 数据类型,详见 [3.3](#3.3 点云/IMU数据 ) |
+| timestamp | 10 | 8 | 纳秒或者UTC格式时间戳,详见 3.2 |
+| data | 18 | -- | 数据信息,详见 [3.3](#3.3 点云/IMU数据 ) |
+
+## 3.2 时间戳
+雷达系统支持三种同步方式:
+- PTP: IEEE 1588v2.0 PTP 网络协议同步.
+- GPS:为了实现GPS同步,雷达/Hub需要同时接收PPS和UTC时间戳。对于Horizon/Tele-15/Mid-70/Avia,雷达单元可以通过以太网在控制指令中获得UTC时间戳。Livox Hub可以通过RS485串口在$GPRMC信息中获得UTC时间戳。
+- PPS: 脉冲同步(只有雷达支持).
+
+**同步优先级:** PTP > GPS > PPS,当系统中有多个同步源存在时,选择最高优先级的同步模式 。当最高优先级同步源离线时,同步类型将会持续而不会回退到低优先级, 并且[状态码](#3.5.1雷达状态码)中的`time_sync_status` 将会被设置为4(最高优先级同步标志异常.
+
+每个数据包中包含着指明数据包中第一个点云时间的时间戳。数据包中每个点的时间间隔是相等的。
+
+以Mid-40为例,采用频率为100KHz,因此每个点云的的时间间隔为10us.
+
+| 点云数 | 时间戳 |
+| ---- | ---------- |
+| 1 | T1 |
+| 2 | T1 + 10 us |
+| 3 | T1 + 20 us |
+| ... | ... |
+| 100 | T1 + 990us |
+
+时间戳类型:
+
+| 时间戳类型 | 同步源类型 | 数据格式 | 说明 |
+| ----- | ------------------ | -------- | -------------- |
+| 0 | No sync source无同步源 | uint64_t | Unit单位: ns |
+| 1 | PTP | uint64_t | Unit单位: ns |
+| 2 | 保留 | | |
+| 3 | GPS | UTC | UTC |
+| 4 | PPS | int64_t | 单位: ns, 只有雷达支持 |
+
+**时间戳类型 0**
+
+当系统中没有同步信号时,时间戳表明系统上电时间。
+
+**时间戳类型 1**
+
+IEEE 1588v2.0 PTP network protocol synchronization网络协议同步 1588 网络同步模式具有最高优先级.
+
+**时间戳类型 3**
+
+时间戳类型3表明雷达/Hub利用GPS实现同步. 对于雷达单元, RS485电平中的PPS和SDK控制指令中的UTC时间时间戳均需要(详见 [**更新UTC同步时间 **](#0x0A 更新UTC同步时间) ) . 时序图如下:
+
+
+对于Hub,需要RS485中的PPS和$GPRMC信息。时序图如下:
+
+
+
+ $GPRMC 信息的样例如下:
+$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
+
+| 123519 | 修改后为12:35:19 UTC |
+| --------- | ---------------- |
+| A | 状态A=可用或者 V=空. |
+| 4807.038 | 当前纬度 |
+| N | N 北/S 南 |
+| 01131.000 | 当前精度 |
+| E | E 东/W 西 |
+| 022.4 | 航速 |
+| 084.4 | 真实方位角 |
+| 230394 | 日期, 1994年3月23日 |
+| 003.1 | 磁偏角 |
+| W | W 西/E 东 |
+| *6A | 校验数据, 以 *开始 |
+
+点云数据包中UTC时间戳格式为:
+
+| 字节0 | 字节1 | 字节 2 | 字节 3 | 字节4 ~ 7 |
+| ---- | ---- | ---- | ---- | ------------- |
+| 年 | 月 | 日 | 小时 | 小时内偏差, 单位: us |
+
+**时间戳 4**
+
+PPS 同步源使用RS485电平信号. 时序图如下. PPS的上升沿将会把时间戳复位为0,所以点云数据的时间戳表明了电云采样和PPS上升沿的间隔。在IMU数据包中,由于补偿延迟,时间偏移可能为负。
+
+
+## 3.3 点云/IMU数据
+在每个数据包中有N个采样值。N的大小取决于数据类型。采样数据可以是以下数据格式之一。
+
+数据类型:
+
+| 数据类型 | 采样类型 | 回波模式 | 坐标系模式 | N | 数据频率 | 支持设备 |
+| -------- | -------- | ---------- | ---------- | ---- | ------------------------------------------------------------ | ------------------------------------ |
+| 0 | 点云数据 | 单回波模式 | 直角坐标系 | 100 | 100,000 点/s | Mid-40 |
+| 1 | 点云数据 | 单回波模式 | 球坐标系 | 100 | 100,000 点/s | Mid-40 |
+| 2 | 点云数据 | 单回波模式 | 直角坐标系 | 96 | Horizon/Tele-15/Avia:
240,000 点/s
Mid-70:
100,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 3 | 点云数据 | 单回波模式 | 球坐标系 | 96 | Horizon/Tele-15/Avia:
240,000 点/s
Mid-70:
100,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 4 | 点云数据 | 双回波模式 | 直角坐标系 | 48 | Horizon/Tele-15/Avia:
480,000 点/s
Mid-70:
200,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 5 | 点云数据 | 双回波模式 | 球坐标系 | 48 | Horizon/Tele-15/Avia:
480,000 点/s
Mid-70:
200,000 points/s | Horizon
Tele-15
Mid-70
Avia |
+| 6 | IMU 数据 | --- | --- | 1 | 见 [IMU 数据推送频率 ](#0x08 设置IMU数据推送频率) | Horizon
Tele-15
Avia |
+| 7 | 点云数据 | 三回波模式 | 直角坐标系 | 30 | Avia:
720,000 points/s | Avia |
+| 8 | 点云数据 | 三回波模式 | 球坐标系 | 30 | Avia:
720,000 points/s | Avia |
+
+**数据类型 0**
+
+单回波直角坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | ------- | ----------- |
+| x | 0 | int32_t | X 轴, 单位: mm |
+| y | 4 | int32_t | Y 轴, 单位: mm |
+| z | 8 | int32_t | Z 轴, 单位: mm |
+| 反射率 | 12 | uint8_t | 反射率 |
+
+**数据类型 1**
+
+单回波球坐标数据格式:
+
+| 字段 | 偏移(byte) | 数据类型 | 描述 |
+| ---- | -------- | -------- | --------------------------- |
+| 深度 | 0 | uint32_t | 深度, 单位: mm |
+| 天顶角 | 4 | uint16_t | 天顶角[0, 18000], Unit: 0.01 度 |
+| 方位角 | 6 | uint16_t | 方位角[0, 36000], Unit: 0.01 度 |
+| 反射率 | 8 | uint8_t | 反射率 |
+
+**数据类型 2**
+
+单回波直角坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | ------- | -------------------------------- |
+| x | 0 | int32_t | X 轴, 单位: mm |
+| y | 4 | int32_t | Y 轴, 单位: mm |
+| z | 8 | int32_t | Z 轴, 单位: mm |
+| 反射率 | 12 | uint8_t | 反射率 |
+| 标签 | 13 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+
+**数据类型 3**
+
+单回波球坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | -------- | ------------------------------- |
+| 深度 | 0 | uint32_t | 深度, 单位: mm |
+| 天顶角 | 4 | uint16_t | 天顶角[0, 18000], Unit: 0.01 度 |
+| 方位角 | 6 | uint16_t | 方位角[0, 36000], Unit: 0.01 度 |
+| 反射率 | 8 | uint8_t | 反射率 |
+| 标签 | 9 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info) |
+
+**数据类型4**
+
+双回波直角坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | ------- | -------------------------------- |
+| x1 | 0 | int32_t | X 轴, 单位: mm |
+| y1 | 4 | int32_t | Y 轴, 单位: mm |
+| z1 | 8 | int32_t | Z 轴, 单位: mm |
+| 反射率1 | 12 | uint8_t | 反射率 |
+| 标签1 | 13 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info) |
+| x2 | 14 | int32_t | X 轴, 单位: mm |
+| y2 | 18 | int32_t | Y 轴, 单位: mm |
+| z2 | 22 | int32_t | Z 轴, 单位: mm |
+| 反射率2 | 26 | uint8_t | 反射率 |
+| 标签2 | 27 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+
+**数据类型 5**
+
+双回波球坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | -------- | -------------------------------- |
+| 天顶角 | 4 | uint16_t | 天顶角[0, 18000], Unit: 0.01 度 |
+| 方位角 | 6 | uint16_t | 方位角[0, 36000], Unit: 0.01 度 |
+| 深度1 | 4 | uint32_t | 深度, 单位: mm |
+| 反射率1 | 8 | uint8_t | 反射率 |
+| 标签1 | 9 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+| 深度2 | 10 | uint32_t | 深度, 单位: mm |
+| 反射率2 | 14 | uint8_t | 反射率 |
+| 标签2 | 15 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+
+**数据类型6**
+
+IMU数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ------ | ------ | ----- | --------- |
+| gyro_x | 0 | float | 单位: rad/s |
+| gyro_y | 4 | float | 单位: rad/s |
+| gyro_z | 8 | float | 单位: rad/s |
+| acc_x | 12 | float | 单位: g |
+| acc_y | 16 | float | 单位: g |
+| acc_z | 20 | float | 单位: g |
+
+**数据类型7**
+
+三回波直角坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ------- | ---------- | -------- | ------------------------------------------ |
+| x1 | 0 | int32_t | X 轴, 单位: mm |
+| y1 | 4 | int32_t | Y 轴, 单位: mm |
+| z1 | 8 | int32_t | Z 轴, 单位: mm |
+| 反射率1 | 12 | uint8_t | 反射率 |
+| 标签1 | 13 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info) |
+| x2 | 14 | int32_t | X 轴, 单位: mm |
+| y2 | 18 | int32_t | Y 轴, 单位: mm |
+| z2 | 22 | int32_t | Z 轴, 单位: mm |
+| 反射率2 | 26 | uint8_t | 反射率 |
+| 标签2 | 27 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+| x3 | 28 | int32_t | X 轴, 单位: mm |
+| y3 | 32 | int32_t | Y 轴, 单位: mm |
+| z3 | 36 | int32_t | Z 轴, 单位: mm |
+| 反射率3 | 40 | uint8_t | 反射率 |
+| 标签3 | 41 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+
+**数据类型 8**
+
+三回波球坐标数据格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ------- | ---------- | -------- | ------------------------------------------ |
+| 天顶角 | 0 | uint16_t | 天顶角[0, 18000], Unit: 0.01 度 |
+| 方位角 | 2 | uint16_t | 方位角[0, 36000], Unit: 0.01 度 |
+| 深度1 | 4 | uint32_t | 深度1, 单位: mm |
+| 反射率1 | 8 | uint8_t | 反射率1 |
+| 标签1 | 9 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+| 深度2 | 10 | uint32_t | 深度, 单位: mm |
+| 反射率2 | 14 | uint8_t | 反射率2 |
+| 标签2 | 15 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+| 深度3 | 16 | uint32_t | 深度3, 单位: mm |
+| 反射率3 | 20 | uint8_t | 反射率3 |
+| 标签3 | 21 | uint8_t | 详见 [标签信息](#3.4 标签信息 {#tag_info}) |
+
+## 3.4 标签信息 {#tag_info}
+
+| 位 | 描述 |
+| ---- | ------------------------------------------------------------ |
+| 7:6 | 保留 |
+| 5:4 | 回波数:
00: 回波0
01: 回波1
02: 回波2
03: 回波3 |
+| 3:2 | 基于强度的点属性:
00: 正常点
01: 回波能量噪点置信度高
02: 回波能量噪点置信度中
03: 保留位 |
+| 1:0 | 基于空间位置的点属性:
0: 正常点
1: 空间噪点置信度高
2: 空间噪点置信度中
3: 空间噪点置信度低 |
+
+> 详见Livox Horizon/Tele-15/Mid70/Avia用户手册。
+
+## 3.5 状态码
+
+### 3.5.1雷达状态码
+
+雷达状态码由32bits组成,相应的bit含义如下:
+
+| 位 | 数据 | 描述 |
+| -------- | ---------------- | ------------------------------------------------------------ |
+| Bit0:1 | temp_status | 0: 温度正常
1: 偏高或偏低
2: 极高或极低 |
+| Bit2:3 | volt_status | 内部模组电压状态
0: 电压正常
1:电压偏高
2: 电压极高 |
+| Bit4:5 | motor_status | 0: 电机正常
1: 电机警告
2: 电机错误,无法工作 |
+| Bit6:7 | dirty_warn | 0: 无脏污和遮挡
1: 有脏污和遮挡 |
+| Bit8 | firmware_status | 0: 固件正常
1: 固件出错,需要升级 |
+| Bit9 | pps_status | 0: 无PPS信号
1: PPS信号正常 |
+| Bit10 | device_status | 0: 正常
1: 设备寿命警告 |
+| Bit11 | fan_status | 0: 风扇正常
1: 风扇警告(异常或用户设置停止)
**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
+| Bit12 | self_heating | 0: 低温自加热关闭
1: 低温自加热开启
**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ |
+| Bit13 | ptp_status | 0:无1588信号
1: 1588信号正常 |
+| Bit14:16 | time_sync_status | 0: 未开始时间同步
1: 使用PTP 1588同步
2: 使用GPS同步
3: 使用PPS同步
4: 系统时间同步异常(最高优先级信号异常) |
+| Bit17:29 | RSVD | |
+| Bit30:31 | system_status | 0: 正常
1: 警告
以下任何情况之一均会触发警告:
1.1 `temp_status` 为 1;
1.2 `volt_status` 为1;
1.3 `motor_status` 为1;
1.4 `dirty_warn` 为1;
1.5 `device_status` 为1;
1.6 `fan_status` 为1;
2:错误
雷达将会停机并进入错误状态
以下任何情况之一均会触发错误:
2.1 `temp_status` 为 2;
2.2 `volt_status` 为2;
2.3 `motor_status` 为 2;
2.4 `firmware_status` 为1; |
+
+### 3.5.2 Hub 状态码
+
+Hub状态码由32bits组成,相应的bit含义如下:
+
+| 位 | 数据 | 描述 |
+| -------- | ----------------- | ---------------------------------------- |
+| Bit0:1 | sync_status | 0: 未开始时间同步
1: 使用PTP1588同步
2: 使用GPS同步
3: 系统时间同步异常(最高优先级信号异常) |
+| Bit2:3 | temp_status | 0: 温度正常
1: 偏高或偏低
2: 极高或极低 |
+| Bit4 | LiDAR_status | 0: 子雷达正常
1: 子雷达状态异常 |
+| Bit5 | LiDAR_link_status | 0: 雷达连接正常
1: 雷达连接异常 |
+| Bit6 | firmware_status | 0: 雷达固件正常
1: 雷达固件出错,需要升级 |
+| Bit7:29 | RSVD | |
+| Bit30:31 | system_status | 0: 正常
1:警告
以下任何状况都会触发警告:
1.1 `temp_status` 为 1;
2: 错误
以下任何状况都会触发错误:
2.1 `temp_status` 为2;
2.2 `LiDAR_status` 为1;
2.3 `firmware_status` 为1; |
+
+# 4 配置参数
+## 4.1 描述
+
+配置参数表的设计是为了更方便的配置livox的设备。参数表存储在设备非易失性介质中,所以设备断电重启以后不会丢失。
+
+每个配置参数都有一个唯一的键值,以下是当前支持的参数:
+
+| 关键字 | 名称 | 支持设备 | 键值长度 | 键值类型 | 键值描述 |
+| ------ | ------------------- | --------------------------------------- | -------- | -------- | ---------------------------------------------- |
+| 0x00 | 保留 | -- | | | 无效关键字 |
+| 0x01 | 高灵敏度功能 | Tele-15/07.09.0000+
Avia/11.06.0000+ | 1 | uint8_t | 0:高灵敏度功能关闭
1:高灵敏度功能开启(默认) |
+| 0x02 | 重复/非重复扫描模式 | Avia/11.06.0000+ | 1 | uint8_t | 0:非重复扫描模式(默认)
1:重复扫描模式 |
+| 0x03 | slot id配置 | Mid-70/10.03.0000+
Avia/11.06.0000+ | 1 | uint8_t | 修改雷达slot id,范围1-9,默认为1 |
+
+* 写配置参数详见 [写配置参数](#0x0B 写设备参数);
+* 读配置参数详见 [读配置参数](#0x0C 读配置参数) ;
+
+
+
+# 5 控制指令详情
+
+## 5.1 通用命令集
+### 0x00 广播消息
+
+消息
+
+| 消息 | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------------- | ---------- | ----------- | ------------------------------------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用命令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x00 |
+| | broadcast_code | 2 | uint8_t[16] | 设备广播码,以'\0'结束的字符串
每个设备的广播码特有. |
+| | dev_type | 18 | uint8_t | 设备类型:
0: Livox Hub
1: Mid-40
2: Tele-15
3: Horizon
6: Mid-70
9:Avia |
+| | reserved | 19 | uint16_t | 保留 |
+
+### 0x01 网络握手确认指令
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | user_ip | 2 | uint8_t[4] | 主机IP地址
样例: AA.BB.CC.DD
user_ip[0] = AA
user_ip[1] = BB
user_ip[2] = CC
user_ip[3] = DD |
+| | data_port | 6 | uint16_t | 主机点云数据UDP目的端口 |
+| | cmd_port | 8 | uint16_t | 主机控制指令UDP目的端口 |
+| | imu_port | 10 | uint16_t | 主机控制IMU UDP目的端口,
**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+ |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x02 设备信息查询
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | version | 3 | uint8_t[4] | 固件版本:
样例: AA.BB.CC.DD
版本号组成[0] = AA
版本号组成[1] = BB
版本号组成[2] = CC
版本号组成[3] = DD |
+
+### 0x03 心跳数据
+
+主机端需要以1Hz频率发送请求数据,以维持与设备的正常通信。
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | -------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | work_state | 3 | uint8_t | 雷达状态:
0x00: 初始化
0x01: 正常
0x02: 低功耗
0x03: 待机
0x04: 异常
Hub 状态:
0x00: 初始化
0x01: 正常
0x04: 异常 |
+| | feature_msg | 4 | uint8_t | 雷达特有信息:
Bit0: 抗雨雾功能状态
0x00: 关闭
0x01: 开启
Bit1 ~ Bit7: 保留
**Hub保留** |
+| | ack_msg | 5 | uint32_t | ACK 信息:
与工作状态有关:
工作状态为 0x00: 初始化百分比
工作状态为其他r: 状态码 |
+
+### 0x04 开始/停止采样
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+| | sample_ctrl | 2 | uint8_t | 0x00: 停止采样
0x01: 开始采样 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x05 更改点云坐标系模式
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------------- | ------ | ------- | -------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+| | coordinate_type | 2 | uint8_t | 0x00: 直角坐标系
0x01: 球坐标系 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+**注意:** *该指令只会在RAM中起效,重启后系统坐标系会复位为直角坐标系.*
+
+### 0x06 断开连接
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x07 推送异常状态信息
+
+信息
+
+在设备发生异常后,立刻以10Hz频率发送异常信息。
+
+| MSG | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | -------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+| | status_code | 2 | uint32_t | 状态码 |
+
+### 0x08 配置静态/动态IP
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ---------- | ---------- | ------------------------------------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+| | ip_mode | 2 | uint8_t | 0x00: 动态IP
0x01: 静态IP |
+| | ip_addr | 3 | uint8_t[4] | 详见: **IP地址信息** |
+| | net_mask | 7 | uint8_t[4] | IPV4 子网掩码
当 ‘ip_mode’ 为0x01(静态IP),IP掩码有效
例如: AA.BB.CC.DD
net_mask[0]: AA
net_mask[1]: BB
net_mask[2]: CC
net_mask[3]: DD
**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ |
+| | gw_addr | 11 | uint8_t[4] | IPV4 网关
当 ‘ip_mode’ 为0x01(静态IP),IP网关有效
例如: AA.BB.CC.DD
gw_addr[0]: AA
gw_addr[1]: BB
gw_addr[2]: CC
gw_addr[3]: DD
**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+ |
+
+IP地址信息:
+
+| 设备信息/固件版本 | IP地址信息 |
+| ------------------------------------------------------------ | ------------------------------------------------------------ |
+| Livox Hub
Mid-40
| IPV4 地址
当 ‘ip_mode’ 为0x01(静态IP),IP地址有效
ip_addr[0]: 192
ip_addr[1]: 168
ip_addr[2]: 1
ip_addr[3]: 具体范围如下
广播码最后一位内容:
1: 11 ~ 80
2: 81 ~ 150
3: 151 ~ 220 |
+| Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
| IPV4 地址
当 ‘ip_mode’ 为0x01(静态IP),IP地址有效
ip_addr[0]:1 ~ 126 && 128 ~ 223
ip_addr[1]: 0 ~ 255
ip_addr[2]: 0 ~ 255
ip_addr[3]: 0 ~ 255 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+**注意:** *关于IP详情, 见:[IP_address](https://en.wikipedia.org/wiki/IP_address).*
+
+### 0x09 获取设备IP信息
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ---------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | ip_mode | 3 | uint8_t | 0x00: 动态IP
0x01: 静态 IP |
+| | ip_addr | 4 | uint8_t[4] | 设备IPV4 地址
样例: AA.BB.CC.DD
user_ip[0] = AA
user_ip[1] = BB
user_ip[2] = CC
user_ip[3] = DD |
+| | net_mask | 8 | uint8_t[4] | 设备IPV4 子网掩码
例如: AA.BB.CC.DD
user_netmask[0] = AA
user_netmask[1] = BB
user_netmask[2] = CC
user_netmask[3] = DD
**支持设备:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+ |
+| | gw | 12 | uint8_t[4] | 设备IPV4 网关
例如: AA.BB.CC.DD
user_gw[0] = AA
user_gw[1] = BB
user_gw[2] = CC
user_gw[3] = DD
**支持设备:**
Livox Hub/08.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+ |
+
+### 0x0A 重启设备
+**支持设备/固件版本:**
Livox Hub/08.07.0000+
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | -------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | timeout | 2 | uint16_t | 重启设备延迟时间 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x0B 写设备参数
+**支持设备/固件版本:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | ------- | ----------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0B |
+| | param_list | 2 | -- | 以键-值对的形式配置参数,详见下表 |
+
+在“参数表”中,每个配置参数具有以下格式:
+
+#### 配置参数表格式
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | -------- | ------------------------------ |
+| 键 | 0 | uint16_t | 键 |
+| 长度 | 2 | uint16_t | 数值长度 |
+| 数值 | 4 | -- | 不同键值具有不同的数值,详见 [配置参数](#4 配置参数) |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | -------- | --------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0B |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败, 写参数发生错误 |
+| | error_key | 3 | uint16_t | 第一个错误配置参数的键值 |
+| | error_code | 5 | uint8_t | 见下表 |
+
+“错误码”的含义:
+
+#### 配置参数错误码
+
+| 错误码 | 描述 |
+| ---- | -------- |
+| 0 | 无错误 |
+| 1 | 不支持该键 |
+| 2 | 执行失败 |
+| 3 | 该键无法写入 |
+| 4 | 错误值 |
+| 5 | 值长度错误 |
+| 6 | 读取参数长度限制 |
+| 7 | 参数长度不匹配 |
+
+### 0x0C 读配置参数
+**支持设备/固件版本:**
Livox Hub/08.09.0000+
Horizon/06.11.0000+
Tele-15/07.09.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0C |
+| | param_num | 2 | uint8_t | 参数数量 |
+| | key_list | 3 | -- | 读取参数键值表 |
+
+在'key_list'中, 每个键有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------ | -------- | ---- |
+| 键 | 0 | uint16_t | 键 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | -------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 通用指令: 0x00 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0C |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败, 读取参数发生错误 |
+| | error_key | 3 | uint16_t | 第一个错误参数键值 |
+| | error_code | 5 | uint8_t | 详见 [ 配置参数错误码](#配置参数错误码) |
+| | param_list | 6 | -- | 以键-值对的形式配置参数,详见 [配置参数表格式](#配置参数表格式) |
+
+## 5.2 雷达指令集
+
+### 0x00 模式切换指令
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x00 |
+| | LiDAR_mode | 2 | uint8_t | 雷达模式:
用户可以设置如下模式:
0x01: 正常工作模式
0x02:低功耗模式
0x03: 待机模式 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x00 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败
0x02: 正在切换 |
+
+### 0x01 写入雷达外部参数
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | roll | 2 | float32 | 横滚角, 单位: 度 |
+| | pitch | 6 | float32 | 俯仰角,单位: 度 |
+| | yaw | 10 | float32 | 航向角, 单位: 度 |
+| | x | 14 | int32_t | X 平移, 单位: mm |
+| | y | 18 | int32_t | Y 平移, 单位: mm |
+| | z | 22 | int32_t | Z 平移, 单位: mm |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x02 读取雷达外部参数
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | roll | 3 | float32 | 横滚角, 单位: 度 |
+| | pitch | 7 | float32 | 俯仰角,单位: 度 |
+| | yaw | 11 | float32 | 航向角, 单位: 度 |
+| | x | 15 | int32_t | X 平移, 单位: mm |
+| | y | 19 | int32_t | Y 平移, 单位: mm |
+| | z | 23 | int32_t | Z 平移, 单位: mm |
+
+### 0x03 开启/关闭抗雨雾功能
+**支持设备:**
Mid-40
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ----------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+| | state | 2 | uint8_t | 开启/关闭抗雨雾功能:
0x00: 关闭
0x01: 开启 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x04 开启/关闭风扇
+**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | -------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+| | state | 2 | uint8_t | 开启/关闭风扇:
0x00: 关闭
0x01: 开启 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败
此配置会保存到flash |
+
+### 0x05 读取风扇开/关状态
+
+**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | state | 3 | uint8_t | 风扇开/关状态:
0x00: 关闭
0x01: 开启 |
+
+### 0x06 设置雷达回波模式
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+| | mode | 2 | uint8_t | 回波模式:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败
此配置保存在flash中 |
+
+### 0x07 获取雷达回波模式
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | mode | 3 | uint8_t | 回波模式:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
+
+### 0x08 设置IMU数据推送频率
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+| | frequency | 2 | uint8_t | IMU数据推送频率:
0x00: 0Hz(关闭IMU数据推送)
0x01: 200Hz |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败
该配置存储在flash中. |
+
+### 0x09 获取IMU数据推送频率
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | frequency | 3 | uint8_t | IMU数据推送频率:
0x00: 0Hz(关闭IMU数据推送)
0x01: 200Hz |
+
+### 0x0A 更新UTC同步时间
+**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
Mid-70/10.03.0000+
Avia/11.06.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | -------- | ------------------------------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | year | 2 | uint8_t | UTC 年:
0 代表2000 年
255 代表2255 年 |
+| | month | 3 | uint8_t | UTC 月: 范围为 1-12 |
+| | day | 4 | uint8_t | UTC 日: 范围为 1-31 |
+| | hour | 5 | uint8_t | UTC 时: 范围为 0-23 |
+| | microsecond | 6 | uint32_t | 1 小时内偏移值,单位:us |
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | 雷达指令: 0x01 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+## 5.3 Hub 指令集
+### 0x00 查询已连接雷达设备信息
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ----------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x00 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x00 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 已经连接到Hub的雷达数量范围: 0 ~ 27 |
+| | info_list | 4 | -- | 已连接雷达设备信息表 |
+
+在‘info_list’中,每个雷达设备信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| dev_type | 16 | uint8_t | 设备类型:
1: Mid-40
2: Tele-15
3: Horizon |
+| version | 17 | uint8_t[4] | LiDAR 固件版本
样例: AA.BB.CC.DD
version[0] = AA
version[1] = BB
version[2] = CC
version[3] = DD |
+| slot_id | 21 | uin8_t | 安装雷达的端口号 |
+| LiDAR_id | 22 | uint8_t | 雷达 ID:
1: Mid-100 左/ Mid-40 / Tele-15 / Horizon/Mid-70
2: Mid-100 中
3: Mid-100 右 |
+
+### 0x01 设置雷达模式
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ----------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | count | 2 | uint8_t | 设置雷达数量范围: 1 \~ 27 |
+| | config_list | 3 | \-- | 雷达模式配置表 |
+
+在 ‘config_list’中, 每个雷达模式配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| LiDAR_mode | 16 | uint8_t | 雷达模式:
用户可以配置如下模式:
0x01: 正常模式
0x02: 低功耗模式
0x03: 待机模式 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x01 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败
0x02: Switching |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息表 |
+
+在 ‘return_list’中, 每次返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ------------------------------------ |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+
+### 0x02 开启/关闭指定端口的电源
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | ------- | ------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+| | slot_id | 2 | uint8_t | 端口ID范围: 1 ~ 9 |
+| | power_ctrl | 3 | uint8_t | 电源控制:
0x00: 关闭
0x01: 开启 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x02 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x03 写雷达外部参数
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+| | count | 2 | uint8_t | 设置雷达数量范围: 1 ~ 27 |
+| | param_list | 3 | -- | 雷达参数配置表 |
+
+在 ‘param_list’, 每个雷达参数配置格式如下:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ------------ |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| roll | 16 | float | 横滚角, 单位: 度 |
+| pitch | 20 | float | 俯仰角, 单位: 度 |
+| yaw | 24 | float | 航向角, 单位: 度 |
+| x | 28 | int32_t | X 平移, 单位: mm |
+| y | 32 | int32_t | Y 平移, 单位: mm |
+| z | 36 | int32_t | Z 平移, 单位: mm |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x03 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 设置雷达数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ----------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+
+### 0x04 读取雷达外部参数
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ----------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x04 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 设置雷达数量范围: 1 ~ 27 |
+| | param_list | 4 | -- | 雷达参数表 |
+
+在 ‘param_list’, 每个雷达参数配置格式如下:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ------------------------------------ |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+| roll | 17 | float | 横滚角, 单位: 度 |
+| pitch | 21 | float | 横滚角, 单位: 度 |
+| yaw | 25 | float | 横滚角, 单位: 度 |
+| x | 29 | int32_t | X 平移, 单位: mm |
+| y | 33 | int32_t | Y 平移, 单位: mm |
+| z | 37 | int32_t | Z 平移, 单位: mm |
+
+### 0x05 查询雷达状态信息
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ----------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | --------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x05 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 连接Hub雷达数量范围: 0 ~ 27 |
+| | info_list | 4 | -- | 雷达状态表 |
+
+在 ‘info_list’中, 每个雷达状态信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| work_state | 16 | uint8_t | 雷达状态:
0x00: 初始化
0x01: 正常
0x02: 低功耗
0x03: 待机
0x04: 错误 |
+| feature_msg | 17 | uint8_t | 雷达模式信息:
Bit0: 抗雨雾开关
0x00:关闭
0x01: 开启
Bit1 ~ Bit7: 保留位 |
+| ack_msg | 18 | uint32_t | ACK 消息:
与‘work_state’相关:
work_state 为 0x00: 初始化
work_state 为其它: 状态码 |
+
+### 0x06 开启/关闭Hub外参实时计算
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ---------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+| | state | 2 | uint8_t | 开启/关闭Hub外参实时计算:
0:关闭
1: 开启 |
+
+**注意:** *Hub利用存储在每个雷达的外部参数进行坐标转换。坐标系先旋转然后平移。旋转以欧拉角进行,旋转轴的顺序依次为X-Y-Z.*
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | -------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x06 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+
+### 0x07 开启/关闭雷达抗雨雾功能
+
+**支持设备:**
Mid-40
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+| | count | 2 | uint8_t | 配置雷达数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达配置信息表 |
+
+在 ‘config_list’中, 每个雷达的参数信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | --------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| cmd_data | 1 | uint8_t | 0: 关闭
1: 开启 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 设置雷达数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: 设备不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+
+
+### 0x08 查询中心板端口电源状态
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ------- | ------ | ------- | ----------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ---------------- | ------ | -------- | ---------------------------------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x08 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | slot_power_state | 3 | uint16_t | 端口电源状态:
0x00: 关闭
0x01: 开启
bit0:端口1
bit1: 端口2
...
bit8: 端口9 |
+
+### 0x09 设置雷达风扇开启/关闭
+
+**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ----------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+| | count | 2 | uint8_t | 设置雷达数量发范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达风扇配置表 |
+
+在 ‘config_list’, 每个雷达风扇配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | --------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| state | 1 | uint8_t | 开启/关闭风扇:
0: 关闭
1: 开启 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x09 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达配置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: 设备不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+
+**注意:** *此指令保存在雷达flash,掉电不会丢失*
+
+### 0x0A 获取雷达开/关风扇状态
+
+**支持设备:**
Mid-40/03.07.0000+
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | count | 2 | uint8_t | 雷达配置数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达风扇配置信息表 |
+
+在 ‘config_list’中,每个雷达风扇配置信息格式如下:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述n |
+| -------------- | ------ | ----------- | ----- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0A |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: 设备不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+| state | 17 | uint8_t | 风扇开/关状态:
0: 关闭
1: 开启 |
+
+### 0x0B 设置雷达回波模式
+
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0B |
+| | count | 2 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达回波模式配置列表 |
+
+I在 ‘config_list’中, 每个雷达回波模式配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| mode | 1 | uint8_t | 回波模式:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0B |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: 设备不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码
雷达广播码
此配置保存在flash中 |
+
+### 0x0C 获取雷达回波模式信息
+
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0C |
+| | count | 2 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达回波模式配置表 |
+
+在 ‘config_list’中, 每个雷达回波模式配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述n |
+| -------------- | ------ | ----------- | ----- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0C |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: 数据不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+| mode | 17 | uint8_t | 回波模式:
0x00: Single Return First
0x01: Single Return Strongest
0x02: Dual Return |
+
+### 0x0D 设置雷达IMU数据推送频率
+
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD名称 | 偏移(字节) | 数据类型 | 描述 | |
+| ----- | ----------- | ---- | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0D |
+| | count | 2 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达IMU配置信息表 |
+
+在 ‘config_list’中, 每个雷达IMU频率配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+| frequency | 1 | uint8_t | IMU 数据推送频率:
0x00: 0Hz(关闭IMU数据推送)
0x01: 200Hz |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0D |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02: Device not support |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码
此配置保存在flash中 |
+
+### 0x0E 获取雷达IMU推送频率信息
+
+**支持设备:**
Horizon/06.04.0000+
Tele-15/07.03.0000+
+
+请求
+
+| CMD | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ---------------- |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x0C |
+| | count | 2 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | config_list | 3 | -- | 雷达IMU推送频率信息表 |
+
+在 ‘config_list’中, 每个雷达IMU频率配置信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ----- |
+| broadcast_code | 0 | uint8_t[16] | 雷达广播码 |
+
+应答
+
+| ACK | 名称 | 偏移(字节) | 数据类型 | 描述 |
+| ---- | ----------- | ------ | ------- | ------------------------------ |
+| data | cmd_set | 0 | uint8_t | Hub指令: 0x02 |
+| | cmd_id | 1 | uint8_t | 指令ID: 0x07 |
+| | ret_code | 2 | uint8_t | 返回码:
0x00: 成功
0x01: 失败 |
+| | count | 3 | uint8_t | 雷达设置数量范围: 1 ~ 27 |
+| | return_list | 4 | -- | 返回信息列表 |
+
+在 ‘return_list’中, 每个返回信息具有以下格式:
+
+| 字段 | 偏移(字节) | 数据类型 | 描述 |
+| -------------- | ------ | ----------- | ---------------------------------------- |
+| ret_code | 0 | uint8_t | LiDAR 返回码:
0x00: 成功
0x01: 失败
0x02:设备不支持 |
+| broadcast_code | 1 | uint8_t[16] | 雷达广播码 |
+| frequency | 17 | uint8_t | IMU 数据推送频率:
0x00: 0Hz(关闭IMU数据推送)
0x01: 200Hz |
+