Fix windows tests

release/4.3a0
Tal Regev 2023-09-07 10:09:57 +03:00
parent e920953309
commit 2c4cdbb8c1
No known key found for this signature in database
GPG Key ID: A421558E0F87AC82
10 changed files with 23 additions and 19 deletions

View File

@ -150,7 +150,10 @@ jobs:
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.dynamics_unstable # cmake --build build -j4 --config ${{ matrix.build_type }} --target check.dynamics_unstable
# Compile. Fail with exception # Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable # cmake --build build -j4 --config ${{ matrix.build_type }} --target check.nonlinear_unstable
# Compilation error # Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable # cmake --build build -j4 --config ${{ matrix.build_type }} --target check.slam_unstable
# Compilation error # Compile. Fail with exception
# cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition # cmake --build build -j4 --config ${{ matrix.build_type }} --target check.partition
# Run all tests
# cmake --build build -j1 --config ${{ matrix.build_type }} --target check

View File

@ -36,7 +36,7 @@ namespace gtsam {
* @ingroup discrete * @ingroup discrete
*/ */
template <typename L> template <typename L>
class GTSAM_EXPORT AlgebraicDecisionTree : public DecisionTree<L, double> { class AlgebraicDecisionTree : public DecisionTree<L, double> {
/** /**
* @brief Default method used by `labelFormatter` or `valueFormatter` when * @brief Default method used by `labelFormatter` or `valueFormatter` when
* printing. * printing.

View File

@ -182,7 +182,7 @@ GaussianFactorGraph buildFactorSubgraph(const GaussianFactorGraph &gfg,
/** Split the graph into a subgraph and the remaining edges. /** Split the graph into a subgraph and the remaining edges.
* Note that the remaining factorgraph has null factors. */ * Note that the remaining factorgraph has null factors. */
std::pair<GaussianFactorGraph, GaussianFactorGraph> splitFactorGraph( std::pair<GaussianFactorGraph, GaussianFactorGraph> GTSAM_EXPORT splitFactorGraph(
const GaussianFactorGraph &factorGraph, const Subgraph &subgraph); const GaussianFactorGraph &factorGraph, const Subgraph &subgraph);
} // namespace gtsam } // namespace gtsam

View File

@ -48,7 +48,7 @@ namespace gtsam {
// where s is an arbitrary scale that can be supplied, default 1.0. Hence, two // where s is an arbitrary scale that can be supplied, default 1.0. Hence, two
// versions are supplied below corresponding to whether we have initial values // versions are supplied below corresponding to whether we have initial values
// or not. // or not.
class TranslationRecovery { class GTSAM_EXPORT TranslationRecovery {
public: public:
using KeyPair = std::pair<Key, Key>; using KeyPair = std::pair<Key, Key>;
using TranslationEdges = std::vector<BinaryMeasurement<Unit3>>; using TranslationEdges = std::vector<BinaryMeasurement<Unit3>>;

View File

@ -34,7 +34,7 @@ namespace gtsam {
* SLAM, where we have "time of arrival" measurements at a set of sensors. The * SLAM, where we have "time of arrival" measurements at a set of sensors. The
* TOA functor below provides a measurement function for those applications. * TOA functor below provides a measurement function for those applications.
*/ */
class Event { class GTSAM_UNSTABLE_EXPORT Event {
double time_; ///< Time event was generated double time_; ///< Time event was generated
Point3 location_; ///< Location at time event was generated Point3 location_; ///< Location at time event was generated
@ -62,10 +62,10 @@ class Event {
} }
/** print with optional string */ /** print with optional string */
GTSAM_UNSTABLE_EXPORT void print(const std::string& s = "") const; void print(const std::string& s = "") const;
/** equals with an tolerance */ /** equals with an tolerance */
GTSAM_UNSTABLE_EXPORT bool equals(const Event& other, bool equals(const Event& other,
double tol = 1e-9) const; double tol = 1e-9) const;
/// Updates a with tangent space delta /// Updates a with tangent space delta

View File

@ -14,6 +14,7 @@
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <memory> #include <memory>
#include <gtsam_unstable/dllexport.h>
#include "PartitionWorkSpace.h" #include "PartitionWorkSpace.h"
@ -49,7 +50,7 @@ namespace gtsam { namespace partition {
typedef std::vector<sharedGenericFactor2D> GenericGraph2D; typedef std::vector<sharedGenericFactor2D> GenericGraph2D;
/** merge nodes in DSF using constraints captured by the given graph */ /** merge nodes in DSF using constraints captured by the given graph */
std::list<std::vector<size_t> > findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace, std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph2D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark); const int minNrConstraintsPerCamera, const int minNrConstraintsPerLandmark);
/** eliminate the sensors from generic graph */ /** eliminate the sensors from generic graph */
@ -97,11 +98,11 @@ namespace gtsam { namespace partition {
typedef std::vector<sharedGenericFactor3D> GenericGraph3D; typedef std::vector<sharedGenericFactor3D> GenericGraph3D;
/** merge nodes in DSF using constraints captured by the given graph */ /** merge nodes in DSF using constraints captured by the given graph */
std::list<std::vector<size_t> > findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace, std::list<std::vector<size_t> > GTSAM_UNSTABLE_EXPORT findIslands(const GenericGraph3D& graph, const std::vector<size_t>& keys, WorkSpace& workspace,
const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark); const size_t minNrConstraintsPerCamera, const size_t minNrConstraintsPerLandmark);
/** eliminate the sensors from generic graph */ /** eliminate the sensors from generic graph */
void reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys, void GTSAM_UNSTABLE_EXPORT reduceGenericGraph(const GenericGraph3D& graph, const std::vector<size_t>& cameraKeys, const std::vector<size_t>& landmarkKeys,
const std::vector<int>& dictionary, GenericGraph3D& reducedGraph); const std::vector<int>& dictionary, GenericGraph3D& reducedGraph);
/** check whether the 3D graph is singular (under constrained) */ /** check whether the 3D graph is singular (under constrained) */

View File

@ -1,6 +1,6 @@
set(ignore_test "testNestedDissection.cpp") set(ignore_test "testNestedDissection.cpp")
if (NOT GTSAM_USE_BOOST_FEATURES) if (NOT GTSAM_USE_BOOST_FEATURES OR MSVC)
list(APPEND ignore_test "testFindSeparator.cpp") list(APPEND ignore_test "testFindSeparator.cpp")
endif() endif()

View File

@ -32,7 +32,7 @@ namespace gtsam {
* @ingroup slam * @ingroup slam
*/ */
template <class POSE, class LANDMARK, class CALIBRATION = Cal3_S2> template <class POSE, class LANDMARK, class CALIBRATION = Cal3_S2>
class GTSAM_UNSTABLE_EXPORT ProjectionFactorPPPC class ProjectionFactorPPPC
: public NoiseModelFactorN<POSE, POSE, LANDMARK, CALIBRATION> { : public NoiseModelFactorN<POSE, POSE, LANDMARK, CALIBRATION> {
protected: protected:
Point2 measured_; ///< 2D measurement Point2 measured_; ///< 2D measurement

View File

@ -42,7 +42,7 @@ namespace gtsam {
* @ingroup slam * @ingroup slam
*/ */
template <class CAMERA> template <class CAMERA>
class GTSAM_UNSTABLE_EXPORT SmartProjectionPoseFactorRollingShutter class SmartProjectionPoseFactorRollingShutter
: public SmartProjectionFactor<CAMERA> { : public SmartProjectionFactor<CAMERA> {
private: private:
typedef SmartProjectionFactor<CAMERA> Base; typedef SmartProjectionFactor<CAMERA> Base;

View File

@ -1441,14 +1441,14 @@ TEST( SmartStereoProjectionPoseFactor, HessianWithRotationNonDegenerate ) {
std::shared_ptr<GaussianFactor> hessianFactorRotTran = std::shared_ptr<GaussianFactor> hessianFactorRotTran =
smartFactor->linearize(tranValues); smartFactor->linearize(tranValues);
// Hessian is invariant to rotations and translations in the degenerate case double error;
EXPECT(
assert_equal(hessianFactor->information(),
#ifdef GTSAM_USE_EIGEN_MKL #ifdef GTSAM_USE_EIGEN_MKL
hessianFactorRotTran->information(), 1e-5)); error = 1e-5;
#else #else
hessianFactorRotTran->information(), 1e-6)); error = 1e-6;
#endif #endif
// Hessian is invariant to rotations and translations in the degenerate case
EXPECT(assert_equal(hessianFactor->information(), hessianFactorRotTran->information(), error));
} }
/* ************************************************************************* */ /* ************************************************************************* */