From b2835154758cf7988d22bfff287abaa727a54a91 Mon Sep 17 00:00:00 2001 From: David Robinson Date: Wed, 22 Jun 2022 12:05:55 +1200 Subject: [PATCH] Handle hamming distance param --- multisense_lib/sensor_api | 2 +- multisense_ros/cfg/multisense.cfg | 1 + multisense_ros/msg/AprilTagDetection.msg | 2 +- multisense_ros/src/reconfigure.cpp | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/multisense_lib/sensor_api b/multisense_lib/sensor_api index 5a3090b..bd2cd64 160000 --- a/multisense_lib/sensor_api +++ b/multisense_lib/sensor_api @@ -1 +1 @@ -Subproject commit 5a3090b74757becb97aa87aba96afc6b82f0aec1 +Subproject commit bd2cd648b36d5c3ead9dde22d4fbd8aabc3045ce diff --git a/multisense_ros/cfg/multisense.cfg b/multisense_ros/cfg/multisense.cfg index 7e57c20..b8df00f 100755 --- a/multisense_ros/cfg/multisense.cfg +++ b/multisense_ros/cfg/multisense.cfg @@ -348,6 +348,7 @@ for feature_name, feature in SupportedFeatures.__members__.items(): gen.const("tagStandard52h13", str_t, "tagStandard52h13", "tagStandard52h13")], "Available apriltag families") gen.add("apriltag_family", str_t, 0, "Apriltag family to detect", "tagStandard52h13", edit_method=apriltag_family_enum) + gen.add("apriltag_max_hamming", int_t, 0, "The maximum hamming correction that will be applied while detecting codes (value of 1 causes the detector to pause for a while)", 0, 0, 1) gen.add("apriltag_quad_detection_blur_sigma", double_t, 0, "Sigma of the Gaussian blur applied to the image before quad_detection, specified in full resolution pixels. Kernel size = 4*sigma, rounded up to the next odd number. (<0.5 results in no blur)", 0.75, 0.0, 5.0) gen.add("apriltag_quad_detection_decimate", double_t, 0, "Amount to decimate image before detecting quads. Values < 1.0. (0.5 decimation reduces height/width by half)", 1.0, 0.0, 1.0) gen.add("apriltag_min_border_width", int_t, 0, "Minimum border width that can be considered a valid tag. Used to filter contours based on area and perimeter. Units are in undecimated image pixels.", 5, 0, 10) diff --git a/multisense_ros/msg/AprilTagDetection.msg b/multisense_ros/msg/AprilTagDetection.msg index 882d26b..98bf884 100644 --- a/multisense_ros/msg/AprilTagDetection.msg +++ b/multisense_ros/msg/AprilTagDetection.msg @@ -1,5 +1,5 @@ # The family of the tag -uint64 family +string family # The ID of the tag uint32 id diff --git a/multisense_ros/src/reconfigure.cpp b/multisense_ros/src/reconfigure.cpp index 79bdf79..bababf8 100644 --- a/multisense_ros/src/reconfigure.cpp +++ b/multisense_ros/src/reconfigure.cpp @@ -878,6 +878,7 @@ template void Reconfigure::configureApriltagParams(const T& dyn) crl::multisense::system::ApriltagParams params; params.family = dyn.apriltag_family; + params.max_hamming = dyn.apriltag_max_hamming; params.quad_detection_blur_sigma = dyn.apriltag_quad_detection_blur_sigma; params.quad_detection_decimate = dyn.apriltag_quad_detection_decimate; params.min_border_width = dyn.apriltag_min_border_width;