-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
pyralsense2.config.enable_device_from_file cropped .bag file #10271
Comments
Hi @mhestraathof Using ROS website information as the basis to create a cropped bag file with the RealSense SDK may not work. This is because although the SDK's bag format is based on the ROS rosbag standard it has some differences that may result in incompatibility, as described by a RealSense team member at #3020 (comment) As the L515 supports color at a minimum of 6 FPS (unlike depth and infrared that only has 30 FPS available), an easier solution for reducing bag size may be to set color to 6 FPS instead of using 30 and selecting certain frames. May I ask if you are using one L515 camera or multiple L515. A single L515 will not experience IR interference unless there is another IR light source nearby. This could be an artificial IR emitting device or natural sunlight in the scene. If the interference is from a small amount of sunlight then setting the Low Ambient Light L515 camera configuration preset may help to deal with it. Another way to reduce bag size would be to record a bag using the Z16H compressed depth format - as described at #9295 (comment) - or if you are recording with the RealSense Viewer then you could go to the Viewer's Settings interface and set bag files to always be compressed in the Playback & Record section of the Settings. You can also create a custom frame rate by setting a script to only use every 'nth' frame. For example, setting the stream at 30 FPS and then only using every 5th frame to achieve a frame rate of 6 FPS (or every 10th frame to achieve 3 FPS). A Python reference for doing this is at #3169 |
Hi @MartyG-RealSense, thank you for your reply. We are using two L515 cameras, so there is IR interference. We will try to open the cropped files another way and try recording with the viewer from now on. |
Okay, thanks very much @mhestraathof for the update! |
Hi @mhestraathof Do you have an update about this case that you can provide, please? Thanks! |
Hi @MartyG-RealSense, I don't have an update yet. If we find a workaround to open the bag files, I'll post it here. |
Thanks very much @mhestraathof for the update. Good luck! |
Hi @mhestraathof Do you have any progress with this case to report regarding a workaround to open the bag files, please? Thanks! |
Hi @MartyG-RealSense. Unfortunately we don't have an update. We decided to make new recordings and move on, so we stopped trying to open the old files. If we find a solution in the future, I'll post it. |
Thanks very much @mhestraathof for the update. As you have moved on to new recordings, I will close this case. Thanks again! |
We recorded videos with color frames arriving at 30 fps and depth and infrared frames at 3 mps to avoid interference. Because the size of the .bag files increases rapidly, we tried to remove the color frames that did not arrive immediately after a depth or infrared frame. The script is based on an example of creating a cropped bag file in the rosbag cookbook:
After running this script, the new .bag file cannot be opened with the rs-convert.exe tool or with pyralsense2.config.enable_device_from_file('file.bag') anymore. However, it can be opened using the 'Load Recorded Sequence' function of the Intel RealSense Viewer.
When the script writes each message with outbag.write (not removing color frames or color metadata), the new .bag file will be the same size, but it won't open either. We also tried using threading Lock acquire-release around all bag writes, but it gave the same result.
Does anyone know what the problem is with the cropped .bag files and why the Intel RealSense Viewer can open them but the rs-convert.exe tool and pyralsense2.config.enable_device_from_file('file.bag') cannot? How can we fix the recorded files or otherwise prevent this from happening in the future?
The text was updated successfully, but these errors were encountered: