Added LiDAR GPS synchronization

livox
2020-02-14 16:37:52 +08:00
parent 1f5d68204e
commit 96185f8605
8 changed files with 104 additions and 43 deletions
+98 -37
@@ -3,17 +3,21 @@
**Livox LiDAR Timestamp Synchronization**
| **Document Release History** | | |
| ------------------------------ | ----------- | ---------------------- |
| ------------------------------ | ----------- | ------------------------------------ |
| **Date** | **Release** | **Change Description** |
| 2019/6/19 | v1.0.0 | Initial release |
| 2020/2/13 | v1.1.0 | LiDAR add GPS synchronization method |
| | | |
[TOC]
# 1 Summary
| **Device** | **Supported Time Synchronization Method** |
| ----------- | ------------------------------------------- |
| Livox LiDAR | 1. PTP v2<br>2. Pulse Per Second (PPS) |
| ----------- | ------------------------------------------------ |
| Livox LiDAR | 1. PTP v2<br>2. GPS<br>3. Pulse Per Second (PPS) |
| Livox Hub | 1. PTP v2<br>2. GPS |
## 1.1 Application Scenarios
@@ -36,19 +40,98 @@ Livox Hub supports GPS time synchronization, which is recommended when integrati
When Livox LiDAR or Livox Hub is connected to a network with master clock, the clock of each LiDAR point cloud is automatically synchronized to the master clock. When PTP, PPS or GPS are available at the same time, PTP network synchronization is preferred.
### Connection:
### 2.1.1 Connection
Connect Livox LiDAR/Hub normally without additional wiring.
### Attention:
### 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](#3.1).
### Accuracy:
### 2.1.3 Accuracy
Hundreds of nanoseconds
## 2.2 PPS
## 2.2 GPS
### 2.2.1 Livox Hub
#### 2.2.1.1 Connection
Connect the PPS signal and time stamp signal from GPS module to the Livox Hub's GPS sync port.
![](images/gps_ttl_hub.png)
Remarks:
- If the data output by the GPS module is 485 level, TTL to 485 module is not needed.
#### 2.2.1.2 Configuration
Do not require any software configuration when using Livox Hub for GPS time synchronization.
### 2.2.2 Mid40/100
#### 2.2.2.1 Connection
Connect the PPS signal from GPS module to the sync port of Mid40/100 converter, and connect the time stamp signal to PC through the TTL to USB module.
![](images/gps_ttl_mid.png)
Remarks: If the data output by the GPS module is 485 level, the TTL to 485 module is not needed.
#### 2.2.2.2 Configuration
Mid firmware version: >= v03.07.0000, SDK version >= v2.0.0
**Use ROS driver**
- Connect the hardware according to the above block diagram;
- View the name of the port receiving "Time signal"(GPRMC/GNRMC) in PC system, such as `/dev/ttyUSB0`, configure "device_name" to this name 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 set "enable_timesync" to `true`;
- Run the launch file;
**Use only SDK**
The link below is an example showing how to synchronize using only SDK:
[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 Horizon
#### 2.2.3.1 Connection
Connect the PPS signal from GPS module to the sync port of Livox converter 2.0, and connect the time stamp signal to PC through TTL to USB module.
![](images/gps_ttl_horizon.png)
#### 2.2.3.2 Configuration
Horizon firmware version: >= v06.06.0000, SDK version >= v2.0.0
**Use ROS driver**
- Connect the hardware according to the above block diagram;
- View the name of the port receiving "Time signal"(GPRMC/GNRMC) in PC system, such as `/dev/ttyUSB0`, configure "device_name" to this name 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 set "enable_timesync" to `true`;
- Run the launch file;
**Use only SDK**
The link below is an example showing how to synchronize using only SDK:
[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.4 Attention
- Generally, when there is GPS satellite signal, the GPS module will have PPS signal and time signal output. In normal use, make sure the GPS satellite signal is stable.
- Make sure that the output of "Time signal" is standard GPRMC/GNRMC message.
### 2.2.5 Accuracy
1 microsecond
## 2.3 PPS
**Because the LiDAR has supported GPS synchronization, the PPS method is not recommended.**
Every time the LiDAR receives the rising edge of a pulse, the timestamp of point cloud will be reset to 0, and then the time will increase until the rising edge of the next pulse is received. We can use this feature to update the timestamp in each point cloud packet to the external GPS time.
@@ -77,43 +160,21 @@ else
LiDAR_time_last = LiDAR_time;
```
### Connection:
### 2.3.1 Connection
GPS uses 485 level:
**Mid:**
![](images/gps_485.png)
![](images/gps_ttl_mid.png)
GPS uses TTL level:
**Horizon:**
![](images/gps_ttl.png)
![](images/gps_ttl_horizon.png)
### Attention:
### 2.3.2 Attention
When the GPS signal is weak or missing, the GPS module will not be able to generate TTL pulses. When this happens, it cannot correct the timestamp of point cloud.
- If the data output by the GPS module is 485 level, TTL to 485 module is not needed.
### Accuracy:
1 microsecond
## 2.3 GPS
Connect the PPS signal and timestamp signal from GPS receiver to the Livox Hub's synchronization interface.
### Connection:
GPS uses 485 level:
![](images/gps_485_1.png)
GPS uses TTL level:
![](images/gps_ttl_1.png)
### Attention:
Make sure that the "Time signal" in the above figure is GPRMC message.
### Accuracy:
### 2.3.3 Accuracy
1 microsecond
BIN
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

BIN
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

BIN
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

BIN
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

BIN
Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB