Fixed build with RTABMAP_SYNC_USER_DATA=ON. Fixed wordids!=descriptors error #659 when Mem/RawDescriptorsKept is false

This commit is contained in:
matlabbe
2021-10-25 17:32:13 -04:00
parent eb297e147f
commit 42fca441ff
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1067,7 +1067,7 @@ rtabmap::Signature nodeDataFromROS(const rtabmap_ros::NodeData & msg)
{
ROS_ERROR("Word IDs and 3D points should be the same size (%d, %d)!", (int)msg.wordIds.size(), (int)msg.wordPts.size());
}
if(wordsDescriptors.rows != (int)msg.wordIds.size())
if(!wordsDescriptors.empty() && wordsDescriptors.rows != (int)msg.wordIds.size())
{
ROS_ERROR("Word IDs and descriptors should be the same size (%d, %d)!", (int)msg.wordIds.size(), wordsDescriptors.rows);
wordsDescriptors = cv::Mat();
+1 -1
View File
@@ -414,7 +414,7 @@ void CommonDataSubscriber::setupScanCallbacks(
{
subscribedToOdomInfo_ = true;
odomInfoSub_.subscribe(nh, "odom_info", queueSize);
SYNC_DECL3(dataScan2dInfo, approxSync, queueSize, userDataSub_, scanSub_, odomInfoSub_);
SYNC_DECL3(CommonDataSubscriber, dataScan2dInfo, approxSync, queueSize, userDataSub_, scanSub_, odomInfoSub_);
}
else
{