From df93a2981a97eae073b5eb1f6901c6b5dbba5a5c Mon Sep 17 00:00:00 2001 From: Jack Zender Date: Mon, 24 Apr 2023 16:48:33 +0000 Subject: [PATCH 1/2] add names to the detection message, this is helpful for hashing tag bundles by consumers of tag detections --- apriltag_ros/msg/AprilTagDetection.msg | 3 +++ apriltag_ros/src/common_functions.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/apriltag_ros/msg/AprilTagDetection.msg b/apriltag_ros/msg/AprilTagDetection.msg index b0c68785..72fc2620 100644 --- a/apriltag_ros/msg/AprilTagDetection.msg +++ b/apriltag_ros/msg/AprilTagDetection.msg @@ -1,3 +1,6 @@ +# Tag/Tag Bundle name. Default names are tag_ID, where ID is the tag ID and bundle_I +# where I is the bundle index. +string name # Tag ID(s). If a standalone tag, this is a vector of size 1. If a tag bundle, # this is a vector containing the IDs of each tag in the bundle. int32[] id diff --git a/apriltag_ros/src/common_functions.cpp b/apriltag_ros/src/common_functions.cpp index ed390d19..4b0155a8 100644 --- a/apriltag_ros/src/common_functions.cpp +++ b/apriltag_ros/src/common_functions.cpp @@ -349,6 +349,7 @@ AprilTagDetectionArray TagDetector::detectTags ( // Add the detection to the back of the tag detection array AprilTagDetection tag_detection; + tag_detection.name = standaloneDescription->frame_name(); tag_detection.pose = tag_pose; tag_detection.id.push_back(detection->id); tag_detection.size.push_back(tag_size); From 4a60a93e96a60149ad58e57f47c2b0513d679ab1 Mon Sep 17 00:00:00 2001 From: Jack Zender Date: Mon, 24 Apr 2023 21:12:37 +0000 Subject: [PATCH 2/2] tag bundle support --- apriltag_ros/src/common_functions.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apriltag_ros/src/common_functions.cpp b/apriltag_ros/src/common_functions.cpp index 4b0155a8..e09779e6 100644 --- a/apriltag_ros/src/common_functions.cpp +++ b/apriltag_ros/src/common_functions.cpp @@ -383,6 +383,7 @@ AprilTagDetectionArray TagDetector::detectTags ( // Add the detection to the back of the tag detection array AprilTagDetection tag_detection; + tag_detection.name = bundleName; tag_detection.pose = bundle_pose; tag_detection.id = bundle.bundleIds(); tag_detection.size = bundle.bundleSizes();