Skip to content
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

ROS2 Bag Problem: Data Loss and Frame Rate Below Expected 30 FPS #75

Open
ForLoveandPeace opened this issue Dec 1, 2024 · 1 comment

Comments

@ForLoveandPeace
Copy link

ForLoveandPeace commented Dec 1, 2024

I've recorded a ROS2 bag file and upon reviewing it, I've noticed that there's significant data loss, which has resulted in a frame rate that is below the intended 30 FPS. The bag file contains messages from several topics, but the frame rate is not consistent with the default settings.

ROS2 Distribution: Humble
Here is the ros2 bag info:

$: ros2 bag info human_test.bag/

Files:             human_test.bag_0.db3
Bag size:          662.5 MiB
Storage id:        sqlite3
Duration:          8.083090822s
Start:             Dec  1 2024 11:27:57.011326543 (1733023677.011326543)
End:               Dec  1 2024 11:28:05.094417365 (1733023685.094417365)
Messages:          1026
Topic information: Topic: /camera/color/camera_info | Type: sensor_msgs/msg/CameraInfo | Count: 153 | Serialization Format: cdr
                   Topic: /camera/depth/image_raw | Type: sensor_msgs/msg/Image | Count: 213 | Serialization Format: cdr
                   Topic: /camera/depth/points | Type: sensor_msgs/msg/PointCloud2 | Count: 242 | Serialization Format: cdr
                   Topic: /camera/color/image_raw | Type: sensor_msgs/msg/Image | Count: 174 | Serialization Format: cdr
                   Topic: /camera/depth/camera_info | Type: sensor_msgs/msg/CameraInfo | Count: 243 | Serialization Format: cdr
                   Topic: /camera/depth_to_color | Type: orbbec_camera_msgs/msg/Extrinsics | Count: 1 | Serialization Format: cdr

I would greatly appreciate any guidance into what might be causing this data loss and how I can resolve it.

@3Ddaiwei
Copy link
Collaborator

3Ddaiwei commented Dec 5, 2024

It is recommended to use "ros2 topic hz /camera/color/image_raw /camera/depth/image_raw" respectively to check the specific frame rates of the color and depth streams. If the HZ frame rate is close to normal, it may be related to the writing speed of rosbag to Flash. You can consider switching to save to a partition with a faster rate. At the same time, you can also consider using mcap for recording, which relatively improves and optimizes the writing speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants