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

Frame rate not adjusting with new ROI #197

Open
J-C-Haley opened this issue Jan 4, 2024 · 3 comments
Open

Frame rate not adjusting with new ROI #197

J-C-Haley opened this issue Jan 4, 2024 · 3 comments

Comments

@J-C-Haley
Copy link

Hello, I'm trying to use the SetROI service to reduce data load, and my expectation was that frame rate would rise to the maximum (as a function of exposure, allowed bandwidth, and set frame rate), as it does in the pylonviewer GUI. However, current behavior is to limit the frame rate on startup (here), based on the startup settings (ROI/exp/framrate), and this overrides the frame_rate ROS parameter, even if the SetROI (here) were to attempt to reset the frame rate the original parameter has been destroyed, so further dynamic changes have no rate increase effect.

So, my question is, shall we either:

  • have a separate parameter to store the intended max framerate (e.g. target_frame_rate), so we preserve the user intent, or,
  • not override the ros frame_rate parameter with the startup max framerate, and simply report achieved rate in the terminal or possibly another param (achieved_frame_rate)

I'd prefer the latter, it's a quick fix I can contribute, but I'd like to hear input on if this would break anything.

Thank you!

@J-C-Haley
Copy link
Author

Ah, I see this is a bigger problem than I assumed, frame rate gets baked into the main ros::Rate spin on startup, which is not adjustable from within the pylon_camera_node. Either of these fixes would require transferring ownership of the rate into the node, so it can be adjusted...

@FrancoisPicardDTI
Copy link
Collaborator

FrancoisPicardDTI commented Jan 31, 2024

Hello @J-C-Haley
I just added a section in the documentation.
There are several issues, and several solutions, to increase the frame rate.
If the camera image acquistion is triggered by sofware trigger (default setting), then it is not possible to get the maximum frame rate, because the image acquisition is sequentially triggered, which is not overlapping then.
Several possible solutions are mentionned and tested in issue #21, #28, #29, #81, #116, #147, and #200. Please refer to them for more information and hopefully find a solution for your use case.

@amohiud2
Copy link

few things that helped me with getting better frame rate were:

  1. In one computer there was a USB port issue. Everything gets half the speed.
  2. Disable the parameter publishing in the launch file.
  3. Disable software trigger (that doubles the frame rate)
  4. In my case I needed less exposure time, so when I used minimum exposure time, I was able to get better frame rate. It actually does check how much you can get based on your frame rate settings in the config file. If it cannot it will say that we can only get a particular frame rate.
  5. There is also a parameter "fast mode" or "slow mode", it works with pylon viewer and gets me speeds up to 750 fps, vs 554 fps. However when I use the service call to set this set_sensor_mode param to 1, it does not work. It says node is not writable etc.

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

3 participants