Skip to content

Software

Hesai LiDAR SDK 2.0

By Hesai Technology, China (checked on github.com/HesaiTechnology (opens in a new tab)), from github.com/HesaiTechnology/HesaiLidar_SDK_2.0 (opens in a new tab)

  • Perception
  • Driver or SDK
  • BSD-3-Clause

A C++ SDK for receiving and parsing point cloud data from Hesai LiDAR sensors, online over the network or offline from PCAP files.

Facts

GitHub stars
91read on 28 Nov 2026
Last update
24 Nov 2026Newest commit on master
Maintenance
Activea commit in the last 90 days
Difficulty
Intermediate
Hardware it needs, as the project states it
Operating systems: Ubuntu 16/18/20/22.04 and Windows 10. Compilers: CMake 3.8.0 or later with G++ 7.5 or later on Ubuntu, or MSVC 2019 or later on Windows. Optional dependencies: PCL for visualization, libpcap for PCAP files, and OpenSSL for TLS/mTLS PTCS communication.

Checked on GitHub on 28 Nov 2026.

Licenses

Code
BSD-3-Clause (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (BSD-3-Clause) at commit e6000a7 (opens in a new tab), on 28 Nov 2026.

Commercial use
Yes

At a glance

What it is
  • Parses live point cloud and fault data streamed by Hesai lidars, and can also parse recorded PCAP files offline.
  • Supports a broad range of Pandar, OT, QT, XT, AT, FT and JT lidar models, listed in a compatibility table.
  • Offers optional point cloud visualization through PCL, saving to PCD files, and coordinate transformation.
  • Can filter packets by source IP and port to separate data from several lidars, and run two SDK instances in parallel.
  • Provides optional GPU acceleration, multi-threaded parsing, per-point timestamps, and PTC API commands for lidar configuration.
  • Builds with CMake; the SDK can be compiled without OpenSSL when PTCS communication is not needed.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
BSD-3-Clause. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Active, last commit on 24 Nov 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit e6000a7

Robotheca read the repository at two versions: the summary at 534c707 and the facts and the README at e6000a7 (read on 28 Nov 2026).

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by Hesai Technology, at commit e6000a7, under BSD-3-Clause (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

HesaiLidar_SDK_2.0

👉 Chinese version (opens in a new tab)

1 Check Compatibility
1.1 Lidar Models
PandarOTQTXTATFTJT
Pandar40POT128PandarQTPandarXTAT128E2XFT120JT128
Pandar40MOT128_40QT128C2XPandarXT-16AT128PFTXJT64P
Pandar64--XT32M2XATX-JT16
Pandar128E3X------
Pandar90E3X------
1.2 Operating Systems
  • Ubuntu 16/18/20/22.04
  • Windows 10
1.3 Compiler Versions

Ubuntu

  • Cmake 3.8.0 and above
  • G++ 7.5 and above

Windows

  • Cmake 3.8.0 and above
  • MSVC 2019 and above
1.4 Dependencies
  • 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
2 Getting Started
2.1 Clone
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.

2.2 Compilation
2.2.1 Compilation Instructions for Ubuntu
# 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)
2.2.2 Compilation Instructions for Windows

Please refer to How to Compile SDK on Windows (opens in a new tab).

2.2.3 Remove dependency on openssl library (not using PTCS communication)

Please refer to the operations in Compile Macro Control (opens in a new tab) to configure the macro WITH_PTCS_USE to be inactive.

3 Application Guide
3.1 Parse Lidar Data Online

Please refer to How to Parse Lidar Data Online (opens in a new tab).

3.2 Parse PCAP File Data Offline

Please refer to How to Parse PCAP File Data Offline (opens in a new tab).

3.3 Point Cloud Data Visualization

Please refer to How to Visualize Point Cloud Data (opens in a new tab).

3.4 Coordinate Transformation

Please refer to How to Perform Coordinate Transformation (opens in a new tab).

3.5 Save Point Cloud Data as PCD Files

Please refer to How to Save Point Cloud Data as PCD Files (opens in a new tab).

3.6 Use GPU Acceleration

Please refer to How to Use GPU Acceleration for Performance Optimization (opens in a new tab).

3.7 Invoke SDK API Command Interface (PTC Communication)

Please refer to How to Invoke SDK API Command Interface (opens in a new tab).

3.8 Common Troubleshooting (WARNING)

Please refer to Common Troubleshooting (WARNING) (opens in a new tab).

3.9 Packet Loss Statistics

Please refer to How to Perform Packet Loss Statistics (opens in a new tab).

3.10 Use Multi-threading to Accelerate Parsing

Please refer to the thread_num configuration in Functional Parameter Reference (opens in a new tab) 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.

3.11 Parse Multiple Lidar Data Online

Navigate to multi_test.cc (opens in a new tab)

For parsing parameter configuration reference, see How to Parse Lidar Data Online (opens in a new tab)

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 (opens in a new tab)

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;

3.14 Set SDK Point Cloud Reception Timeout and PTC Timeout During Initialization
  1. Set SDK point cloud reception timeout

    Please refer to recv_point_cloud_timeout in Functional Parameter Reference (opens in a new tab). 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.

  2. Set PTC timeout

    Please refer to ptc_connect_timeout in Functional Parameter Reference (opens in a new tab). This parameter defaults to -1, meaning that during initialization, if in DATA_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.

3.15 Point Cloud Rearrangement Based on Horizontal and Vertical Angles

Please refer to Point Cloud Rearrangement Function (opens in a new tab)

4 Functional Parameter Reference

Please refer to Functional Parameter Reference (opens in a new tab).

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.