-
Notifications
You must be signed in to change notification settings - Fork 164
Description
The following trigger- and grab-related timeouts are hard coded
pylon-ros-camera/pylon_camera/include/pylon_camera/internal/impl/pylon_camera_base.hpp
Lines 354 to 355 in 9f38321
//grab_timeout_ = exposureTime().GetMax() * 1.05; | |
grab_timeout_ = 500; // grab timeout = 500 ms |
pylon-ros-camera/pylon_camera/include/pylon_camera/internal/impl/pylon_camera_base.hpp
Line 463 in 9f38321
int timeout = 5000; // ms |
that results in the following code
pylon-ros-camera/pylon_camera/include/pylon_camera/internal/impl/pylon_camera_base.hpp
Lines 461 to 480 in 9f38321
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.