-
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
How to stream a stable 300 fps using d435i? #6578
Comments
I wonder if by saving into a list, you might be experiencing a Python limitation described in the link below. |
Thank you Marty. I dont think that is the issue as i could capture 300 fps earlier for a minute without any problem. I believe it is a consistency issue . Is there any way that you can help me ? I would like to capture 300 fps every time i run my code. Thanks |
Are you using RGB at the same time as depth, please? |
No, i am using the infrared stream as recommended in the white page: https://dev.intelrealsense.com/docs/high-speed-capture-mode-of-intel-realsense-depth-camera-d435 |
Okay, that is the reason I was asking, as I did not know if you had seen the paper and its Section 2.2 that advises against RGB + Depth. Thanks! Guidance on setting exposure up in a way that enforces a constant FPS is also provided in the link below. Dorodnic has also recommended not changing the frame queue size on the sensor object. If you are recording in strong sunlight and you are using manual exposure than you could set exposure to around 1 ms and also help to avoid some motion artifacts by doing so. This is suggested by guidance provided in Intel's camera tuning best-practices guide for the 400 Series cameras. |
Hi Thanks |
Did you install Librealsense for Windows using the pre-built .exe file on the Releases page or did you compile it from source code on Windows, please? If you compiled from source, you may get a performance boost by including -DCMAKE_BUILD_TYPE=release in your CMake build statement if you have not done so already. This builds the SDK as a 'Release' version instead of a version designed for debugging. Are you actively monitoring memory whilst your application is running to ensure that you do not have a "memory leak" that slows the program down as time passes and memory becomes consumed and not released? An alternative approach to saving depth values into a list may be to use ROS. It has a --split command that splits the bag when a maximum duration or file size is reached. That may help avoid the memory issues that you experienced when saving a large bag file. Example commands are: $ rosbag record --split --size=1024 /chatter http://wiki.ros.org/rosbag/Commandline#record The link below gives some guidance about how split may be configured in a ROS launch file instead of the command line. |
Do you have a sample code to do this rosbag recording with d4335 using python? |
It's a somewhat complicated situation. Whilst you may be able to record a bag in ROS and use the --split command with it, the recorded bag file may be unreadable by the RealSense SDK's bag playback. You may be able to record a bag by recording the output of a ROS camera topic with a command such as this: rosbag record -O whatever --lz4 /joy /camera/depth/image_rect_raw But you may need to use pure ROS utilities (not RealSense ROS tools) such as bag_tools to edit the recording. If Python is important to your project then it may be best to focus on the Python script that have been working on instead of considering ROS. |
But that will not solve the 300 fps issue i'm facing. Here is a part of my code, could you please see if i'm doing something wrong:
|
I note that although you are correctly using infrared in place of RGB, your script is not accessing both the left and the right IR stream (index 1 and 2) like the example in Section 2.2 of the white paper does and is only using the left IR (index 1). Also, I researched the issue further and learned of an alternative Python method developed in 2019 called save_single_frameset, where every frame is saved as a separate bag file with different file names. Given that bags are the most efficient way to record data to file in RealSense, it may give sufficiently fast performance. |
Hi @Wjordan2020 Do you still require assistance with this case please? Thanks! |
Case closed due to no further comments received. |
How can i steam a stable 300fps depth values using d435i? My application requires such a high frame rate. Currently, i am saving the depth values using "get_distance" into a list then at the end of the processing i will convert it to a csv file. This will help me in avoiding any memory issues i encountered while trying to save a bag file.
When i look at the csv file, the number of captured values is very different from the number of recorded frames. This means that i am missing so many frames and the capturing rate is way less than 300 fps.
Could you please help me? What are the best sensor values (i.e. exposure rate, queue size) to achieve a stable 300 fps? i tried different computers with different USB 3.0 and got the same result.
i am recording in sunlight environment
Thanks
The text was updated successfully, but these errors were encountered: