mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
This commit is contained in:
@@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <rtabmap/core/Parameters.h>
|
||||
#include <rtabmap/core/Link.h>
|
||||
#include <rtabmap/core/GeodeticCoords.h>
|
||||
|
||||
@@ -44,13 +45,13 @@ namespace graph {
|
||||
// Graph utilities
|
||||
////////////////////////////////////////////
|
||||
|
||||
bool RTABMAP_EXP exportPoses(
|
||||
bool RTABMAP_EXP exportPoses(
|
||||
const std::string & filePath,
|
||||
int format, // 0=Raw (*.txt), 1=RGBD-SLAM (*.txt), 2=KITTI (*.txt), 3=TORO (*.graph), 4=g2o (*.g2o)
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & constraints = std::multimap<int, Link>(), // required for formats 3 and 4
|
||||
const std::map<int, double> & stamps = std::map<int, double>(), // required for format 1
|
||||
bool g2oRobust = false); // optional for format 4
|
||||
const ParametersMap & parameters = ParametersMap()); // optional for formats 3 and 4
|
||||
|
||||
bool RTABMAP_EXP importPoses(
|
||||
const std::string & filePath,
|
||||
|
||||
@@ -40,11 +40,6 @@ public:
|
||||
static bool available();
|
||||
static bool isCSparseAvailable();
|
||||
static bool isCholmodAvailable();
|
||||
static bool saveGraph(
|
||||
const std::string & fileName,
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & edgeConstraints,
|
||||
const bool useRobustConstraints = false);
|
||||
|
||||
public:
|
||||
OptimizerG2O(const ParametersMap & parameters = ParametersMap()) :
|
||||
@@ -81,6 +76,11 @@ public:
|
||||
const std::map<int, std::map<int, cv::Point3f> > & wordReferences, // <ID words, IDs frames + keypoint(x,y,depth)>
|
||||
std::set<int> * outliers = 0);
|
||||
|
||||
bool saveGraph(
|
||||
const std::string & fileName,
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & edgeConstraints);
|
||||
|
||||
private:
|
||||
int solver_;
|
||||
int optimizer_;
|
||||
|
||||
@@ -40,10 +40,6 @@ public:
|
||||
static bool available();
|
||||
|
||||
public:
|
||||
static bool saveGraph(
|
||||
const std::string & fileName,
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & edgeConstraints);
|
||||
static bool loadGraph(
|
||||
const std::string & fileName,
|
||||
std::map<int, Transform> & poses,
|
||||
@@ -70,6 +66,11 @@ public:
|
||||
std::list<std::map<int, Transform> > * intermediateGraphes = 0,
|
||||
double * finalError = 0,
|
||||
int * iterationsDone = 0);
|
||||
|
||||
bool saveGraph(
|
||||
const std::string & fileName,
|
||||
const std::map<int, Transform> & poses,
|
||||
const std::multimap<int, Link> & edgeConstraints);
|
||||
};
|
||||
|
||||
} /* namespace rtabmap */
|
||||
|
||||
Reference in New Issue
Block a user