Skip to content

Commit

Permalink
Resolved several MSVC compiling errors
Browse files Browse the repository at this point in the history
* The check.base unit tests all pass now.
* The gstam_matlab_wrapper class compiles with now errors now.
* Note that I had to remove all LieMatrix, LieVector, and LieScalar stuff
to get this to work...
  • Loading branch information
cntaylor committed Jul 13, 2019
1 parent 1ca0e33 commit 33bda1e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 304 deletions.
93 changes: 0 additions & 93 deletions gtsam.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,99 +286,6 @@ virtual class GenericValue : gtsam::Value {
void serializable() const;
};

#include <gtsam/base/deprecated/LieScalar.h>
class LieScalar {
// Standard constructors
LieScalar();
LieScalar(double d);

// Standard interface
double value() const;

// Testable
void print(string s) const;
bool equals(const gtsam::LieScalar& expected, double tol) const;

// Group
static gtsam::LieScalar identity();
gtsam::LieScalar inverse() const;
gtsam::LieScalar compose(const gtsam::LieScalar& p) const;
gtsam::LieScalar between(const gtsam::LieScalar& l2) const;

// Manifold
size_t dim() const;
gtsam::LieScalar retract(Vector v) const;
Vector localCoordinates(const gtsam::LieScalar& t2) const;

// Lie group
static gtsam::LieScalar Expmap(Vector v);
static Vector Logmap(const gtsam::LieScalar& p);
};

#include <gtsam/base/deprecated/LieVector.h>
class LieVector {
// Standard constructors
LieVector();
LieVector(Vector v);

// Standard interface
Vector vector() const;

// Testable
void print(string s) const;
bool equals(const gtsam::LieVector& expected, double tol) const;

// Group
static gtsam::LieVector identity();
gtsam::LieVector inverse() const;
gtsam::LieVector compose(const gtsam::LieVector& p) const;
gtsam::LieVector between(const gtsam::LieVector& l2) const;

// Manifold
size_t dim() const;
gtsam::LieVector retract(Vector v) const;
Vector localCoordinates(const gtsam::LieVector& t2) const;

// Lie group
static gtsam::LieVector Expmap(Vector v);
static Vector Logmap(const gtsam::LieVector& p);

// enabling serialization functionality
void serialize() const;
};

#include <gtsam/base/deprecated/LieMatrix.h>
class LieMatrix {
// Standard constructors
LieMatrix();
LieMatrix(Matrix v);

// Standard interface
Matrix matrix() const;

// Testable
void print(string s) const;
bool equals(const gtsam::LieMatrix& expected, double tol) const;

// Group
static gtsam::LieMatrix identity();
gtsam::LieMatrix inverse() const;
gtsam::LieMatrix compose(const gtsam::LieMatrix& p) const;
gtsam::LieMatrix between(const gtsam::LieMatrix& l2) const;

// Manifold
size_t dim() const;
gtsam::LieMatrix retract(Vector v) const;
Vector localCoordinates(const gtsam::LieMatrix & t2) const;

// Lie group
static gtsam::LieMatrix Expmap(Vector v);
static Vector Logmap(const gtsam::LieMatrix& p);

// enabling serialization functionality
void serialize() const;
};

//*************************************************************************
// geometry
//*************************************************************************
Expand Down
7 changes: 7 additions & 0 deletions gtsam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ set (excluded_sources #"")

set (excluded_headers #"")
"${CMAKE_CURRENT_SOURCE_DIR}/slam/serialization.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/LieMatrix.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/LieVector.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/LieScalar.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/deprecated/LieMatrix.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/deprecated/LieVector.h"
"${CMAKE_CURRENT_SOURCE_DIR}/base/deprecated/LieScalar.h"
)

if(GTSAM_USE_QUATERNIONS)
Expand All @@ -56,6 +62,7 @@ foreach(subdir ${gtsam_subdirs})
# Build convenience libraries
file(GLOB_RECURSE subdir_srcs "${subdir}/*.cpp" "${subdir}/*.h") # Include header files so they show up in Visual Studio
list(REMOVE_ITEM subdir_srcs ${excluded_sources})
list(REMOVE_ITEM subdir_srcs ${excluded_headers})
file(GLOB subdir_test_files "${subdir}/tests/*")
list(REMOVE_ITEM subdir_srcs ${subdir_test_files}) # Remove test files from sources compiled into library
gtsam_assign_source_folders("${subdir_srcs}") # Create MSVC structure
Expand Down
2 changes: 1 addition & 1 deletion gtsam/base/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ GTSAM_EXPORT std::pair<Matrix,Matrix> qr(const Matrix& A);
* @param A is the input matrix, and is the output
* @param clear_below_diagonal enables zeroing out below diagonal
*/
void inplace_QR(Matrix& A);
GTSAM_EXPORT void inplace_QR(Matrix& A);

/**
* Imperative algorithm for in-place full elimination with
Expand Down
70 changes: 0 additions & 70 deletions gtsam/base/tests/testLieMatrix.cpp

This file was deleted.

64 changes: 0 additions & 64 deletions gtsam/base/tests/testLieScalar.cpp

This file was deleted.

66 changes: 0 additions & 66 deletions gtsam/base/tests/testLieVector.cpp

This file was deleted.

10 changes: 0 additions & 10 deletions gtsam/base/tests/testTestableAssertions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,10 @@
*/

#include <CppUnitLite/TestHarness.h>
#include <gtsam/base/deprecated/LieScalar.h>
#include <gtsam/base/TestableAssertions.h>

using namespace gtsam;

/* ************************************************************************* */
TEST( testTestableAssertions, optional ) {
typedef boost::optional<LieScalar> OptionalScalar;
LieScalar x(1.0);
OptionalScalar ox(x), dummy = boost::none;
EXPECT(assert_equal(ox, ox));
EXPECT(assert_equal(x, ox));
EXPECT(assert_equal(dummy, dummy));
}

/* ************************************************************************* */
int main() { TestResult tr; return TestRegistry::runAllTests(tr); }
Expand Down

0 comments on commit 33bda1e

Please sign in to comment.