Solved some linking problems
parent
6c7dfabe5b
commit
5a02b36723
|
@ -7,6 +7,8 @@
|
||||||
#include "Pose2Graph.h"
|
#include "Pose2Graph.h"
|
||||||
#include "FactorGraph-inl.h"
|
#include "FactorGraph-inl.h"
|
||||||
#include "NonlinearFactorGraph-inl.h"
|
#include "NonlinearFactorGraph-inl.h"
|
||||||
|
#include "NonlinearOptimizer-inl.h"
|
||||||
|
#include "NonlinearEquality.h"
|
||||||
#include "graph-inl.h"
|
#include "graph-inl.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
@ -14,17 +16,19 @@ using namespace gtsam;
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
// explicit instantiation so all the code is there and we can link with it
|
// explicit instantiation so all the code is there and we can link with it
|
||||||
template class FactorGraph<NonlinearFactor<Pose2Config> > ;
|
template class FactorGraph<NonlinearFactor<Pose2Config> > ;
|
||||||
template class NonlinearFactorGraph<Pose2Config> ;
|
template class NonlinearFactorGraph<Pose2Config> ;
|
||||||
//template class NonlinearOptimizer<Pose2Graph, Pose2Config> ;
|
template class NonlinearEquality<Pose2Config,Pose2Config::Key,Pose2> ;
|
||||||
|
template class NonlinearOptimizer<Pose2Graph, Pose2Config>;
|
||||||
|
|
||||||
/* ************************************************************************* */
|
void Pose2Graph::addConstraint(const Pose2Config::Key& key, const Pose2& pose) {
|
||||||
|
push_back(sharedFactor(new NonlinearEquality<Pose2Config, Pose2Config::Key,
|
||||||
|
Pose2> (key, pose)));
|
||||||
|
}
|
||||||
|
|
||||||
bool Pose2Graph::equals(const Pose2Graph& p, double tol) const {
|
bool Pose2Graph::equals(const Pose2Graph& p, double tol) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
|
||||||
|
|
||||||
} // namespace gtsam
|
} // namespace gtsam
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Pose2Factor.h"
|
#include "Pose2Factor.h"
|
||||||
#include "Pose2Config.h"
|
|
||||||
#include "NonlinearFactorGraph.h"
|
#include "NonlinearFactorGraph.h"
|
||||||
#include "NonlinearEquality.h"
|
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
@ -43,9 +41,7 @@ namespace gtsam {
|
||||||
* @param key of pose
|
* @param key of pose
|
||||||
* @param pose which pose to constrain it to
|
* @param pose which pose to constrain it to
|
||||||
*/
|
*/
|
||||||
inline void addConstraint(const Pose2Config::Key& key, const Pose2& pose = Pose2()) {
|
void addConstraint(const Pose2Config::Key& key, const Pose2& pose = Pose2());
|
||||||
push_back(sharedFactor(new NonlinearEquality<Pose2Config,Pose2Config::Key,Pose2>(key, pose)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
|
|
|
@ -3,20 +3,34 @@
|
||||||
* @brief A factor graph for the 2D PoseSLAM problem
|
* @brief A factor graph for the 2D PoseSLAM problem
|
||||||
* @authors Frank Dellaert, Viorela Ila
|
* @authors Frank Dellaert, Viorela Ila
|
||||||
*/
|
*/
|
||||||
//#include "NonlinearOptimizer-inl.h"
|
|
||||||
|
#include "Pose3Graph.h"
|
||||||
#include "FactorGraph-inl.h"
|
#include "FactorGraph-inl.h"
|
||||||
#include "NonlinearFactorGraph-inl.h"
|
#include "NonlinearFactorGraph-inl.h"
|
||||||
#include "Pose3Graph.h"
|
#include "NonlinearOptimizer-inl.h"
|
||||||
|
#include "NonlinearEquality.h"
|
||||||
|
#include "graph-inl.h"
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
// explicit instantiation so all the code is there and we can link with it
|
// explicit instantiation so all the code is there and we can link with it
|
||||||
template class FactorGraph<NonlinearFactor<gtsam::Pose3Config> > ;
|
template class FactorGraph<NonlinearFactor<gtsam::Pose3Config> > ;
|
||||||
template class NonlinearFactorGraph<Pose3Config> ;
|
template class NonlinearFactorGraph<Pose3Config> ;
|
||||||
//template class NonlinearOptimizer<Pose3Graph, Pose3Config> ;
|
template class NonlinearEquality<Pose3Config, Pose3Config::Key, Pose3> ;
|
||||||
|
template class NonlinearOptimizer<Pose3Graph, Pose3Config> ;
|
||||||
|
|
||||||
bool Pose3Graph::equals(const Pose3Graph& p, double tol) const {
|
bool Pose3Graph::equals(const Pose3Graph& p, double tol) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add an equality constraint on a pose
|
||||||
|
* @param key of pose
|
||||||
|
* @param pose which pose to constrain it to
|
||||||
|
*/
|
||||||
|
void Pose3Graph::addConstraint(const Pose3Config::Key& key, const Pose3& pose) {
|
||||||
|
push_back(sharedFactor(new NonlinearEquality<Pose3Config, Pose3Config::Key,
|
||||||
|
Pose3> (key, pose)));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace gtsam
|
} // namespace gtsam
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Pose3Factor.h"
|
#include "Pose3Factor.h"
|
||||||
#include "Pose3Config.h"
|
|
||||||
#include "NonlinearFactorGraph.h"
|
#include "NonlinearFactorGraph.h"
|
||||||
#include "NonlinearEquality.h"
|
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
@ -43,9 +41,7 @@ namespace gtsam {
|
||||||
* @param key of pose
|
* @param key of pose
|
||||||
* @param pose which pose to constrain it to
|
* @param pose which pose to constrain it to
|
||||||
*/
|
*/
|
||||||
inline void addConstraint(const Pose3Config::Key& key, const Pose3& pose =Pose3()) {
|
void addConstraint(const Pose3Config::Key& key, const Pose3& pose =Pose3());
|
||||||
push_back(sharedFactor(new NonlinearEquality<Pose3Config,Pose3Config::Key,Pose3> (key, pose)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** Serialization function */
|
/** Serialization function */
|
||||||
|
|
Loading…
Reference in New Issue