-
assigned issue to
MagFactor etc. don't compile
Issue #160
resolved
Setting GTSAM_INSTALL_GEOGRAPHICLIB=ON in CMake enables a few additional factors, e.g. MagFactor, and these have been broken since the BAD merge. Probably missed them during conversion.
In file included from /home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:19:0:
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h: In member function ‘virtual gtsam::NonlinearFactor::shared_ptr gtsam::MagFactor3::clone() const’:
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h:184:57: error: cannot allocate an object of abstract type ‘gtsam::MagFactor3’
NonlinearFactor::shared_ptr(new MagFactor3(*this)));
^
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h:167:7: note: because the following virtual functions are pure within ‘gtsam::MagFactor3’:
class MagFactor3: public NoiseModelFactor3<double, Unit3, Point3> {
^
In file included from /home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h:19:0,
from /home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:19:
/home/stan/workspace/gtsam/gtsam/nonlinear/NonlinearFactor.h:467:3: note: gtsam::Vector gtsam::NoiseModelFactor3<VALUE1, VALUE2, VALUE3>::evaluateError(const X1&, const X2&, const X3&, boost::optional<Eigen::Matrix<double, -1, -1>&>, boost::optional<Eigen::Matrix<double, -1, -1>&>, boost::optional<Eigen::Matrix<double, -1, -1>&>) const [with VALUE1 = double; VALUE2 = gtsam::Unit3; VALUE3 = gtsam::Point3; gtsam::Vector = Eigen::Matrix<double, -1, 1>; gtsam::NoiseModelFactor3<VALUE1, VALUE2, VALUE3>::X1 = double; gtsam::NoiseModelFactor3<VALUE1, VALUE2, VALUE3>::X2 = gtsam::Unit3; gtsam::NoiseModelFactor3<VALUE1, VALUE2, VALUE3>::X3 = gtsam::Point3]
evaluateError(const X1&, const X2&, const X3&,
^
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp: At global scope:
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:51:1: error: ‘LieScalar’ does not name a type
LieScalar s(scale * nM.norm());
^
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp: In member function ‘virtual void MagFactorFactorsTest::run(TestResult&)’:
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:73:28: error: ‘s’ was not declared in this scope
MagFactor f(1, measured, s, dir, bias, model);
^
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:95:14: error: cannot declare variable ‘f3’ to be of abstract type ‘gtsam::MagFactor3’
MagFactor3 f3(1, 2, 3, measured, nRb, model);
^
In file included from /home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:19:0:
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h:167:7: note: since type ‘gtsam::MagFactor3’ has pure virtual functions
class MagFactor3: public NoiseModelFactor3<double, Unit3, Point3> {
^
In file included from /home/stan/workspace/gtsam/CppUnitLite/TestHarness.h:23:0,
from /home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:23:
/home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:97:52: error: ‘LieScalar’ was not declared in this scope
EXPECT(assert_equal(numericalDerivative11<Vector,LieScalar> //
^
/home/stan/workspace/gtsam/CppUnitLite/Test.h:140:9: note: in definition of macro ‘EXPECT’
{ if (!(condition)) \
^
In file included from /home/stan/workspace/gtsam/gtsam/navigation/tests/testMagFactor.cpp:19:0:
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h: In member function ‘virtual gtsam::NonlinearFactor::shared_ptr gtsam::MagFactor3::clone() const’:
/home/stan/workspace/gtsam/gtsam/navigation/MagFactor.h:185:3: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make[3]: *** [gtsam/navigation/tests/CMakeFiles/testMagFactor.dir/testMagFactor.cpp.o] Error 1
make[2]: *** [gtsam/navigation/tests/CMakeFiles/testMagFactor.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
Comments (3)
-
-
- changed status to resolved
Fixed in db3126cd
-
reporter @dellaert , not sure what error you mean? I only see a warning regarding potential conflict with system-installed Geographiclib.
- Log in to comment
I'm assigning to me, @cbeall3 , but could you take a look at the error that occurs when you turn on "BUILD_GEOGRAPHICLIB" ?