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

Can't change the framerate of the camera even with a lower resolution #1338

Closed
ChunYe173 opened this issue Aug 19, 2020 · 3 comments
Closed
Labels

Comments

@ChunYe173
Copy link

Hi,

I am working with Intel Realsense D435 camera on ubuntu 16.04. I am trying to make the camera to publish image of 60fps with resolution of 424x240 based on the realsense-viewer. I changed the resolution and the frame rate of the color module image in the launch file and it shows in the terminal that the camera is publishing image of 424x240 with 60fps when I run the command roslaunch realsense2_camera rs_camera.launch . But the command rostopic hz /camera/color/image_raw shows that the camera is only publishing image of an average rate of 30fps but not 60fps. Attach is the pictures that I took to further explain the situation above. Please assists. Thanks

Realsense-viewer screenshot

WhatsApp Image 2020-08-19 at 3 41 56 PM (2)

WhatsApp Image 2020-08-19 at 3 41 56 PM

WhatsApp Image 2020-08-19 at 3 41 56 PM (1)

WhatsApp Image 2020-08-19 at 4 11 38 PM

@ChunYe173 ChunYe173 changed the title Can't change the framerate of the camera even lower the resolution Can't change the framerate of the camera even with lower the resolution Aug 19, 2020
@ChunYe173 ChunYe173 changed the title Can't change the framerate of the camera even with lower the resolution Can't change the framerate of the camera even with a lower resolution Aug 19, 2020
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Aug 19, 2020

Hi @ChunYe173 I replicated your setup in the RealSense Viewer with a D435i. I set RGB to 60 FPS and RGB8 on a USB2 connection. Looking at the FPS information during streaming, I observed that when auto-exposure was enabled, FPS was around 33 instead of 60. When auto-exposure was disabled, the FPS leapt to 59.5.

Under the Controls section of the RGB options, if the option Auto-Exposure Priority is disabled whilst auto-exposure is enabled then FPS becomes around 59.5. This is because having Auto-Exposure enabled and Auto-Exposure Priority on the RGB controls disabled forces the camera to try to keep to a constant FPS.

I repeated the tests on a USB 3 connection and the results were identical.

You should be able to test whether these principles affect the color FPS in the RealSense ROS wrapper in the same way by accessing the enable_auto_exposure and the auto_exposure_priority controls through the RGB section of the controls in the dynamic_reconfigure interface (which allows you to change camera settings after roslaunch during runtime).

https://github.com/IntelRealSense/realsense-ros#set-camera-controls-using-dynamic-reconfigure-params

@ChunYe173
Copy link
Author

Hi @MartyG-RealSense ,

I have tried the solution that you provide. Its really helpful and the Intel Realsense D435 camera can now publish image of 60fps. Thanks a lot!

@MartyG-RealSense
Copy link
Collaborator

Great news that the method worked for you - thanks for the update!

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

No branches or pull requests

2 participants