Added rtabmap-info console tool

This commit is contained in:
matlabbe
2020-04-24 13:45:41 -04:00
parent 0c04b77cd7
commit 66fca15cc6
5 changed files with 420 additions and 0 deletions

View File

@@ -54,6 +54,8 @@ public:
kAllWithLandmarks = 98,
kAllWithoutLandmarks = 99,
kUndef = 99};
static std::string typeName(Type type);
Link();
Link(int from,
int to,
@@ -68,6 +70,7 @@ public:
int to() const {return to_;}
const Transform & transform() const {return transform_;}
Type type() const {return type_;}
std::string typeName() const {return typeName(type_);}
const cv::Mat & infMatrix() const {return infMatrix_;}
double rotVariance(bool minimum = true) const;
double transVariance(bool minimum = true) const;

View File

@@ -33,6 +33,31 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace rtabmap {
std::string Link::typeName(Type type)
{
if(type == Link::kNeighbor)
return "Neighbor";
if(type == Link::kGlobalClosure)
return "GlobalClosure";
if(type == Link::kLocalSpaceClosure)
return "LocalSpaceClosure";
if(type == Link::kLocalTimeClosure)
return "LocalTimeClosure";
if(type == Link::kUserClosure)
return "UserClosure";
if(type == Link::kVirtualClosure)
return "VirtualClosure";
if(type == Link::kNeighborMerged)
return "NeighborMerged";
if(type == Link::kPosePrior)
return "PosePrior";
if(type == Link::kLandmark)
return "Landmark";
if(type == Link::kGravity)
return "Gravity";
return "Undefined";
}
Link::Link() :
from_(0),
to_(0),