Merge branch 'master' of github.com:introlab/rtabmap into gtest

This commit is contained in:
matlabbe
2026-05-23 15:24:44 -07:00
5 changed files with 22 additions and 5 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ public:
void deleteLocation(int locationId, std::list<int> * deletedWords = 0); void deleteLocation(int locationId, std::list<int> * deletedWords = 0);
void saveLocationData(int locationId); void saveLocationData(int locationId);
void removeLink(int idA, int idB); void removeLink(int idA, int idB);
void removeRawData(int id, bool image = true, bool scan = true, bool userData = true); void removeRawData(int id, bool image = true, bool scan = true, bool userData = true, bool occupancyGrid = true);
int reduceNode(int id, float maxDistance = 0.0f, bool keepLinkedInDb = false, int direction = 0); int reduceNode(int id, float maxDistance = 0.0f, bool keepLinkedInDb = false, int direction = 0);
//getters //getters
+3 -2
View File
@@ -3176,7 +3176,7 @@ void Memory::removeLink(int oldId, int newId)
} }
} }
void Memory::removeRawData(int id, bool image, bool scan, bool userData) void Memory::removeRawData(int id, bool image, bool scan, bool userData, bool occupancyGrid)
{ {
UDEBUG("id=%d image=%d scan=%d userData=%d", id, image?1:0, scan?1:0, userData?1:0); UDEBUG("id=%d image=%d scan=%d userData=%d", id, image?1:0, scan?1:0, userData?1:0);
Signature * s = this->_getSignature(id); Signature * s = this->_getSignature(id);
@@ -3185,7 +3185,8 @@ void Memory::removeRawData(int id, bool image, bool scan, bool userData)
s->sensorData().clearRawData( s->sensorData().clearRawData(
image && (!_reextractLoopClosureFeatures || !_registrationPipeline->isImageRequired()), image && (!_reextractLoopClosureFeatures || !_registrationPipeline->isImageRequired()),
scan && !_registrationPipeline->isScanRequired(), scan && !_registrationPipeline->isScanRequired(),
userData && !_registrationPipeline->isUserDataRequired()); userData && !_registrationPipeline->isUserDataRequired(),
occupancyGrid);
} }
} }
+1 -1
View File
@@ -4423,7 +4423,7 @@ bool Rtabmap::process(
} }
if(!_rawDataKept) if(!_rawDataKept)
{ {
_memory->removeRawData(signature->id(), true, !_neighborLinkRefining && !_proximityBySpace, true); _memory->removeRawData(signature->id(), true, !_neighborLinkRefining && !_proximityBySpace, true, false);
} }
// Localization mode and saving localization data: save odometry covariance in a prior link // Localization mode and saving localization data: save odometry covariance in a prior link
+16
View File
@@ -1044,6 +1044,14 @@ void SensorData::clearCompressedData(bool images, bool scan, bool userData, bool
_groundCellsCompressed=cv::Mat(); _groundCellsCompressed=cv::Mat();
_emptyCellsCompressed=cv::Mat(); _emptyCellsCompressed=cv::Mat();
_obstacleCellsCompressed=cv::Mat(); _obstacleCellsCompressed=cv::Mat();
if( _groundCellsCompressed.empty() && _groundCellsRaw.empty() &&
_obstacleCellsCompressed.empty() && _obstacleCellsRaw.empty() &&
_emptyCellsCompressed.empty() && _emptyCellsRaw.empty())
{
_cellSize = 0.0f;
_viewPoint = cv::Point3f();
}
} }
} }
void SensorData::clearRawData(bool images, bool scan, bool userData, bool occupancyGrid) void SensorData::clearRawData(bool images, bool scan, bool userData, bool occupancyGrid)
@@ -1071,6 +1079,14 @@ void SensorData::clearRawData(bool images, bool scan, bool userData, bool occupa
_groundCellsRaw=cv::Mat(); _groundCellsRaw=cv::Mat();
_emptyCellsRaw=cv::Mat(); _emptyCellsRaw=cv::Mat();
_obstacleCellsRaw=cv::Mat(); _obstacleCellsRaw=cv::Mat();
if( _groundCellsCompressed.empty() && _groundCellsRaw.empty() &&
_obstacleCellsCompressed.empty() && _obstacleCellsRaw.empty() &&
_emptyCellsCompressed.empty() && _emptyCellsRaw.empty())
{
_cellSize = 0.0f;
_viewPoint = cv::Point3f();
}
} }
} }
+1 -1
View File
@@ -1090,7 +1090,7 @@ int main(int argc, char * argv[])
uInsert(globalMapStats, odomInfo.statistics(pose)); uInsert(globalMapStats, odomInfo.statistics(pose));
} }
else if(framesToSkip==0 && intermediateNodes && lastUpdateStamp > 0.0 && (data.stamp() < lastUpdateStamp + rtabmapUpdateRate)) else if(framesToSkip==0 && intermediateNodes && lastUpdateStamp > 0.0 && data.stamp() > lastUpdateStamp && (data.stamp() < lastUpdateStamp + rtabmapUpdateRate))
{ {
data.setId(-1); // intermediate node data.setId(-1); // intermediate node
} }