-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to change .pcap to the .bag #8
Comments
rosbag record? |
I also have the same problem. I have to record data in windowsOS. Now I record my data in .pcap, but I have to analyze the record data in ROS in Ubuntu 16.04. How should i to do ? anyone konws ? Thanks! |
@dahewujiang You can play pcap using HesaiLidar-ros , and then , using rosbag record the topic to a rosbag. |
I have tried this. But when playing the record .bag file, it seems not realtime. The playback rate is not constant. How to fix this problem? |
try to decrease the interval time of reading packets to increase the framerate. |
Sorry. I am not understand you well. What do you mean that "try to decrease the interval time of reading packets to increase the framerate."? Which parameters should I modify? Do you think that the unconscious playback rate is caused by playback ? But I think it caused by record. Because I play the .bag file which recording directly in ROS is right. |
The pcap reading task will delay a time between 2 packets, You can set this interval in source code. By default , there are 3000 packets in 100ms in Signle Return mode for Pandar40 , so the interval will be 100000us / 3000. If the return mode is Dual Return , there will be 6000 packets. |
Hello,I did it like what you said, but it still didn't work, the bag data always faster than pcap data. |
@trickyMan we tried many times with different values (100000/3000), sometimes the bag played very fast, sometimes very slow, the speed of played bag file didn't steady. I thought that it doesn't steady when we replay the pcap file ,so it doesn't steady when we record it. Can you help us to solve the problem as soon as possible,please. Thanks very much~ |
try (100000/180)? 180 means 180 packets per cycle. or (100000/300). |
@trickyMan Thanks a lot, I tried, these two pair value(100000/180)and(100000/300)seems much slower than pcap data, so I changed to (100000/420),it seems much better,does these values all right? |
That’s ok. |
All right,thanks, but now we can't promise that the bag data and the pcap data can absolutely synchronize, how can we make the beginning and the end of both pcap and the bag data are the same, is there are some codes I can write to come true these? |
Oh, yeah, Every packet in pcap file has it's own timestamp, You can control the delay time using the exact timestamp gap between 2 packets. |
Oh, I got that , but i am thinking about how should I get these timestamp gap? |
refer to the docs of libpcap? |
@trickyMan Yeah, you said that every packet in pcap file has it's own timestamp, I can control the delay time using the exact timestamp gap between 2 packets, so I want to know that is there any codes I can use directly to get the exact timestamp gap between 2 packets and control the delay time? |
The timestamps are stored in the header of the pcap packet. |
@trickyMan |
I use the pandar 40 to record the data,but I can't figure out how to get the the .bag format
The text was updated successfully, but these errors were encountered: