Giter Club home page Giter Club logo

hesailidar_sdk_2.0's Introduction

HesaiLidar_SDK_2.0

About the project

This repository includes the software development kit for Hesai LiDAR sensor manufactured by Hesai Technology

Support Lidar type

  • Pandar
  • AT128/AT128P
  • QT
  • FT120
  • XT16/XT32
  • ET25
  • OT

Environment and Dependencies

System environment requirement:Linux

Recommanded
-Ubuntu 16.04
-Ubuntu 18.04
-Ubuntu 20.04
-Ubuntu 22.04

Compiler vresion requirement

Cmake version requirement:Cmake 3.8.0 or above
G++ version requirement:G++ 7.5 or above

Library Dependencies: libpcl-dev + libpcap-dev + libyaml-cpp-dev + libboost-dev

$ sudo apt install libpcl-dev libpcap-dev libyaml-cpp-dev libboost-dev

Clone

$ git clone https://github.com/HesaiTechnology/HesaiLidar_SDK_2.0.git

Build

1.$ cd HesaiLidar_SDK_2.0
2.$ mkdir build
3.$ cd build
4.$ cmake ..
5.$ make

Run a sample

Set the parameters in param in main.cc or main.cu

// Reciving data from pcap file
param.input_param.source_type = DATA_FROM_PCAP;
param.input_param.pcap_path = "path/to/pcap";
param.input_param.correction_file_path = "/path/to/correction.csv";
param.input_param.firetimes_path = "path/to/firetimes.csv";
// Reciving data from connected Lidar
param.input_param.source_type = DATA_FROM_LIDAR;
param.input_param.device_ip_address = '192.168.1.201'; // 192.168.1.201 is the lidar ip address
param.input_param.ptc_port = 9347; // 9347 is the lidar ptc port
param.input_param.udp_port = 2368; // 2368 is the lidar udp port
param.input_param.host_ip_address = "192.168.1.100"; // 192.168.1.100 is the pc ip address
param.input_param.multicast_ip_address = "239.0.0.1"; // 239.0.0.1 is the lidar multcast ip address, set this parameter to "" when lidar do not support muticast

$ make 
// run a cpu sample
$ ./sample
// run a gpu sample
$ ./sample_gpu

hesailidar_sdk_2.0's People

Contributors

forstack avatar zhangyu-hesaitech avatar

Stargazers

黒猫 avatar  avatar Xiang avatar TianQi Tang  avatar quner_ avatar  avatar Shingo Kitagawa avatar  avatar

Watchers

James Cloos avatar philip avatar  avatar

hesailidar_sdk_2.0's Issues

Memory problem in the sdk example code

We tried to integrate the SDK into our product, but the source codes seem to have bugs.

