From 191f569180cfdb8726cc22644add260e7d569c9a Mon Sep 17 00:00:00 2001 From: smb Date: Thu, 19 Nov 2020 14:24:04 +0100 Subject: [PATCH] changes for the hilti demo --- .../launch/run_versavis_supermegabot.launch | 101 ++++++++++++++++++ versavis/src/versavis_synchronizer.cpp | 5 +- 2 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 versavis/launch/run_versavis_supermegabot.launch diff --git a/versavis/launch/run_versavis_supermegabot.launch b/versavis/launch/run_versavis_supermegabot.launch new file mode 100644 index 00000000..18117400 --- /dev/null +++ b/versavis/launch/run_versavis_supermegabot.launch @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/versavis/src/versavis_synchronizer.cpp b/versavis/src/versavis_synchronizer.cpp index bb39e769..cc385c72 100644 --- a/versavis/src/versavis_synchronizer.cpp +++ b/versavis/src/versavis_synchronizer.cpp @@ -17,7 +17,7 @@ VersaVISSynchronizer::VersaVISSynchronizer(const ros::NodeHandle &nh, const ros::NodeHandle &nh_private) : nh_(nh), nh_private_(nh_private), image_transport_(nh), received_first_camera_info_(false), kMaxImageCandidateLength(10), - kMinSuccessfullConsecutiveMatches(4), kMaxImageDelayThreshold(0.1), + kMinSuccessfullConsecutiveMatches(4), kMaxImageDelayThreshold(0.5), slow_publisher_image_counter_(0), init_number_(0), initialized_(false), publish_slow_images_(false), publish_every_n_image_(10), forward_camera_info_(false) { @@ -166,8 +166,7 @@ void VersaVISSynchronizer::imageCallback( // time and the same offset. // Note: The image_time message should arrive prior to the image. if (ros::Time::now().toSec() - init_timestamp_.toSec() < - kMaxImageDelayThreshold && - offset == offset_) { + kMaxImageDelayThreshold) { ++init_number_; if (init_number_ >= kMinSuccessfullConsecutiveMatches) { ROS_INFO("%s: Initialized with %ld offset.",