From e0c58ebe35e3cbb2f6a2087088fabc3201c6821a Mon Sep 17 00:00:00 2001 From: matlabbe Date: Mon, 10 Dec 2018 20:22:02 -0500 Subject: [PATCH] Explicitly use parent frame id for tags --- src/CoreWrapper.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CoreWrapper.cpp b/src/CoreWrapper.cpp index dd64ac8a..61a60775 100644 --- a/src/CoreWrapper.cpp +++ b/src/CoreWrapper.cpp @@ -2177,7 +2177,9 @@ void CoreWrapper::tagDetectionsAsyncCallback(const apriltags2_ros::AprilTagDetec { if(tagDetections.detections[i].id.size() >= 1) { - uInsert(tags_, std::make_pair(tagDetections.detections[i].id[0], tagDetections.detections[i].pose)); + geometry_msgs::PoseWithCovarianceStamped p = tagDetections.detections[i].pose; + p.header.frame_id = tagDetections.header.frame_id; // make sure we pass frame_id of parent + uInsert(tags_, std::make_pair(tagDetections.detections[i].id[0], p)); } } }