Explicitly use parent frame id for tags

This commit is contained in:
matlabbe
2018-12-10 20:22:02 -05:00
parent 98c3ed985e
commit e0c58ebe35
+3 -1
View File
@@ -2177,7 +2177,9 @@ void CoreWrapper::tagDetectionsAsyncCallback(const apriltags2_ros::AprilTagDetec
{ {
if(tagDetections.detections[i].id.size() >= 1) 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));
} }
} }
} }