Method to add a factor without having to do shared factor dance
parent
120f1301c2
commit
12caabb667
|
@ -7,13 +7,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include "NonlinearFactorGraph.h"
|
#include "NonlinearFactorGraph.h"
|
||||||
#include "FactorGraph.h"
|
|
||||||
#include "Pose2Factor.h"
|
#include "Pose2Factor.h"
|
||||||
#include "Pose2Config.h"
|
#include "Pose2Config.h"
|
||||||
#include "Testable.h"
|
|
||||||
#include "Ordering.h"
|
|
||||||
|
|
||||||
namespace gtsam{
|
namespace gtsam{
|
||||||
|
|
||||||
|
@ -32,6 +28,13 @@ public:
|
||||||
*/
|
*/
|
||||||
bool equals(const Pose2Graph& p, double tol=1e-9) const;
|
bool equals(const Pose2Graph& p, double tol=1e-9) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a factor without having to do shared factor dance
|
||||||
|
*/
|
||||||
|
inline void add(const std::string& key1, const std::string& key2,
|
||||||
|
const Pose2& measured, const Matrix& covariance) {
|
||||||
|
push_back(sharedFactor(new Pose2Factor(key1, key2, measured, covariance)));
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
|
|
Loading…
Reference in New Issue