mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Fixed Qt5 plugins release. Zed driver: sdded 2 seconds delay before sending grab error.
This commit is contained in:
+13
-1
@@ -143,7 +143,19 @@ IF((APPLE AND BUILD_AS_BUNDLE) OR WIN32)
|
|||||||
COMPONENT runtime
|
COMPONENT runtime
|
||||||
REGEX ".*d4.dll" EXCLUDE
|
REGEX ".*d4.dll" EXCLUDE
|
||||||
REGEX ".*d4.a" EXCLUDE)
|
REGEX ".*d4.a" EXCLUDE)
|
||||||
ENDIF(QT_PLUGINS_DIR)
|
ELSE()
|
||||||
|
#Qt5
|
||||||
|
foreach(plugin ${Qt5Gui_PLUGINS})
|
||||||
|
get_target_property(plugin_loc ${plugin} LOCATION)
|
||||||
|
get_filename_component(plugin_dir ${plugin_loc} DIRECTORY)
|
||||||
|
string(REPLACE "plugins" ";" loc_list ${plugin_dir})
|
||||||
|
list(GET loc_list 1 plugin_type)
|
||||||
|
#MESSAGE(STATUS "Qt5 plugin "${plugin_loc}" installed in "${plugin_dest_dir}/plugins${plugin_type}"")
|
||||||
|
INSTALL(FILES ${plugin_loc}
|
||||||
|
DESTINATION ${plugin_dest_dir}/plugins${plugin_type}
|
||||||
|
COMPONENT runtime)
|
||||||
|
endforeach()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# install a qt.conf file
|
# install a qt.conf file
|
||||||
# this inserts some cmake code into the install script to write the file
|
# this inserts some cmake code into the install script to write the file
|
||||||
|
|||||||
@@ -893,7 +893,14 @@ SensorData CameraStereoZed::captureImage()
|
|||||||
#ifdef RTABMAP_ZED
|
#ifdef RTABMAP_ZED
|
||||||
if(zed_)
|
if(zed_)
|
||||||
{
|
{
|
||||||
|
UTimer timer;
|
||||||
bool res = zed_->grab((sl::zed::SENSING_MODE)sensingMode_, quality_ > 0, quality_ > 0, false);
|
bool res = zed_->grab((sl::zed::SENSING_MODE)sensingMode_, quality_ > 0, quality_ > 0, false);
|
||||||
|
while (src_ == CameraVideo::kUsbDevice && res && timer.elapsed() < 2.0)
|
||||||
|
{
|
||||||
|
// maybe there is a latency with the USB, try again in 10 ms (for the next 2 seconds)
|
||||||
|
uSleep(10);
|
||||||
|
res = zed_->grab((sl::zed::SENSING_MODE)sensingMode_, quality_ > 0, quality_ > 0, false);
|
||||||
|
}
|
||||||
if(!res)
|
if(!res)
|
||||||
{
|
{
|
||||||
// get left image
|
// get left image
|
||||||
@@ -922,7 +929,7 @@ SensorData CameraStereoZed::captureImage()
|
|||||||
}
|
}
|
||||||
else if(src_ == CameraVideo::kUsbDevice)
|
else if(src_ == CameraVideo::kUsbDevice)
|
||||||
{
|
{
|
||||||
UERROR("CameraStereoZed: Failed to grab images!");
|
UERROR("CameraStereoZed: Failed to grab images after 2 seconds!");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user