-
Notifications
You must be signed in to change notification settings - Fork 253
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
[humble] How to avoid frames dropped without buffsize and chunksize options? #1845
Comments
Did you try the |
@l4es The |
I did try --max-cache-size 104857600 but drops still happened. Hi @MichaelOrlov, Indeed I could also see the IMU drops as well. Thanks for your suggestion to split the bag file per topic. May I know if this was the same approach with which you'd been able to record up to the 2.6 GBytes/Sec from 8 cameras (without any drop !?!?) ?
As I am new with ROS, could you help to share some way/tool to merge the separate bag files so that the synchronization of the topics is guaranteed, please ? Our own idea is merging the left and right image topics into one before being recorded with rosbag. Thanks in advance and best regards, |
If you replay them separately, they indeed won't be sync. You can first merge them into 1 bag (time-synchronized). See "Example merge" under this section in the README: https://github.com/ros2/rosbag2/tree/humble#converting-bags I'm currently working on adding support for replaying multiple bags (time-synchronized of course), which means you wouldn't need to first merge the bags into 1 bag before replaying them, although this feature will not be available in Humble. |
Just out of curiosity,
is this really 200 MHz data rate supported with physical sensor? it is almost processor frequency like Cortex-M??? |
Hi @l4es, As @christophebedard mentioned, we have the If you have a topic in one bag with a frequency at least twice more than other topics from other bags, it is likely that messages from that topic with higher frequency will not be ordered by timestamp in the resulting merged bag. As @christophebedard mentioned, we gonna soon create a PR with an extension for the Rosbag2 player to allow playback from multiple bag files and respect the received timestamp for each topic and bag file. |
Hi @christophebedard and @MichaelOrlov, It is good to know and still okay for me to merge separate input bags into one output bag, as long as the output bag would be similar to the case of recording multiple topics into single bag file in terms of timing and synchronization (time-synchronized). By the way of mentioning about the topics' timing and sync., I would like your confirmation about the chronical order of the topics in the output bag : Are they synced by the time they were received for recording or by the timestamp in their headers, please ?
I used an MCU to read the IMU by interruption and to publish the IMU topic with microROS over serial port. Best Regards, |
Ordered by the time each message was received by the recorder, see
|
Thanks for your confirmation. @MichaelOrlov, It looks like that the drops are caused by the amount of data written to the storage (which is quite natural) : with compressed image, less data is written (~700MB compared to 2.6GB for around 1 minutes of recording) thus less drops. And another conclusion is that it is hard to achieve the ideal situation in which there's no data/frame drop, especially in case of image topics with which there's high amount of data. |
Hi @l4es, First of all, need to figure out on what side frame drops happened.
|
Hi @MichaelOrlov , Thanks for your suggestions. Below are my answers :
I recorded single bag file continuously.
No, I do not see the above message.
Would it be possible to do that with dd command?
About the QoS settings, as said in initial comment, I tried the solution given in the following link https://robotics.stackexchange.com/questions/100644/detect-messages-dropped-by-ros2-bag-record, but got the Incorrect QoS compatibility warnings if I set the reliability of the relevant topic to reliable. So I believe that they are default settings, especially Reliability = Best Effort.
My own publishing node has not been designed to be composable yet, is it possible to use just the composable recorder similar to this one : https://github.com/berndpfrommer/rosbag2_composable_recorder as I am still with ROS2 Humble?
I haven't tried this approach yet. |
Hi @l4es To benchmark your disk writing speed, please refer to the https://github.com/ros2/rosbag2/tree/rolling/rosbag2_performance/rosbag2_performance_benchmarking#general-knowledge-io-benchmarking If you are trying to override QoS settings and getting error messages that QoS settings are not compatible, it means that the publisher-side QoS settings need to be adjusted as well. Please refer to the https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Quality-of-Service-Settings.html article.
The composable recorder and player nodes are supported starting from the Jazzy release. |
Hi @MichaelOrlov, I would like to re-confirm that I did see the "Cache buffers lost messages per topic: " message when stopping recording of /camera/left/image_raw and /camera/right/image_raw with CTRL+C :
Also, I managed to run the rosbag2_performance benchmarking on the testing system (Jetson Orin NX + Samsung NVMe SSD) which gives below result :
And some first I/O benchmarking :
then with fio :
finally with strace :
By the way, I think I found how to configure the buffsize and chunksize similarly to ROS1 rosbag by configuring the MCAP writter. I also used below configuration :
However, the frame drops could not be avoided. P/S : I will modify the code to be able to adjust the QoS settings of published messages and keep you updated later. |
Hi Everyone,
I am recording IMU topic at 200MHz together with /camera/left/image_raw and /camera/right/image_raw at 20Hz. However, I observed certain frame drops of either left or right camera topics :
I even throttled the image topics to 5Hz but was still facing the drops:
The resolution of the image frame is 1280x720.
In ROS1 version, there's buffsize and chunksize that could be used to solve this issue I suppose. However, they are not available anymore in the ROS2 version.
There's also another suggestion to override the QoS settings of ros2 bag record. Unfortunately, I received the Incorrect QoS compatibility warnings if I set the reliability of the relevant topic to reliable.
Could someone give me an advice, please ?
Thanks in advance and best regards,
Khang
The text was updated successfully, but these errors were encountered: