New classes: Link and GraphViewer (TORO graph visualization and laser scans occupancy grid)

New parameter: RGBD/ToroIterations=100
Rtabmap: added getGraph() method to get TORO poses/link constraints
Fixed ICP correspondences ratio over 1
CloudViewer: added frustum culling and camera view up z lock in render(), moving camera using arrow keys, Menu options: Camera far plane clipping, background color
DatabaseViewer: added 3D Map view and Graph view
MainWindow: Moved main widget (loop closure image status) to a dock widget, added Graph view.


git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1075 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-02-11 23:04:22 +00:00
parent df3d694829
commit ea570abb8c
27 changed files with 2178 additions and 242 deletions
+49 -1
View File
@@ -85,6 +85,7 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
std::map<int, float> depthConstants;
std::map<int, Transform> localTransforms;
std::map<int, Transform> poses;
std::multimap<int, Link> constraints;
_rtabmap->get3DMap(images,
depths,
@@ -92,6 +93,7 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
depthConstants,
localTransforms,
poses,
constraints,
optimized,
full);
@@ -100,9 +102,35 @@ void RtabmapThread::publishMap(bool optimized, bool full) const
depths2d,
depthConstants,
localTransforms,
poses));
poses,
constraints));
}
void RtabmapThread::publishGraph(bool optimized, bool full) const
{
std::map<int, std::vector<unsigned char> > images;
std::map<int, std::vector<unsigned char> > depths;
std::map<int, std::vector<unsigned char> > depths2d;
std::map<int, float> depthConstants;
std::map<int, Transform> localTransforms;
std::map<int, Transform> poses;
std::multimap<int, Link> constraints;
_rtabmap->getGraph(poses,
constraints,
optimized,
full);
this->post(new RtabmapEvent3DMap(images,
depths,
depths2d,
depthConstants,
localTransforms,
poses,
constraints));
}
void RtabmapThread::mainLoopKill()
{
this->clearBufferedData();
@@ -179,6 +207,12 @@ void RtabmapThread::mainLoop()
case kStatePublishingMapFull:
this->publishMap(atoi(parameters.at("optimized").c_str())!=0, true);
break;
case kStatePublishingGraph:
this->publishGraph(atoi(parameters.at("optimized").c_str())!=0, false);
break;
case kStatePublishingGraphFull:
this->publishGraph(atoi(parameters.at("optimized").c_str())!=0, true);
break;
case kStateTriggeringMap:
_rtabmap->triggerNewMap();
break;
@@ -300,6 +334,20 @@ void RtabmapThread::handleEvent(UEvent* event)
param.insert(ParametersPair("optimized", uNumber2Str(rtabmapEvent->getInt())));
pushNewState(kStatePublishingMapFull, param);
}
else if(cmd == RtabmapEventCmd::kCmdPublishGraph)
{
ULOGGER_DEBUG("CMD_PUBLISH_GRAPH");
ParametersMap param;
param.insert(ParametersPair("optimized", uNumber2Str(rtabmapEvent->getInt())));
pushNewState(kStatePublishingGraph, param);
}
else if(cmd == RtabmapEventCmd::kCmdPublishGraphFull)
{
ULOGGER_DEBUG("CMD_PUBLISH_GRAPH_FULL");
ParametersMap param;
param.insert(ParametersPair("optimized", uNumber2Str(rtabmapEvent->getInt())));
pushNewState(kStatePublishingGraphFull, param);
}
else if(cmd == RtabmapEventCmd::kCmdTriggerNewMap)
{
ULOGGER_DEBUG("CMD_TRIGGER_NEW_MAP");