Pandar | OT | QT | XT | AT | FT | JT |
---|---|---|---|---|---|---|
Pandar40P | OT128 | PandarQT | PandarXT | AT128E2X | FT120 | JT16 |
Pandar64 | - | QT128C2X | PandarXT-16 | AT128P | - | - |
Pandar128E3X | - | - | XT32M2X | ATX | - | - |
- Ubuntu 16/18/20/22.04
- Windows 10
Ubuntu
- Cmake 3.8.0 and above
- G++ 7.5 and above
Windows
- Cmake 3.8.0 and above
- MSVC 2019 and above
- If using point cloud visualization features,
PCL
installation is required - If parsing PCAP files,
libpcap
installation is required - If using TLS/mTLS-based Ptcs communication (supported by some lidars),
openssl
installation is required
git clone --recurse-submodules https://github.com/HesaiTechnology/HesaiLidar_SDK_2.0.git
On Windows systems, downloading the repository as a ZIP file is not recommended as it may cause compilation errors due to symbolic link issues.
# 0. Install dependencies
sudo apt update && sudo apt install -y libpcl-dev libpcap-dev libyaml-cpp-dev openssl
# 1. Navigate to source directory
cd HesaiLidar_SDK_2.0
# 2. Create build directory and navigate to build directory
mkdir -p build && cd build
# 3. Configure project with Cmake
# - Add -DCMAKE_BUILD_TYPE=Release for optimized compilation
cmake -DCMAKE_BUILD_TYPE=Release ..
# 4. Compile SDK
# - Use -j$(nproc) to utilize all CPU cores
make -j$(nproc)
Please refer to How to Compile SDK on Windows.
Please refer to the operations in Compile Macro Control to configure the macro WITH_PTCS_USE
to be inactive.
Please refer to How to Parse Lidar Data Online.
Please refer to How to Parse PCAP File Data Offline.
Please refer to How to Visualize Point Cloud Data.
Please refer to How to Perform Coordinate Transformation.
Please refer to How to Save Point Cloud Data as PCD Files.
Please refer to How to Use GPU Acceleration for Performance Optimization.
Please refer to How to Invoke SDK API Command Interface.
Please refer to Common Troubleshooting (WARNING).
Please refer to How to Perform Packet Loss Statistics.
Please refer to the thread_num
configuration in Functional Parameter Reference and configure it to a value >1
Note: The maximum allowed thread count is [CPU maximum cores - 2]. If configured beyond this, it will be modified to this number. Multi-threading will consume more CPU resources, please configure appropriately.
Navigate to multi_test.cc
For parsing parameter configuration reference, see How to Parse Lidar Data Online
The basic principle is to use multi-threading to start two SDKs to parse data
3.12 Filter and Parse Specified Lidar Data from PCAP or Real-time Reception Containing Multi-lidar Data
Please refer to the descriptions of device_udp_src_port
and device_fault_port
in Functional Parameter Reference
Enable point cloud packet filtering by configuring device_udp_src_port
(point cloud packet source port number) and device_ip_address
(point cloud packet source IP), parsing only point cloud packets from this source IP + source port number.
Enable fault message filtering by configuring device_fault_port
(fault message source port number) and device_ip_address
(fault message source IP), parsing only fault messages from this source IP + source port number.
3.13 Get Specific Timestamp for Each Point in Pandar Series, OT128, XT Series, QT Series Lidars (Point Cloud Packet Timestamp + Firing Channel Time Correction)
Please use the LidarPointXYZICRTT structure to declare HesaiLidarSdk, where uint64_t timeSecond is the seconds time part and uint32_t timeNanosecond is the nanoseconds time part. For example: HesaiLidarSdk<LidarPointXYZICRTT> sample;
-
Set SDK point cloud reception timeout
Please refer to
recv_point_cloud_timeout
in Functional Parameter Reference. This parameter defaults to-1
, meaning that during initialization, if no valid point cloud is received, it will block and wait indefinitely. When this parameter is configured to >= 0, the SDK will wait for a period of time before initialization fails and exits. -
Set PTC timeout
Please refer to
ptc_connect_timeout
in Functional Parameter Reference. This parameter defaults to-1
, meaning that during initialization, if inDATA_FROM_LIDAR
mode, it will block and wait for PTC connection indefinitely. When this parameter is >= 0, the SDK will wait for a period of time before reporting a connection timeout error and continuing initialization.
Please refer to Point Cloud Rearrangement Function
Please refer to Functional Parameter Reference.