$ valgrind ./sample
==12504== Memcheck, a memory error detector
==12504== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==12504== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==12504== Command: /home/correct-ai/HesaiLidar_SDK_2.0/build/sample
==12504== 
[sudo] password for correct-ai: 
-------- Hesai Lidar SDK V2.0.5 --------
logger start to run
PtcClient::PtcClient()192.168.1.2019347
virtual bool hesai::lidar::TcpClient::Open(std::string, uint16_t, bool, const char*, const char*, const char*)IP192.168.1.201port9347
TcpClient::Close()
==12504== Warning: invalid file descriptor -1 in syscall close()
Open succeed, IP192.168.1.201port9347
OS current udp socket recv buff size is: 800000000
SocketSource::Open succeed, sock:5
Lidar::Recieve Udp Thread start to run
set thread 453927232, tid 12530, policy 1 and priority 70
get thead 453927232, tid 12530, policy 0 and priority 0
Lidar::ParserThread start to run
set thread 462319936, tid 12531, policy 1 and priority 70
get thead 462319936, tid 12531, policy 0 and priority 0
==12504== Thread 4:
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x12D260: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
PtcClient::QueryCommand, warning, nPayLoadLen too large:153641
exec time: 2369.426025ms
Open firetime file failed
==12504== Thread 5:
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x127D8C: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x127DD4: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Thread 4:
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635EC: sincosf (s_sincosf.c:45)
==12504==    by 0x12D153: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635F8: sincosf (s_sincosf.c:49)
==12504==    by 0x12D153: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50637F8: sincosf (s_sincosf.c:52)
==12504==    by 0x12D153: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635EC: sincosf (s_sincosf.c:45)
==12504==    by 0x12D167: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635F8: sincosf (s_sincosf.c:49)
==12504==    by 0x12D167: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50637F8: sincosf (s_sincosf.c:52)
==12504==    by 0x12D167: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635EC: sincosf (s_sincosf.c:45)
==12504==    by 0x12D17B: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50635F8: sincosf (s_sincosf.c:49)
==12504==    by 0x12D17B: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x50637F8: sincosf (s_sincosf.c:52)
==12504==    by 0x12D17B: hesai::lidar::GeneralParser<hesai::lidar::LidarPointXYZIRT>::TransformPoint(float&, float&, float&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x12D33F: hesai::lidar::Udp7_2Parser<hesai::lidar::LidarPointXYZIRT>::ComputeXYZI(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT>&, hesai::lidar::LidarDecodedPacket<hesai::lidar::LidarPointXYZIRT>&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125D03: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::ParserThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Thread 5:
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x127DE8: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
Time between last frame and cur frame is: -211 us
==12504== Use of uninitialised value of size 8
==12504==    at 0x118E74: lidarCallback(hesai::lidar::LidarDecodedFrame<hesai::lidar::LidarPointXYZIRT> const&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x127E03: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Use of uninitialised value of size 8
==12504==    at 0x512E310: _itoa_word (_itoa.c:179)
==12504==    by 0x51433E3: __vfprintf_internal (vfprintf-internal.c:1687)
==12504==    by 0x51C79AF: __printf_chk (printf_chk.c:33)
==12504==    by 0x127E03: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x512E318: _itoa_word (_itoa.c:179)
==12504==    by 0x51433E3: __vfprintf_internal (vfprintf-internal.c:1687)
==12504==    by 0x51C79AF: __printf_chk (printf_chk.c:33)
==12504==    by 0x127E03: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x5143FE8: __vfprintf_internal (vfprintf-internal.c:1687)
==12504==    by 0x51C79AF: __printf_chk (printf_chk.c:33)
==12504==    by 0x127E03: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== Conditional jump or move depends on uninitialised value(s)
==12504==    at 0x51434B0: __vfprintf_internal (vfprintf-internal.c:1687)
==12504==    by 0x51C79AF: __printf_chk (printf_chk.c:33)
==12504==    by 0x127E03: hesai::lidar::HesaiLidarSdk<hesai::lidar::LidarPointXYZIRT>::Run() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
frame:0 points:13320 packet:110 start time:24747.176999 end time:24747.246599
Time between last frame and cur frame is: 157937 us
frame:1 points:19200 packet:159 start time:24747.247899 end time:24747.346599
frame:2 points:19200 packet:159 start time:24747.347899 end time:24747.446599
frame:3 points:19200 packet:159 start time:24747.447899 end time:24747.546599
frame:4 points:19200 packet:159 start time:24747.547899 end time:24747.646599
frame:5 points:19680 packet:163 start time:24747.647899 end time:24747.746599
frame:6 points:19680 packet:163 start time:24747.747899 end time:24747.846599
frame:7 points:19680 packet:163 start time:24747.847899 end time:24747.946599
frame:8 points:19680 packet:163 start time:24747.947899 end time:24748.046599
frame:9 points:19680 packet:163 start time:24748.047899 end time:24748.146599
frame:10 points:19680 packet:163 start time:24748.147899 end time:24748.246598
frame:11 points:19680 packet:163 start time:24748.247898 end time:24748.346598
frame:12 points:19680 packet:163 start time:24748.347898 end time:24748.446598
frame:13 points:19680 packet:163 start time:24748.447898 end time:24748.546598
frame:14 points:19680 packet:163 start time:24748.547898 end time:24748.646598
frame:15 points:19680 packet:163 start time:24748.647898 end time:24748.746598
frame:16 points:19680 packet:163 start time:24748.747898 end time:24748.846598
frame:17 points:19680 packet:163 start time:24748.847898 end time:24748.946598
frame:18 points:19680 packet:163 start time:24748.947898 end time:24749.046598
frame:19 points:19680 packet:163 start time:24749.047898 end time:24749.146598
frame:20 points:19800 packet:164 start time:24749.147898 end time:24749.246598
frame:21 points:19680 packet:163 start time:24749.247898 end time:24749.346598
frame:22 points:19800 packet:164 start time:24749.347898 end time:24749.446598
frame:23 points:19680 packet:163 start time:24749.447898 end time:24749.546598
frame:24 points:19800 packet:164 start time:24749.547898 end time:24749.646598
frame:25 points:19800 packet:164 start time:24749.647898 end time:24749.746598
frame:26 points:19680 packet:163 start time:24749.747898 end time:24749.846598
frame:27 points:19680 packet:163 start time:24749.847898 end time:24749.946598
frame:28 points:19200 packet:159 start time:24749.947898 end time:24750.046598
Time between last frame and cur frame is: 152129 us
frame:29 points:19200 packet:159 start time:24750.047898 end time:24750.146597
Time between last frame and cur frame is: 164200 us
frame:30 points:19200 packet:159 start time:24750.147897 end time:24750.246597
Time between last frame and cur frame is: 169864 us
frame:31 points:19200 packet:159 start time:24750.247897 end time:24750.346597
Time between last frame and cur frame is: 150180 us
frame:32 points:19200 packet:159 start time:24750.347897 end time:24750.446597
Time between last frame and cur frame is: 153033 us
frame:33 points:19200 packet:159 start time:24750.447897 end time:24750.546597
Time between last frame and cur frame is: 161839 us
frame:34 points:19200 packet:159 start time:24750.547897 end time:24750.646597
Time between last frame and cur frame is: 158222 us
frame:35 points:19200 packet:159 start time:24750.647897 end time:24750.746597
Time between last frame and cur frame is: 156854 us
frame:36 points:19200 packet:159 start time:24750.747897 end time:24750.846597
Time between last frame and cur frame is: 152732 us
frame:37 points:19200 packet:159 start time:24750.847897 end time:24750.946597
Time between last frame and cur frame is: 158051 us
frame:38 points:19200 packet:159 start time:24750.947897 end time:24751.046597
Time between last frame and cur frame is: 158314 us
frame:39 points:19200 packet:159 start time:24751.047897 end time:24751.146597
Time between last frame and cur frame is: 159394 us
frame:40 points:19200 packet:159 start time:24751.147897 end time:24751.246597
Time between last frame and cur frame is: 159979 us
frame:41 points:19200 packet:159 start time:24751.247897 end time:24751.346597
Time between last frame and cur frame is: 158125 us
frame:42 points:19200 packet:159 start time:24751.347897 end time:24751.446597
Time between last frame and cur frame is: 160574 us
frame:43 points:19200 packet:159 start time:24751.447897 end time:24751.546596
Time between last frame and cur frame is: 162855 us
frame:44 points:19200 packet:159 start time:24751.547896 end time:24751.646596
Time between last frame and cur frame is: 159933 us
frame:45 points:19200 packet:159 start time:24751.647896 end time:24751.746596
Time between last frame and cur frame is: 160442 us
frame:46 points:19200 packet:159 start time:24751.747896 end time:24751.846596
Time between last frame and cur frame is: 158796 us
frame:47 points:19200 packet:159 start time:24751.847896 end time:24751.946596
Time between last frame and cur frame is: 161713 us
frame:48 points:19200 packet:159 start time:24751.947896 end time:24752.046596
Time between last frame and cur frame is: 158823 us
frame:49 points:19200 packet:159 start time:24752.047896 end time:24752.146596
Time between last frame and cur frame is: 156413 us
frame:50 points:19200 packet:159 start time:24752.147896 end time:24752.246596
Time between last frame and cur frame is: 162592 us
frame:51 points:19200 packet:159 start time:24752.247896 end time:24752.346596
Time between last frame and cur frame is: 157105 us
frame:52 points:19200 packet:159 start time:24752.347896 end time:24752.446596
Time between last frame and cur frame is: 169172 us
frame:53 points:19200 packet:159 start time:24752.447896 end time:24752.546596
frame:54 points:19200 packet:159 start time:24752.547896 end time:24752.646596
Time between last frame and cur frame is: 156064 us
frame:55 points:19200 packet:159 start time:24752.647896 end time:24752.746596
^C==12504== 
==12504== Process terminating with default action of signal 2 (SIGINT)
==12504==    at 0x484F0A8: __GI_memcpy (in /usr/lib/aarch64-linux-gnu/valgrind/vgpreload_memcheck-arm64-linux.so)
==12504==    by 0x125F13: void hesai::lidar::Ring<hesai::lidar::UdpPacket, 36000ul>::emplace_back<hesai::lidar::UdpPacket&>(hesai::lidar::UdpPacket&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x125FD3: void hesai::lidar::BlockingRing<hesai::lidar::UdpPacket, 36000ul>::emplace_back<hesai::lidar::UdpPacket&>(hesai::lidar::UdpPacket&) (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x1261BF: hesai::lidar::Lidar<hesai::lidar::LidarPointXYZIRT>::RecieveUdpThread() (in /home/correct-ai/HesaiLidar_SDK_2.0/build/sample)
==12504==    by 0x4A7B623: ??? (in /usr/lib/aarch64-linux-gnu/libboost_thread.so.1.71.0)
==12504==    by 0x4E0B623: start_thread (pthread_create.c:477)
==12504==    by 0x51BA49B: thread_start (clone.S:78)
==12504== 
==12504== HEAP SUMMARY:
==12504==     in use at exit: 398,343,310 bytes in 51 blocks
==12504==   total heap usage: 71 allocs, 20 frees, 399,141,224 bytes allocated
==12504== 
==12504== LEAK SUMMARY:
==12504==    definitely lost: 153,632 bytes in 2 blocks
==12504==    indirectly lost: 0 bytes in 0 blocks
==12504==      possibly lost: 1,280 bytes in 4 blocks
==12504==    still reachable: 398,188,398 bytes in 45 blocks
==12504==                       of which reachable via heuristic:
==12504==                         newarray           : 296 bytes in 1 blocks
==12504==         suppressed: 0 bytes in 0 blocks
==12504== Rerun with --leak-check=full to see details of leaked memory
==12504== 
==12504== Use --track-origins=yes to see where uninitialised values come from
==12504== For lists of detected and suppressed errors, rerun with: -s
==12504== ERROR SUMMARY: 9741641 errors from 18 contexts (suppressed: 0 from 0)

fails to read pcap file to the true end of file

Hi.
I'm using Hesai XT-32 LiDAR and HesaiLidar_SDK_2.0.
In the case of reading a pcap file that was recorded by PandarView 2, the SDK fails to read the pcap file to the end.
I had captured 110 frames with PandarView 2 but the SDK only read the file only 37 frames.
I also took a test to read the pcap file on Hesai General SDK which is older and the result was different.
Hesai General SDK can read the file fully (all 110 frames).

pcap文件转为pcd文件

你好,我想问一下,是否有现成的包支持把pcap文件,解析成pcd文件,我用的你们的pandarview2软件貌似 dump出来的pcd文件有问题......

时间戳错误

您好,我在使用这个SDK解析pcap,并存为pcd文件后,发现时间戳不对。 请问该如何解决呢?

终端显示:

-------- Hesai Lidar SDK V2.0.2 --------
logger start to run
Lidar::Recieve Udp Thread start to run
set thread 140532309292800, tid 1564778, policy 1 and priority 99
Lidar::ParserThread start to run
set thread 140532300900096, tid 1564779, policy 1 and priority 99
get thead 140532309292800, tid 1564778, policy 1 and priority 99
get thead 140532300900096, tid 1564779, policy 1 and priority 99
load correction file from local correction.csv now!
Open correction file success
frame_num: 3
start_frame, end_frame: 
22.748438,   143.178909
143.178909,   262.818817
262.818817,   22.748438
Parse local Correction file Success!!!
Open firetime file success!
frame:0 points:157440 packet:614 start time:1594044082.332956 end time:1594044082.384163
frame:1 points:160000 packet:624 start time:1594044082.431781 end time:1594044082.483818
frame:2 points:160000 packet:624 start time:1594044082.531685 end time:1594044082.583723
frame:3 points:160000 packet:624 start time:1594044082.632050 end time:1594044082.684085
frame:4 points:160256 packet:625 start time:1594044082.731746 end time:1594044082.783867
frame:5 points:159744 packet:623 start time:1594044082.831734 end time:1594044082.883689
frame:6 points:160256 packet:625 start time:1594044082.932015 end time:1594044082.984136
frame:7 points:160000 packet:624 start time:1594044083.031795 end time:1594044083.083832
frame:8 points:159744 packet:623 start time:1594044083.131742 end time:1594044083.183696

在保存下来的pcd中,可以看到:

# .PCD v0.7 - Point Cloud Data file format
VERSION 0.7
FIELDS x y z intensity timestamp ring
SIZE 4 4 4 4 8 2
TYPE F F F F F U
COUNT 1 1 1 1 1 1
WIDTH 64256
HEIGHT 1
VIEWPOINT 0 0 0 1 0 0 0
POINTS 64256
DATA ascii
0 0 0 0 1.5940439e+09 0
0 0 0 0 1.5940439e+09 1
0 0 0 0 1.5940439e+09 2
0 0 0 0 1.5940439e+09 3
0 0 0 0 1.5940439e+09 4
0 0 0 0 1.5940439e+09 5
0 0 0 0 1.5940439e+09 6
0 0 0 0 1.5940439e+09 7
0 0 0 0 1.5940439e+09 8
10.947319 -2.4355142 2.1962876 14 1.5940439e+09 9
10.991138 -3.0672622 2.1934462 14 1.5940439e+09 10
11.272779 -2.5079212 2.1781437 16 1.5940439e+09 11
11.278367 -3.1474183 2.166261 14 1.5940439e+09 12
11.625404 -2.5863719 2.1604385 16 1.5940439e+09 13
11.645407 -3.2498469 2.1497447 14 1.5940439e+09 14

编译失败

In file included from /usr/include/vtk-7.1/vtkRenderingLODModule.h:36,
from /usr/include/vtk-7.1/vtkLODActor.h:59,
from /usr/include/pcl-1.10/pcl/visualization/common/actor_map.h:44,
from /usr/include/pcl-1.10/pcl/visualization/pcl_visualizer.h:48,
from /home/hoo/github_src/HesaiLidar_SDK_2.0/./test/main.cu:4:
/usr/include/vtk-7.1/vtkRenderingCoreModule.h:47: error: unterminated argument list invoking macro "VTK_AUTOINIT1"
47 | #endif
|
CMake Error at sample_gpu_generated_main.cu.o.Release.cmake:216 (message):
Error generating
/home/hoo/github_src/HesaiLidar_SDK_2.0/build/CMakeFiles/sample_gpu.dir/./test/./sample_gpu_generated_main.cu.o

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.