fixing vc++14 compile issues
parent
ed4a99f620
commit
6b3608cf9a
|
|
@ -209,11 +209,11 @@ public:
|
||||||
bool diagonalDamping = false) {
|
bool diagonalDamping = false) {
|
||||||
if (E.cols() == 2) {
|
if (E.cols() == 2) {
|
||||||
Matrix2 P2;
|
Matrix2 P2;
|
||||||
ComputePointCovariance(P2, E, lambda, diagonalDamping);
|
ComputePointCovariance<2>(P2, E, lambda, diagonalDamping);
|
||||||
return P2;
|
return P2;
|
||||||
} else {
|
} else {
|
||||||
Matrix3 P3;
|
Matrix3 P3;
|
||||||
ComputePointCovariance(P3, E, lambda, diagonalDamping);
|
ComputePointCovariance<3>(P3, E, lambda, diagonalDamping);
|
||||||
return P3;
|
return P3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -227,12 +227,12 @@ public:
|
||||||
bool diagonalDamping = false) {
|
bool diagonalDamping = false) {
|
||||||
if (E.cols() == 2) {
|
if (E.cols() == 2) {
|
||||||
Matrix2 P;
|
Matrix2 P;
|
||||||
ComputePointCovariance(P, E, lambda, diagonalDamping);
|
ComputePointCovariance<2>(P, E, lambda, diagonalDamping);
|
||||||
return SchurComplement(Fblocks, E, P, b);
|
return SchurComplement<2>(Fblocks, E, P, b);
|
||||||
} else {
|
} else {
|
||||||
Matrix3 P;
|
Matrix3 P;
|
||||||
ComputePointCovariance(P, E, lambda, diagonalDamping);
|
ComputePointCovariance<3>(P, E, lambda, diagonalDamping);
|
||||||
return SchurComplement(Fblocks, E, P, b);
|
return SchurComplement<3>(Fblocks, E, P, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,28 +157,28 @@ struct traits<const Point3> : public internal::VectorSpace<Point3> {};
|
||||||
|
|
||||||
// Convenience typedef
|
// Convenience typedef
|
||||||
typedef std::pair<Point3, Point3> Point3Pair;
|
typedef std::pair<Point3, Point3> Point3Pair;
|
||||||
std::ostream &operator<<(std::ostream &os, const gtsam::Point3Pair &p);
|
GTSAM_EXPORT std::ostream &operator<<(std::ostream &os, const gtsam::Point3Pair &p);
|
||||||
|
|
||||||
/// distance between two points
|
/// distance between two points
|
||||||
double distance3(const Point3& p1, const Point3& q,
|
GTSAM_EXPORT double distance3(const Point3& p1, const Point3& q,
|
||||||
OptionalJacobian<1, 3> H1 = boost::none,
|
OptionalJacobian<1, 3> H1 = boost::none,
|
||||||
OptionalJacobian<1, 3> H2 = boost::none);
|
OptionalJacobian<1, 3> H2 = boost::none);
|
||||||
|
|
||||||
/// Distance of the point from the origin, with Jacobian
|
/// Distance of the point from the origin, with Jacobian
|
||||||
double norm3(const Point3& p, OptionalJacobian<1, 3> H = boost::none);
|
GTSAM_EXPORT double norm3(const Point3& p, OptionalJacobian<1, 3> H = boost::none);
|
||||||
|
|
||||||
/// normalize, with optional Jacobian
|
/// normalize, with optional Jacobian
|
||||||
Point3 normalize(const Point3& p, OptionalJacobian<3, 3> H = boost::none);
|
GTSAM_EXPORT Point3 normalize(const Point3& p, OptionalJacobian<3, 3> H = boost::none);
|
||||||
|
|
||||||
/// cross product @return this x q
|
/// cross product @return this x q
|
||||||
Point3 cross(const Point3& p, const Point3& q,
|
GTSAM_EXPORT Point3 cross(const Point3& p, const Point3& q,
|
||||||
OptionalJacobian<3, 3> H_p = boost::none,
|
OptionalJacobian<3, 3> H_p = boost::none,
|
||||||
OptionalJacobian<3, 3> H_q = boost::none);
|
OptionalJacobian<3, 3> H_q = boost::none);
|
||||||
|
|
||||||
/// dot product
|
/// dot product
|
||||||
double dot(const Point3& p, const Point3& q,
|
GTSAM_EXPORT double dot(const Point3& p, const Point3& q,
|
||||||
OptionalJacobian<1, 3> H_p = boost::none,
|
OptionalJacobian<1, 3> H_p = boost::none,
|
||||||
OptionalJacobian<1, 3> H_q = boost::none);
|
OptionalJacobian<1, 3> H_q = boost::none);
|
||||||
|
|
||||||
template <typename A1, typename A2>
|
template <typename A1, typename A2>
|
||||||
struct Range;
|
struct Range;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
/// Exception thrown by triangulateDLT when SVD returns rank < 3
|
/// Exception thrown by triangulateDLT when SVD returns rank < 3
|
||||||
class TriangulationUnderconstrainedException: public std::runtime_error {
|
class GTSAM_EXPORT TriangulationUnderconstrainedException: public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
TriangulationUnderconstrainedException() :
|
TriangulationUnderconstrainedException() :
|
||||||
std::runtime_error("Triangulation Underconstrained Exception.") {
|
std::runtime_error("Triangulation Underconstrained Exception.") {
|
||||||
|
|
@ -36,7 +36,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Exception thrown by triangulateDLT when landmark is behind one or more of the cameras
|
/// Exception thrown by triangulateDLT when landmark is behind one or more of the cameras
|
||||||
class TriangulationCheiralityException: public std::runtime_error {
|
class GTSAM_EXPORT TriangulationCheiralityException: public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
TriangulationCheiralityException() :
|
TriangulationCheiralityException() :
|
||||||
std::runtime_error(
|
std::runtime_error(
|
||||||
|
|
@ -319,7 +319,7 @@ Point3 triangulatePoint3(
|
||||||
(cameras, measurements, rank_tol, optimize);
|
(cameras, measurements, rank_tol, optimize);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TriangulationParameters {
|
struct GTSAM_EXPORT TriangulationParameters {
|
||||||
|
|
||||||
double rankTolerance; ///< threshold to decide whether triangulation is result.degenerate
|
double rankTolerance; ///< threshold to decide whether triangulation is result.degenerate
|
||||||
///< (the rank is the number of singular values of the triangulation matrix which are larger than rankTolerance)
|
///< (the rank is the number of singular values of the triangulation matrix which are larger than rankTolerance)
|
||||||
|
|
@ -382,7 +382,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* TriangulationResult is an optional point, along with the reasons why it is invalid.
|
* TriangulationResult is an optional point, along with the reasons why it is invalid.
|
||||||
*/
|
*/
|
||||||
class TriangulationResult: public boost::optional<Point3> {
|
class GTSAM_EXPORT TriangulationResult: public boost::optional<Point3> {
|
||||||
enum Status {
|
enum Status {
|
||||||
VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT
|
VALID, DEGENERATE, BEHIND_CAMERA, OUTLIER, FAR_POINT
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ enum DegeneracyMode {
|
||||||
/*
|
/*
|
||||||
* Parameters for the smart (stereo) projection factors
|
* Parameters for the smart (stereo) projection factors
|
||||||
*/
|
*/
|
||||||
struct GTSAM_EXPORT SmartProjectionParams {
|
struct SmartProjectionParams {
|
||||||
|
|
||||||
LinearizationMode linearizationMode; ///< How to linearize the factor
|
LinearizationMode linearizationMode; ///< How to linearize the factor
|
||||||
DegeneracyMode degeneracyMode; ///< How to linearize the factor
|
DegeneracyMode degeneracyMode; ///< How to linearize the factor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue