updated demo_find_object.launch with save_objects_as_landmarks argument. Added script objects_to_tags.py. Scripts are now installed in binaries. Updated tag conversion to use frame_id/stamp included in detection array instead of parent if set.

This commit is contained in:
matlabbe
2019-08-09 21:52:01 -04:00
parent 18ee9909fc
commit f5a51aa87f
6 changed files with 138 additions and 23 deletions
+9 -1
View File
@@ -2009,7 +2009,15 @@ void CoreWrapper::tagDetectionsAsyncCallback(const apriltag_ros::AprilTagDetecti
if(tagDetections.detections[i].id.size() >= 1)
{
geometry_msgs::PoseWithCovarianceStamped p = tagDetections.detections[i].pose;
p.header.frame_id = tagDetections.header.frame_id; // make sure we pass frame_id of parent
p.header = tagDetections.header;
if(!tagDetections.detections[i].pose.header.frame_id.empty())
{
p.header.frame_id = tagDetections.detections[i].pose.header.frame_id;
}
if(!tagDetections.detections[i].pose.header.stamp.isZero())
{
p.header.stamp = tagDetections.detections[i].pose.header.stamp;
}
uInsert(tags_, std::make_pair(tagDetections.detections[i].id[0], p));
}
}