diff --git a/Home.md b/Home.md index 1fc61d9..28d4321 100644 --- a/Home.md +++ b/Home.md @@ -1,37 +1,2 @@ # Welcome to the Livox-SDK wiki -This is a wiki for anything related to the Livox! -# 1 Quick Links -> * [LivoxTech Official website](https://www.livoxtech.com/) -> * [Livox SDK Communication Protocol PDF](https://www.livoxtech.com/sdk/downloads) -> * [Livox MID-40 && MID-100 LiDAR Manuals](https://www.livoxtech.com/mid-40-and-mid-100/downloads) - -# 2 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. - -## 2.1 Installation -The installation procedures in Ubuntu 16.04/14.04 32-bit LTS are shown here as examples. -### 2.1.1 Ubuntu 16.04/14.04 32-bit LTS -#### Dependencies -Livox SDK requires [CMake 3.0.0+](https://cmake.org/), [Apache Portable Runtime (APR) 1.61+](http://apr.apache.org/) and [Boost 1.54+](https://www.boost.org/) as dependencies. You need to install boost, cmake using apt: -``` -sudo apt install cmake libboost-atomic-dev libboost-system-dev -``` -And download the newest apr linux source file in [Apache Portable Runtime (APR) 1.61+](http://apr.apache.org/): -``` -tar -zxvf apr-1.X.X.tar.gz -cd apr-1.X.X -./configure --prefix=/usr/local/apr --disable-lfs -make && sudo make install -``` -#### Compile Livox SDK -In the Livox SDK directory, run the following commands to compile the project: -``` -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 -``` -As the PKG_CONFIG_PATH will only take effect on the current terminal, next time please re-add it when you build project in another terminal or you can add it in your environment variables. \ No newline at end of file +This is a wiki for anything related to the Livox! \ No newline at end of file diff --git a/Livox SDK Communication Protocol.md b/Livox SDK Communication Protocol.md index b44902b..7f06922 100644 --- a/Livox SDK Communication Protocol.md +++ b/Livox SDK Communication Protocol.md @@ -3,6 +3,7 @@ | **Document Release History** | | | | ---------------------------- | ----------- | ------------------------------------------------------------ | | **Date** | **Release** | **Change Description** | +| 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 | @@ -347,18 +348,18 @@ response | | 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** | +| | 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 | -| | sample_ctrl | 2 | uint8_t | 0x00: Start Sampling
0x01: Stop Sampling | +| 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 @@ -603,12 +604,12 @@ 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: 0x02 | -| | slot_id | 2 | uint8_t | Slot id of Hub Range: 1 ~ 9 | -| | power_ctrl | 3 | uint8_t | Power Control (Default 0x00)
0x00: Turn Off
0x01: Turn On | +| 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 @@ -643,20 +644,20 @@ 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 | -| | 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 | +| 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 | In ‘return_list’, each return information has the following format: -| 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 | +| 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 | ### 0x04 Read LiDAR Extrinsic Parameters