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

pylon_camera fps cannot exceed 75 #27

Closed
arunavanag591 opened this issue Mar 5, 2020 · 12 comments
Closed

pylon_camera fps cannot exceed 75 #27

arunavanag591 opened this issue Mar 5, 2020 · 12 comments

Comments

@arunavanag591
Copy link

Hello,
I am using pylon_camera for my Basler acA1300-200uc. However, as put the fps to be 100 or higher in the launch file, the rosout shows that it has launched the camera at that specific frame rate.
[ INFO] [1583442203.551151871]: Start image grabbing if node connects to topic with a frame_rate of: 100 Hz

However when I check the topic
rostopic hz /pylon_camera_node/image_raw

I only get 75fps.
min: 0.012s max: 0.015s std dev: 0.00029s window: 70
Is there a way to get higher fps. I have already tried with the basler application, which works fine and gives me a higher frame rate, so it is not an issue with the hardware or the connectors.

I looked into: magazino/pylon_camera#25 and related issue to it but it did not help.

@claudiofantacci
Copy link

May be related to #28 and/or #29.

@arunavanag591
Copy link
Author

Is there a test branch or PR that has contains those changes in #28 and #29 ?

@claudiofantacci
Copy link

Hey @arunavanag591! Unfortunately I have no code available, but you can easily test it by just hardcoding fixed timeouts and by passing a non default first argument to the camera constructor.

@arunavanag591
Copy link
Author

arunavanag591 commented Mar 6, 2020

Does the enum TriggerModeEnums as worked around here needs to be implemented?

try
{
int timeout = 5000; // ms
// WaitForFrameTriggerReady to prevent trigger signal to get lost
// this could happen, if 2xExecuteSoftwareTrigger() is only followed by 1xgrabResult()
// -> 2nd trigger might get lost
if ((cam_->TriggerMode.GetValue() == TriggerModeEnums::TriggerMode_On))
{
if ( cam_->WaitForFrameTriggerReady(timeout, Pylon::TimeoutHandling_ThrowException) )
{
cam_->ExecuteSoftwareTrigger();
}
else
{
ROS_ERROR("Error WaitForFrameTriggerReady() timed out, impossible to ExecuteSoftwareTrigger()");
return false;
}
}
cam_->RetrieveResult(grab_timeout_, grab_result, Pylon::TimeoutHandling_ThrowException);
}

@claudiofantacci
Copy link

I didn’t change that specifically. Just reduced the timeout and no buffermode on camera

@arunavanag591
Copy link
Author

I tried all the recommended values in the issues but they did not work ! I am capped at 75 fps. The values maybe specific to the model of the camera.
My model is : Basler acA1300-200uc

@claudiofantacci
Copy link

Yes, most probably. Just out of curiosity: are you losing/dropping a lot of frames?

@pablo-quilez
Copy link
Contributor

Hello,

it may be related to software triggering. This software triggering may reduce the framerate to 50%. This topic is something which we will address together with the other similar open issues.

Thanks!

@arunavanag591
Copy link
Author

@pablo-quilez is there a PR or issue I can follow ?

@pablo-quilez
Copy link
Contributor

@arunavanag591 not yet, sorry, but I will keep you informed.

@pablo-quilez
Copy link
Contributor

Hello @arunavanag591,

I hope the last update we did in devel branch will solve this issue. I keep the issue open for a while until someone else can verify the correct behavior. Thanks!

Cheers

@FrancoisPicardDTI
Copy link
Collaborator

Closing the issue here as it seems that the update from December 15th, 2020 solved the problem.

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

4 participants