Re: Build project with example code but failed, Any help great appreciated!
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Build-project-with-example-code-but-failed-Any-help-great-appreciated-tp545p565.html
Each signature contains a SensorData: Signature::sensorData(). If you want to get sensor data from all signatures (including those in long-term memory) having a label, you may want to do something like this:
std::map<int, Signature> signatures;
std::map<int, Transform> poses;
std::multimap<int, Link> constraints;
rtabmap.get3DMap(signatures, poses, constraints, true, true);
"signatures" contains all signatures from memory, including those not linked to the global map.
"poses" contains the poses of signatures in the global map.
You can iterate over "signatures" to get the labels and sensor data. Note that "signatures" is a copy of the memory. To modify a label, you should use
rtabmap.labelLocation(id, label);
cheers