rtabmap: don't assert on invalid tags, just print error. Added "landmarks" topic (type geometry_msg::PoseArray) and added landmark ids in labels MarkerArray.

This commit is contained in:
matlabbe
2019-02-04 18:26:44 -05:00
parent 171c4c854e
commit 3c01661e07
3 changed files with 138 additions and 18 deletions
+5
View File
@@ -1247,6 +1247,11 @@ rtabmap::Landmarks landmarksFromROS(
rtabmap::Landmarks landmarks;
for(std::map<int, geometry_msgs::PoseWithCovarianceStamped>::const_iterator iter=tags.begin(); iter!=tags.end(); ++iter)
{
if(iter->first <=0)
{
ROS_ERROR("Invalid landmark received! IDs should be > 0 (it is %d). Ignoring this landmark.", iter->first);
continue;
}
rtabmap::Transform baseToCamera = rtabmap_ros::getTransform(
frameId,
iter->second.header.frame_id,