mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 17:17:47 +08:00
0.18: Camera calibration and LaserScan Info refactoring (#324)
* Saving full camera calibration in database, added angle min/max/inc to LaserScan. * Updated laserscan info save/load in db * Database: added Tag table, added env_sensors field to Node * fixed serialization/deserialization of stereo camera model * fixed multi-calibration db saving * fixed rebase errors * Tango: Added saving environmental sensors option * Memory: Save env sensors * Tango: fixed env sensor ids * DBViewer: show env sensors values * DBViewer: added calibration details on tooltip * increased package version to 0.18.0 * Fixed LaserScan copies when angleIncrement is valid * fixed build error without OctoMap dependency
This commit is contained in:
@@ -733,7 +733,8 @@ bool DBDriver::getNodeInfo(
|
||||
double & stamp,
|
||||
Transform & groundTruthPose,
|
||||
std::vector<float> & velocity,
|
||||
GPS & gps) const
|
||||
GPS & gps,
|
||||
EnvSensors & sensors) const
|
||||
{
|
||||
bool found = false;
|
||||
// look in the trash
|
||||
@@ -747,6 +748,7 @@ bool DBDriver::getNodeInfo(
|
||||
stamp = _trashSignatures.at(signatureId)->getStamp();
|
||||
groundTruthPose = _trashSignatures.at(signatureId)->getGroundTruthPose();
|
||||
gps = _trashSignatures.at(signatureId)->sensorData().gps();
|
||||
sensors = _trashSignatures.at(signatureId)->sensorData().envSensors();
|
||||
found = true;
|
||||
}
|
||||
_trashesMutex.unlock();
|
||||
@@ -754,7 +756,7 @@ bool DBDriver::getNodeInfo(
|
||||
if(!found)
|
||||
{
|
||||
_dbSafeAccessMutex.lock();
|
||||
found = this->getNodeInfoQuery(signatureId, pose, mapId, weight, label, stamp, groundTruthPose, velocity, gps);
|
||||
found = this->getNodeInfoQuery(signatureId, pose, mapId, weight, label, stamp, groundTruthPose, velocity, gps, sensors);
|
||||
_dbSafeAccessMutex.unlock();
|
||||
}
|
||||
return found;
|
||||
@@ -790,6 +792,33 @@ void DBDriver::loadLinks(int signatureId, std::map<int, Link> & links, Link::Typ
|
||||
}
|
||||
}
|
||||
|
||||
void DBDriver::loadTags(int signatureId, std::map<int, TransformStamped> & tags) const
|
||||
{
|
||||
bool found = false;
|
||||
// look in the trash
|
||||
_trashesMutex.lock();
|
||||
if(uContains(_trashSignatures, signatureId))
|
||||
{
|
||||
const Signature * s = _trashSignatures.at(signatureId);
|
||||
UASSERT(s != 0);
|
||||
for(std::map<int, TransformStamped>::const_iterator nIter = s->getTags().begin();
|
||||
nIter!=s->getTags().end();
|
||||
++nIter)
|
||||
{
|
||||
tags.insert(*nIter);
|
||||
}
|
||||
found = true;
|
||||
}
|
||||
_trashesMutex.unlock();
|
||||
|
||||
if(!found)
|
||||
{
|
||||
_dbSafeAccessMutex.lock();
|
||||
this->loadTagsQuery(signatureId, tags);
|
||||
_dbSafeAccessMutex.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
void DBDriver::getWeight(int signatureId, int & weight) const
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
Reference in New Issue
Block a user