hesaitechnology / hesailidar_general_ros Goto Github PK
View Code? Open in Web Editor NEWROS driver for PandarXT PandarQT Pandar64 Pandar40P Pandar40M Pandar20A Pandar20B
License: Other
ROS driver for PandarXT PandarQT Pandar64 Pandar40P Pandar40M Pandar20A Pandar20B
License: Other
Hello.
I would like to discuss the support ros2 for HesaiLidar_General_ROS.
Is there a plan to support ros2? I didn't find ros2 driver for PandarQT lidar from yours.
Hello,
Anyone successfully built the ROS2 branch in galactic distribution?
Running command colcon build --symlink-install
returns the following error message.
Starting >>> hesai_lidar
--- stderr: hesai_lidar
** WARNING ** io features related to openni will be disabled
** WARNING ** io features related to openni2 will be disabled
** WARNING ** io features related to pcap will be disabled
** WARNING ** io features related to png will be disabled
** WARNING ** io features related to libusb-1.0 will be disabled
CMake Error at /opt/ros/galactic/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake:77 (message):
ament_target_dependencies() the passed package name 'pcl_conversions' was
not found before
Call Stack (most recent call first):
CMakeLists.txt:92 (ament_target_dependencies)
---
Failed <<< hesai_lidar [2.01s, exited with code 1]
Summary: 0 packages finished [2.09s]
1 package failed: hesai_lidar
1 package had stderr output: hesai_lidar
Any help is much appreciated.
Just as the title says, I want to use the ring infomation when I use PandarQT. Can I get it in ROS?
We would like to do an experiment on XYZIRT type point cloud, and since we are using your panda40 model LIDAR, I wonder how to collect this type of point cloud data? Is it supported?
Hope to get a quick answer!
Hi,
I followed the steps from README.md, but after the build with catkin_make -DCMAKE_BUILD_TYPE=Release
there is no install folder. Please take a look at the attached command history.
HesaiLidar_General_ROS_terminal_commands_history.txt
However, I found another tutorial on YT on Hesai Lidar Tutorial #3: Run ROS Driver with Connected Lidar and after executing catkin build --force-cmake
I got install folder.
But still do not get the timestamp and point size in terminal output as per YT tutorial.
Please see attached command history:
[Youtube ]- Hesai Lidar Tutorial #3 Run ROS Driver with Connected Lidar_terminal_commands_history.txt
The lidar is working properly using Pandar.exe.
The host OS is Windows 10, installed WSL1 and Ubuntu 18.04 with ROS melodic.
host_spec.txt
Thank you.
Best,
Danijel
In the same PC running on ubuntu 16.04, two processes need to read the same pandar40p lidar data. However, the socket binding fails because of the twice binding to the same address and port. Is there anyone solving the problem? Thank you so much!
Hello ,
I got the chance to test a lidar Pandar 64 . I followed instructions from Github to install the ROS packages all was successful . Unfortunately I am not able to receive any thing from topic /rawpoints.
I use Ubuntu 18.04 and ROS melodic .
I guess I have a setting problem .
Can you help me maybe ? It would be nice :)
++++++++++++++++++++++++++++++
I got from system following :
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://aicore:45053/
SUMMARY
PARAMETERS
NODES
/
hesai_lidar (hesai_lidar/hesai_lidar_node)
ROS_MASTER_URI=http://localhost:11311
process[hesai_lidar-1]: started with pid [24796]
TCP Command Client Init Success!!!
I have a gps device but the ip addrres is different to Pandar20B, so I don't know how to connect to GPS with Pandar20B.
And after that how to use it?
what does the meaning of "timestamp"in the field of point cloud? and what the difference of the "timestamp" between PandarQT and velodyne lidar ? how does the pandarQT convert to the format of velodyne about "timestamp"? can you give me some advices。 thank you!
Hi.
I want to ask two questions. Thanks for watching.
How long does PandarQT take for firing lasers and moving motor from stop status using standby-mode function?
Do you have any plan to develop "Standby mode" in ROS driver?
I mean [In operation]<->[Standby] function mentioned in PandarQT document.
如若用topic bag就没法实时了,技穷了。
又看了下,貌似是PCL里面的,C++小白太难了
自己尝试写了下,貌似搞出来了
My goal is to obtain a sorted pointcloud, and while searching the code I came upon the pcldata_type flag which is supposed to change the pointcloud to become structured. I changed the flag to 1 to see if there are any changes to the pointcloud but no changes happened. I'm having difficulty understanding what is the purpose of this flag.
I wanted to test out the pcap input using the sample pcap file from:
https://www.hesaitech.com/en/download/1?product=Pandar64
Next I launched the pcap:
roslaunch hesai_lidar hesai_lidar.launch pcap_file:="/root/hesai.pcap"
Here is what I get:
started core service [/rosout]
process[hesai/hesai_lidar-2]: started with pid [9880]
///////////////////////////////////////////////////////////////
// PandarGeneralSDK version: PandarGeneralROS_1.1.12 //
///////////////////////////////////////////////////////////////
set environment TZ=UTC0
Open correction file /root/hesai_ws/src/HesaiLidar_General_ROS/config/Pandar64.csv succeed
Parse Lidar Correction...
Load correction file from /root/hesai_ws/src/HesaiLidar_General_ROS/config/Pandar64.csv succeed
buffer don't have space!,1795
buffer don't have space!,3001
buffer don't have space!,5401
buffer don't have space!,7801
what does this mean? Am I feeding the pcaps incorrectly?
禾赛科技的工程师:
你们好!
我使用了官网上面下载的车道线pcap文件,部署完成了ros环境配置,现在运行loam以后通过将fixedframe设置为Pandar40P,可以回放pcap文件显示点云数据,但是无法进行loam的同步建图,Global status中显示 no tf data。
想咨询一下我应该具体如何设置才能完成loam的建图,还是需要修改loam的源码。
感激不尽!期待您的回答!
您好。我们项目使用了pandar40p这款雷达。依据产品说明书。雷达在转速为600rpm时,水平分辨率0.2°。我阅读ros驱动代码,感觉代码是将10个block封装为一个package。也就是一个package代表2°的数据。但是我没有找到一帧topic为/pandar的pointcloud2,包含的数据是否正好是雷达旋转360°的数据,即正好由180个package构成。
综上,我的问题主要是pandar40p经ros驱动后,发出的话题为/pandar的一帧点云是否正好包含的是雷达旋转360°数据。或者是包含了360°以上的数据。如果您能解答我真的万分感谢。。
Ubuntu18.4,ROS(Melodic),gcc 7.5.0,
工程目录结构
HesaiLidar_General_SDK/
buile/
main.cpp
CMakeLists.txt
main.cpp只有回调函数lidarCallback和主函数,
int main(int argc,char **argv)
{
PandarGeneralSDK pandarGeneral(std::string("/home/user/Desktop/PCAP/PandarQT_Cars.pcap"),
lidarCallback, 0, 0, 1, std::string("PandarQT"));
pandarGeneral.LoadLidarCorrectionFile(string("/home/user/Desktop/PCAP/PandarQTCorrectionFile.csv"));
pandarGeneral.Start();
while (true)
{
sleep(100);
}
return 0;
}
void lidarCallback(boost::shared_ptr cld, double timestamp)
{
printf("Frame timestamp:%lf,Point Size:%ld\n",timestamp,cld->points.size());
}
输出结果只有三行
Parse Lidar Correction...
Frame timestamp:1575604314.808093,Point Size:102
Frame timestamp:1575604314.808315,Point Size:22337
Frame timestamp:1575604314.908207,Point Size:22408
^C
但我读取的这个pcap文件肯定不止3个PPointCloud,因此对pcap文件的读取存在问题,查不出原因?
Hi
we experience the following error whilst compiling the newest version of this repo:
In file included from /catkin_ws/src/HesaiLidar_General_ROS/src/HesaiLidar_General_SDK/src/PandarGeneralRaw/src/pandarGeneral_internal.cc:20:0:
/catkin_ws/src/HesaiLidar_General_ROS/src/HesaiLidar_General_SDK/src/PandarGeneralRaw/src/pandarGeneral_internal.h:35:10: fatal error: hesai_lidar/PandarScan.h: No such file or directory
#include "hesai_lidar/PandarScan.h"
We can only solve this by compiling the workspace a second time.
Any ideas?
Cheers
Markus
I have Pandar64, using it for SLAM with Imu and other sensors. I need time synchronazition, what is timestamp realtime time source? Can i change the time source for ros::TIme::Now(), because time synchornize still has big problem for me.
Hi,
I'm trying to use the Hesai PandarQT LIDAR on Ubuntu 20.04 with ROS Noetic, however I'm running into a lot of build issues. I know the the github mentions support for Ubuntu 16.04/18.04 and ROS kinetic/melodic only, but have you started supporting for 20.04/Noetic yet? Any idea regarding the below build issues, I know there was a related post to boost errors similar to those below in July 2020, however, can you provide some guidance on how to resolve these issues.
I am working on the following things:
System: Ubuntu 18.04
Lidar: PandarQT
I am running into the following error
I am able to see the cloud in Pandarview.
I am running the following command to run the node:
roslaunch hesai_lidar hesai_lidar.launch lidar_type:="PandarQT" frame_id:="PandarQT"
One more thing I observed is I am not having the install folder when using the mentioned catkin_make command as in the instructions.
We are planning to use multiple lidars in our project. However we cannot launch multiple instances of the driver because it transmits to fixed/pandar
topic and to fixed tf frame (Pandar40P
for example) cannot be changed.
It would really be appeciated if frame and topic could be parameterized in the launch file.
Issue: We would like to use the HesaiLidar_General_ROS repository as a library and develop a custom package using the class defined in your repository. Unfortunately, we can not use the HesaiLidarClient class because it is defined in src/main.cc together with a main function.
Potential Fix: In order to #include the class defintion in any custom packages, it would be interesting to define it in another file than src/main.cc.
您好,遇到这样的问题;根据https://github.com/HesaiTechnology/HesaiLidar_General_ROS 指引操作后,如下图所示:
但是使用rostopic echo xx 时没返回雷达数据;请指教...
您好,如何将每一帧点云的时间戳设置为最后一个点的时间
Hi, I got one Pandar64 Lidar here and the timestamp shown in both PandarView and ROS topic is wrong and misordered which the date is shown as 2017.3.2 (It is supposed to be 2020.9.2).
Pleeeeazzzzz tell me what is wrong with it and how to fix it.
Thanks in advance!
Nodelet error occurs, when the package was built with install option.
Please add following lines to the cmake file:
install(
FILES nodelets.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
Why use the timestamp from the LiDAR time?
HesaiLidar_General_ROS/src/main.cc
Line 95 in 035e54d
The messages published by the lidar ros driver are often used by other nodes like localization, recognition.
At that time, a header time of lidar point message is necessary info to calculate latency or data interfolation, etc..
If the driver use the time from LiDAR sensor not roscore time, user should write codes to get rostime in duplicate.
I think, below code looks more good.
pcl_conversions::toPCL(ros::Time::now(), cld->header.stamp);
We want to use PandarXT-16 to collect XYZIRT type point cloud data. We wonder if this radar can support this kind of point cloud data information?
Hope to get your reply! thank you
The PandarGeneral library is dependent on getNowTimeSec() from util but that library is not linked and can't be linked because it would create a circular dependency.
Not sure how this is working for anyone else.
Processes related to ROS node of the drivers consume more CPU time than expected.
On our ARM64 based platform the nodes consume 50-60% CPU. Using 4 LIDARs will continuously block 2 CPU cores. In comparison another LIDAR driver uses 5-7%.
Is this expected? Are there settings/other ways to reduce this usage?
Thanks in advance,
When I modify the Azimuth Field of View settings from the Web Control of Ending to be less than 360, no data (packets/pointclouds) is being published.
It is working fine when:
Start: 0~359
End: 360
It is not working fine when:
Start: 0
End: 1~359
I captured successfully with Pandar 40P however I'm receiving an exception when using PandarQT LIDAR.
roslaunch hesai_lidar hesai_lidar.launch lidar_type:="PandarQT"
started roslaunch server http://developmentenv:34601/
SUMMARY
========
PARAMETERS
* /hesai_lidar/gps_port: 10110
* /hesai_lidar/lidar_correction_file: /home/...
* /hesai_lidar/lidar_recv_port: 2368
* /hesai_lidar/lidar_type: PandarQT
* /hesai_lidar/pcldata_type: 0
* /hesai_lidar/server_ip: 192.168.2.201
* /hesai_lidar/start_angle: 0.0
* /rosdistro: melodic
* /rosversion: 1.14.6
NODES
/
hesai_lidar (hesai_lidar/hesai_lidar_node)
ROS_MASTER_URI=http://developmentenv:11311/
process[hesai_lidar-1]: started with pid [11672]
TCP Command Client Init Success!!!
Parse Lidar Correction...
Parse Lidar Correction Success!!!
terminate called after throwing an instance of 'std::runtime_error'
what(): Time is out of dual 32-bit range
OS: Ubuntu 18.04
ROS Version: Melodic
Hardware: PandarQT
The device is directly connected to the host with an ethernet cable.
The difference from Pandar40P is that the time source is selected as PTP in PandarQT, as opposed to GPS in Pandar40P.
ptpd
and provided a clock source to the PandarQT.I want to fix this problem. Could everyone help me?
Thanks
I follow the tutorial to build and configurate the source. But when I runroslaunch hesai_lidar hesai_lidar.launch lidar_type:="PandarXT-32"
, I got the following error:
... logging to /home/nickle/.ros/log/4b5f7df8-461b-11ea-a086-2cf05d3dad57/roslaunch-nickle-3806.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
RLException: Invalid <node> tag: <node> tag has an empty 'ns' attribute.
Node xml is <node name="hesai_lidar" ns="$(arg namespace)" output="screen" pkg="hesai_lidar" type="hesai_lidar_node">
<param name="pcap_file" type="string" value="$(arg pcap_file)"/>
<param name="server_ip" type="string" value="$(arg server_ip)"/>
<param name="lidar_recv_port" type="int" value="$(arg lidar_recv_port)"/>
<param name="gps_port" type="int" value="$(arg gps_port)"/>
<param name="start_angle" type="double" value="$(arg start_angle)"/>
<param name="lidar_type" type="string" value="$(arg lidar_type)"/>
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="pcldata_type" type="int" value="$(arg pcldata_type)"/>
<param name="publish_type" type="string" value="$(arg publish_type)"/>
<param name="timestamp_type" type="string" value="$(arg timestamp_type)"/>
<param name="data_type" type="string" value="$(arg data_type)"/>
<param name="lidar_correction_file" type="string" value="$(arg lidar_correction_file)"/>
</node>
The traceback for the exception was written to the log file
Apart from the compiling errors reported in #8, there are some errors introduced in the latest commits. As can be seen in the image below, the code is trying to used an undeclared variable. This error exists in many functions, where the parameter is called pkt instead of packet.
Apparently, it is just a variable naming issue. However, after replacing packet by pkt in the affected methods, a new error is thrown:
It would be desirable to have a reliable driver with periodical updates that offer support to OS and dependencies version upgrades. However, at least it should be mandatory that known issues are solved and commits are tested before being pushed to the repository.
Hi Hesai-Crew,
first of all: Thank you very much for this ROS driver. It helps a lot, but unfortunately we encounter problems when we want the time of our PTP master clock to be used in header->stamp
and in the timestamps of each and every point in the custom PPointCloud
message. But instead of the master clock time we experience an offset in the timestamp of about 20 years. Is there a bug in the ROS-driver? How do we fix this?
Thank you :)
Cheers
Markus
Hello,
Does this driver support reading the pcap files recorded by PandarView to publish in ROS msg (sensor_msg/Pointcloud2)?
Thanks.
Hi, I will buy a Hesai PandarQT.
And I want to get points within 0.1m around LiDAR
So, I found
[HesaiLidar_General_ROS/src/HesaiLidar_General_SDK/src/PandarGeneralRaw/src/pandarGeneral_internal.cc] has
...
/* skip wrong points */
if (unit.distance <= 0.1 || unit.distance > 200.0) {
continue;
}
...
So, If I change the value of [unit.distance], could I get a value within 0.1m?
I wonder if it is a hardware limitation or software one.
Thank you!
i have received a demo unit of the PandarQT 128 and am working to set up the drivers so far i have it installed however it seems there is no support for te QT128 in the general ROS drivers. When running this with the 128 and QT drivers i get the following.
Running ros noetic
started roslaunch server http://scrubbed-hostname:45385/
SUMMARY
========
PARAMETERS
* /hesai/hesai_lidar/coordinate_correction_flag: False
* /hesai/hesai_lidar/data_type:
* /hesai/hesai_lidar/fixed_frame:
* /hesai/hesai_lidar/frame_id: Pandar128
* /hesai/hesai_lidar/gps_port: 10110
* /hesai/hesai_lidar/lidar_correction_file: /home/foobar/he...
* /hesai/hesai_lidar/lidar_recv_port: 2368
* /hesai/hesai_lidar/lidar_type: Pandar128
* /hesai/hesai_lidar/multicast_ip:
* /hesai/hesai_lidar/pcap_file:
* /hesai/hesai_lidar/pcldata_type: 0
* /hesai/hesai_lidar/publish_type: points
* /hesai/hesai_lidar/server_ip: 192.168.1.201
* /hesai/hesai_lidar/start_angle: 0.0
* /hesai/hesai_lidar/target_frame:
* /hesai/hesai_lidar/timestamp_type:
* /rosdistro: noetic
* /rosversion: 1.15.13
NODES
/hesai/
hesai_lidar (hesai_lidar/hesai_lidar_node)
auto-starting new master
process[master]: started with pid [279273]
ROS_MASTER_URI=http://localhost:11311/
setting /run_id to 8fba1064-7bb9-11ec-9c5b-5f43f2563725
process[rosout-1]: started with pid [279294]
started core service [/rosout]
process[hesai/hesai_lidar-2]: started with pid [279301]
///////////////////////////////////////////////////////////////
// PandarGeneralSDK version: PandarGeneralROS_1.1.12 //
///////////////////////////////////////////////////////////////
set environment TZ=UTC0
TcpCommandClientNew
TCP Command Client Init Success!!!
Load correction file from lidar
publishRawDataThread:set result [1]
publishRawDataThread:get thead 139726375347968, policy 0 and priority 0
buffer is: ,len is: -2067997732
tcpCommandClient_SendCmd
TcpCommand_buildHeader
tcpCommandReadCommand
tcpCommandHeaderParser
Parse Lidar Correction...
*** stack smashing detected ***: terminated
There is no messages that output and no logs that get produced.
The launch file is default with the exception of the correction file wich i had updated to point to the pandar128 (non QT) correction file as there is no correction file yet for the QT128. I tested both the QT and 64 correction files too.
I also shut off all other applications to validate this is not simply interfering with other running apps using resources and it persists.
please advise.
It seems that the driver don't support to parse the Pandar40P packets with UDP sequence.
How can we get this done and what benefit can we get to set the UDP sequence ON?
I cann't use this driver for any usual slam such as, cartographer、loam、lio-samT. This timestamp for this driver cann't used for point cloud deskew,if no GPS or ptp devices.
当我在launch文件中 timestamp 设置为realtime,使用系统时间时,每帧点云的每个点都变成一样,在进行点云畸变矫正时,出现了比较大的问题,请问这部分有解决办法吗?
As an official driver, this repo is far from qualified.
serverIp, lidarRecvPort, gpsPort
weird naming in the main function: pandora. (I know you are copying and pasting)
Most importantly, this code doesn't work for pandar40p.
To conclude, as an official driver provided by an international lidar manufacturer, this repo is astonishingly ugly.
Hello, authors,
I have a PandarXT-16, could you please give some advice of how to set the following params when i run with a slam system(lio-sam etc.), although i have read readme doc.
"pcldata_type": 0:mixed point clouds data type 1:structured point clouds data type
What's meaning of mixed
and structured
?
"lidar_correction_file": "hesai_lidar_config_csvs/PandarXT-16.csv"
I found lidar_correction_file PandarXT-16.csv in the config directory, param coordinate_correction_flag
should be true
or false
?
BTW, the frame id in this driver code is this picture
Thanks for your help a lot!
Hello,
I am a studient and I try, for a autonomous-car project, to communicate between a pandar40M and ROS melodic (ubuntu 18.04) (Virtual machine).
I followed "https://github.com/HesaiTechnology/HesaiLidar_General_ROS" and when i launch "roslaunch hesai_lidar hesai_lidar.launch lidar_type:="Pandar40M"", the programme seems to be stop after to have written " Parse Lidar Correction success !!!". (see the attached picture)
When i ask "rostopic list", i see "/pandar" in the list. But when I ask "rostopic echo /pandar", nothing is displaying.
When i use rviz, we can add display by topic '/pandar but we cannot change fixed frame to lidar_type. Just "map" is written but any lidar_type is selectable.
I try to do the same thing on ROS kinetic on ubuntu 16.04 and it is exactly the same thing.
Could you help me please?
Hi Mr @hesaiwuxiaozhou,
We received two PandarQT from your company.
We are exploring your devices. Using your SDK, we can receive Cloud Points by lidar_callback() function.
We now want to receive a entire frame (360 degree) then analysis and display.
Do you support any samples for that? If no, please tell us, how to do that.
Thanks,
We encountered an issue when we are working with Pandar40P lidar.
We are capturing data from Pandar40P lidar on ROS using the official ROS drivers. We are observing some latencies accumulating during the capture in some scenes. These latencies accumulate up to 30 seconds and more. We observed that in some scenes that we see latencies blocking the lidars view approximately about 90 degress around 0 degree (from -45 degrees to 45 degrees) and lower elevations prevents latencies. Since delays occur in certain scenes and blocking certain regions of the view prevents the latencies, we concluded that this may be a software issue.
Is this a known issue? Are there software/firmware fixes for this issue? Are there firmware updates for this that you can provide for us?
Our current setup is as follows:
Host OS: Ubuntu 18.04
ROS Version: Melodic
Ros drivers: https://github.com/HesaiTechnology/HesaiLidar_General_ROS (master branch commit 182e67c)
Lidar firmware
Software Version: 2.9.6
Firmware of Sensor Version: 4.3.37a
Firmware of Controller Version: 4.49
Update: Apparently the latencies occur in dual return mode only. The difference is the number of points decreases to half of the original. It might be related to high cpu usage (#23 ).
Solved
Hi:
I want to know which tf the lidar is when I want to transform the information from the Lidar to the odom? I use a 64-lines PandarQT Lidar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.