Skip to content

Commit

Permalink
Merge branch 'develop' into feature/essential-mat-with-approx-k
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushbaid committed May 25, 2021
2 parents 4572282 + ab92779 commit 71b9004
Show file tree
Hide file tree
Showing 38 changed files with 378 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/boost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
BOOST_FOLDER=boost_${BOOST_VERSION//./_}

# Download Boost
wget https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/${BOOST_FOLDER}.tar.gz
wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/${BOOST_FOLDER}.tar.gz

# Unzip
tar -zxf ${BOOST_FOLDER}.tar.gz
Expand Down
3 changes: 3 additions & 0 deletions gtsam/discrete/DiscreteBayesNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ namespace gtsam {
template<class DERIVEDCONDITIONAL>
DiscreteBayesNet(const FactorGraph<DERIVEDCONDITIONAL>& graph) : Base(graph) {}

/// Destructor
virtual ~DiscreteBayesNet() {}

/// @}

/// @name Testable
Expand Down
11 changes: 6 additions & 5 deletions gtsam/discrete/DiscreteFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ class GTSAM_EXPORT DiscreteFactor: public Factor {
/// @name Testable
/// @{

// equals
/// equals
virtual bool equals(const DiscreteFactor& lf, double tol = 1e-9) const = 0;

// print
virtual void print(const std::string& s = "DiscreteFactor\n",
const KeyFormatter& formatter = DefaultKeyFormatter) const {
Factor::print(s, formatter);
/// print
void print(
const std::string& s = "DiscreteFactor\n",
const KeyFormatter& formatter = DefaultKeyFormatter) const override {
Base::print(s, formatter);
}

/** Test whether the factor is empty */
Expand Down
8 changes: 6 additions & 2 deletions gtsam/discrete/DiscreteFactorGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public EliminateableFactorGraph<DiscreteFactorGraph> {
template<class DERIVEDFACTOR>
DiscreteFactorGraph(const FactorGraph<DERIVEDFACTOR>& graph) : Base(graph) {}

/// Destructor
virtual ~DiscreteFactorGraph() {}

/// @name Testable
/// @{

Expand Down Expand Up @@ -129,8 +132,9 @@ public EliminateableFactorGraph<DiscreteFactorGraph> {
double operator()(const DiscreteFactor::Values & values) const;

/// print
void print(const std::string& s = "DiscreteFactorGraph",
const KeyFormatter& formatter =DefaultKeyFormatter) const;
void print(
const std::string& s = "DiscreteFactorGraph",
const KeyFormatter& formatter = DefaultKeyFormatter) const override;

/** Solve the factor graph by performing variable elimination in COLAMD order using
* the dense elimination function specified in \c function,
Expand Down
25 changes: 14 additions & 11 deletions gtsam/geometry/CalibratedCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,20 @@ class GTSAM_EXPORT PinholeBase {
/// @name Standard Constructors
/// @{

/** default constructor */
PinholeBase() {
}
/// Default constructor
PinholeBase() {}

/** constructor with pose */
explicit PinholeBase(const Pose3& pose) :
pose_(pose) {
}
/// Constructor with pose
explicit PinholeBase(const Pose3& pose) : pose_(pose) {}

/// @}
/// @name Advanced Constructors
/// @{

explicit PinholeBase(const Vector &v) :
pose_(Pose3::Expmap(v)) {
}
explicit PinholeBase(const Vector& v) : pose_(Pose3::Expmap(v)) {}

/// Default destructor
virtual ~PinholeBase() = default;

/// @}
/// @name Testable
Expand All @@ -144,7 +142,7 @@ class GTSAM_EXPORT PinholeBase {
bool equals(const PinholeBase &camera, double tol = 1e-9) const;

/// print
void print(const std::string& s = "PinholeBase") const;
virtual void print(const std::string& s = "PinholeBase") const;

/// @}
/// @name Standard Interface
Expand Down Expand Up @@ -324,6 +322,11 @@ class GTSAM_EXPORT CalibratedCamera: public PinholeBase {
/// Return canonical coordinate
Vector localCoordinates(const CalibratedCamera& T2) const;

/// print
void print(const std::string& s = "CalibratedCamera") const override {
PinholeBase::print(s);
}

/// @deprecated
inline size_t dim() const {
return dimension;
Expand Down
2 changes: 1 addition & 1 deletion gtsam/geometry/PinholeCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class PinholeCamera: public PinholeBaseK<Calibration> {
}

/// print
void print(const std::string& s = "PinholeCamera") const {
void print(const std::string& s = "PinholeCamera") const override {
Base::print(s);
K_.print(s + ".calibration");
}
Expand Down
2 changes: 1 addition & 1 deletion gtsam/geometry/PinholePose.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class PinholePose: public PinholeBaseK<CALIBRATION> {
}

/// print
void print(const std::string& s = "PinholePose") const {
void print(const std::string& s = "PinholePose") const override {
Base::print(s);
if (!K_)
std::cout << "s No calibration given" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion gtsam/geometry/tests/testRot3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ TEST(Rot3, RQ_derivative) {
const auto R = Rot3::RzRyRx(xyz).matrix();
const auto num = numericalDerivative11(RQ_proxy, R);
Matrix39 calc;
RQ(R, calc).second;
RQ(R, calc);

const auto err = vec_err.second;
CHECK(assert_equal(num, calc, err));
Expand Down
Loading

0 comments on commit 71b9004

Please sign in to comment.