Skip to content

Hard coded timeouts in camera driver decrease maximum FPS #29

@claudiofantacci

Description

@claudiofantacci

The following trigger- and grab-related timeouts are hard coded

//grab_timeout_ = exposureTime().GetMax() * 1.05;
grab_timeout_ = 500; // grab timeout = 500 ms

that results in the following code

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);
}

to hang too much and, as a consequence, decrease the FPS of the camera.
Notice that this behavior, in conjunction with #28, provides a slow and delayed/unsynched stream of images, which is very undesirable when high frame-rate/real-time is desirable.
After some tests, setting grab_timeout_ = <framerate> and timeout = 2 * grab_timeout_ resulted in very stable performance with few image drops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions