HesaiTechnology / HesaiLidar_General_ROS

ROS driver for PandarXT PandarQT Pandar64 Pandar40P Pandar40M Pandar20A Pandar20B
Other
161 stars 102 forks source link

buffer don't have space! when running with pcap file input #43

Open tianshiz opened 3 years ago

tianshiz commented 3 years ago

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?

tianshiz commented 2 years ago

this is happening randomly on the same pcap. sometimes the pcap works sometimes it doesnt

yangfanFred commented 2 years ago

Hi tianshiz,

Please go through our readme for launching steps. It seems like you didn't give correct lidar type, eg. "lidar_type:="Pandar64""

Thanks,

tianshiz commented 2 years ago

Hi Fred,

Sorry I didn't update the post. I did eventually add the lidar_type:="Pandar64". But, even running w/ the sample data provided by Hesai for Pandar64, I've found the application to be unreliable. Sometimes it will work, sometimes it will give me this error.

Are you not seeing that w/ this data?

tianshiz commented 2 years ago

Hi Fred, I have a model XT32M2X and used the following to run the pcap file. The problem is that its inconsistent at best. Sometimes its able to run through the entire pcap, but other times, it could be playing halfway through and then I get the "buffer don't have space!" warning, and then the pcap stops playing. 50% of the time, it gives me the warning immediately and I have to restart.

I would have to re-run this several times and get "lucky" for it to work. Can I please get some support here?

roslaunch hesai_lidar hesai_lidar.launch pcap_file="test.pcap" lidar_type:="PandarXTM" frame_id="PandarXTM" lidar_correction_file:="correction.csv"

test.pcap: https://drive.google.com/file/d/1ADX8B5q9BwdAubOGtbT0M1psw-vWYXFZ/view?usp=sharing

correction.csv: `<!DOCTYPE html>

Channel | Elevation | Azimuth -- | -- | -- 1 | 19.462 | 0.484 2 | 18.165 | 0.48 3 | 16.862 | 0.47 4 | 15.562 | 0.46 5 | 14.265 | 0.451 6 | 12.966 | 0.441 7 | 11.709 | 0.432 8 | 10.41 | 0.423 9 | 9.109 | 0.413 10 | 7.804 | 0.401 11 | 6.507 | 0.385 12 | 5.211 | 0.361 13 | 3.919 | 0.336 14 | 2.622 | 0.328 15 | 1.331 | 0.32 16 | 0.032 | 0.311 17 | -1.271 | 0.301 18 | -2.566 | 0.295 19 | -3.862 | 0.287 20 | -5.159 | 0.281 21 | -6.456 | 0.271 22 | -7.752 | 0.264 23 | -9.05 | 0.256 24 | -10.35 | 0.25 25 | -11.647 | 0.248 26 | -12.907 | 0.237 27 | -14.204 | 0.227 28 | -15.5 | 0.221 29 | -16.796 | 0.214 30 | -18.097 | 0.209 31 | -19.386 | 0.2 32 | -20.681 | 0.192

`

yangfanFred commented 2 years ago

Hi tianshiz,

I downloaded the pcap file you provided and run roslaunch on my PC, monitored the log ouputs and point clouds on RIVZ. I repeated this test for 10 times, there are no error message and the whole pcap file can be prcessed well. Here are possible reasons I can think of about the issue on your end:

  1. The PC you are using might be not fast enough, is it possible to change a better PC to test?
  2. Is ther any other tasks added to the ROS driver code? The issue might be caused by additional tasks added

Thanks, Fred

tianshiz commented 2 years ago

Thank you for taking the time to test that out. I am actually using a amazon aws cloud desktop with the following specs. I run a essentially barebones vanilla ros noetic docker image on it to run this driver.

Instance Size # vCPUs Memory (GiB) Instance Storage (HDD) Network Performance Disk Read (MBps with 2 MiB block size)
d2.2xlarge 8 61 6 x 2 TB High 875

the desktop uses Intel Xeon E5-2676 v3 (Haswell) processors that run at a base clock frequency of 2.4 GHz and can deliver clock speeds as high as 3.0 GHz with Intel Turbo Boost. While monitoring my CPU and MEM usage, neither of them are anywhere close to maxing out while running the driver.

As for your #2 question, the only thing that I do ontop of running this process is that I also start a rosbag to bag these pointcloud topics. But I've actually seen this issue without bagging as well.

yangfanFred commented 1 year ago

Hi Tianshi,

This is highly posssible caused by the running environment, you can try use a local PC to test.

Thanks Fred