Fix errors on Windows with VS 2010
parent
fe81828a2c
commit
d3333c1c85
|
|
@ -20,7 +20,7 @@ namespace gtsam {
|
||||||
* but here we choose instead to parameterize it as a (Rot3,Unit3) pair.
|
* but here we choose instead to parameterize it as a (Rot3,Unit3) pair.
|
||||||
* We can then non-linearly optimize immediately on this 5-dimensional manifold.
|
* We can then non-linearly optimize immediately on this 5-dimensional manifold.
|
||||||
*/
|
*/
|
||||||
class EssentialMatrix: public DerivedValue<EssentialMatrix> {
|
class GTSAM_EXPORT EssentialMatrix: public DerivedValue<EssentialMatrix> {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/// Represents a 3D point on a unit sphere.
|
/// Represents a 3D point on a unit sphere.
|
||||||
class Unit3: public DerivedValue<Unit3> {
|
class GTSAM_EXPORT Unit3: public DerivedValue<Unit3> {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ TEST( Point3, stream) {
|
||||||
TEST (Point3, normalize) {
|
TEST (Point3, normalize) {
|
||||||
Matrix actualH;
|
Matrix actualH;
|
||||||
Point3 point(1, -2, 3); // arbitrary point
|
Point3 point(1, -2, 3); // arbitrary point
|
||||||
Point3 expected(point / sqrt(14));
|
Point3 expected(point / sqrt(14.0));
|
||||||
EXPECT(assert_equal(expected, point.normalize(actualH), 1e-8));
|
EXPECT(assert_equal(expected, point.normalize(actualH), 1e-8));
|
||||||
Matrix expectedH = numericalDerivative11<Point3, Point3>(
|
Matrix expectedH = numericalDerivative11<Point3, Point3>(
|
||||||
boost::bind(&Point3::normalize, _1, boost::none), point);
|
boost::bind(&Point3::normalize, _1, boost::none), point);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ Point3 point3_(const Unit3& p) {
|
||||||
TEST(Unit3, point3) {
|
TEST(Unit3, point3) {
|
||||||
vector<Point3> ps;
|
vector<Point3> ps;
|
||||||
ps += Point3(1, 0, 0), Point3(0, 1, 0), Point3(0, 0, 1), Point3(1, 1, 0)
|
ps += Point3(1, 0, 0), Point3(0, 1, 0), Point3(0, 0, 1), Point3(1, 1, 0)
|
||||||
/ sqrt(2);
|
/ sqrt(2.0);
|
||||||
Matrix actualH, expectedH;
|
Matrix actualH, expectedH;
|
||||||
BOOST_FOREACH(Point3 p,ps) {
|
BOOST_FOREACH(Point3 p,ps) {
|
||||||
Unit3 s(p);
|
Unit3 s(p);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include <GeographicLib/UTMUPS.hpp>
|
#include <GeographicLib/UTMUPS.hpp>
|
||||||
#include <GeographicLib/LocalCartesian.hpp>
|
#include <GeographicLib/LocalCartesian.hpp>
|
||||||
|
|
||||||
|
#include <gtsam/base/types.h>
|
||||||
#include <CppUnitLite/TestHarness.h>
|
#include <CppUnitLite/TestHarness.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace gtsam {
|
||||||
* Binary factor between two Pose3 variables induced by an EssentialMatrix measurement
|
* Binary factor between two Pose3 variables induced by an EssentialMatrix measurement
|
||||||
* @addtogroup SLAM
|
* @addtogroup SLAM
|
||||||
*/
|
*/
|
||||||
class EssentialMatrixConstraint: public NoiseModelFactor2<Pose3, Pose3> {
|
class GTSAM_EXPORT EssentialMatrixConstraint: public NoiseModelFactor2<Pose3, Pose3> {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue