Skip to content

Commit

Permalink
Merge pull request #1348 from borglab/fix/wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal authored Dec 25, 2022
2 parents 2abc0d9 + 6f5e856 commit d7491a1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gtsam/slam/StereoFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class GenericStereoFactor: public NoiseModelFactorN<POSE, LANDMARK> {
std::cout << e.what() << ": Landmark "<< DefaultKeyFormatter(this->template key<2>()) <<
" moved behind camera " << DefaultKeyFormatter(this->template key<1>()) << std::endl;
if (throwCheirality_)
throw StereoCheiralityException(this->key2());
throw StereoCheiralityException(this->template key<2>());
}
return Vector3::Constant(2.0 * K_->fx());
}
Expand Down
20 changes: 10 additions & 10 deletions gtsam_unstable/gtsam_unstable.i
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ virtual class gtsam::noiseModel::Isotropic;
virtual class gtsam::imuBias::ConstantBias;
virtual class gtsam::NonlinearFactor;
virtual class gtsam::NoiseModelFactor;
virtual class gtsam::NoiseModelFactor2;
virtual class gtsam::NoiseModelFactor3;
virtual class gtsam::NoiseModelFactor4;
virtual class gtsam::NoiseModelFactorN;
virtual class gtsam::GaussianFactor;
virtual class gtsam::HessianFactor;
virtual class gtsam::JacobianFactor;
Expand Down Expand Up @@ -430,8 +428,9 @@ virtual class IMUFactor : gtsam::NoiseModelFactor {
Vector gyro() const;
Vector accel() const;
Vector z() const;
size_t key1() const;
size_t key2() const;

template <I = {1, 2}>
size_t key() const;
};

#include <gtsam_unstable/dynamics/FullIMUFactor.h>
Expand All @@ -448,8 +447,9 @@ virtual class FullIMUFactor : gtsam::NoiseModelFactor {
Vector gyro() const;
Vector accel() const;
Vector z() const;
size_t key1() const;
size_t key2() const;

template <I = {1, 2}>
size_t key() const;
};

#include <gtsam_unstable/dynamics/DynamicsPriors.h>
Expand Down Expand Up @@ -733,22 +733,22 @@ class AHRS {
// Tectonic SAM Factors

#include <gtsam_unstable/slam/TSAMFactors.h>
//typedef gtsam::NoiseModelFactor2<gtsam::Pose2, gtsam::Point2> NLPosePose;
//typedef gtsam::NoiseModelFactorN<gtsam::Pose2, gtsam::Point2> NLPosePose;
virtual class DeltaFactor : gtsam::NoiseModelFactor {
DeltaFactor(size_t i, size_t j, const gtsam::Point2& measured,
const gtsam::noiseModel::Base* noiseModel);
//void print(string s) const;
};

//typedef gtsam::NoiseModelFactor4<gtsam::Pose2, gtsam::Pose2, gtsam::Pose2,
//typedef gtsam::NoiseModelFactorN<gtsam::Pose2, gtsam::Pose2, gtsam::Pose2,
// gtsam::Point2> NLPosePosePosePoint;
virtual class DeltaFactorBase : gtsam::NoiseModelFactor {
DeltaFactorBase(size_t b1, size_t i, size_t b2, size_t j,
const gtsam::Point2& measured, const gtsam::noiseModel::Base* noiseModel);
//void print(string s) const;
};

//typedef gtsam::NoiseModelFactor4<gtsam::Pose2, gtsam::Pose2, gtsam::Pose2,
//typedef gtsam::NoiseModelFactorN<gtsam::Pose2, gtsam::Pose2, gtsam::Pose2,
// gtsam::Pose2> NLPosePosePosePose;
virtual class OdometryFactorBase : gtsam::NoiseModelFactor {
OdometryFactorBase(size_t b1, size_t i, size_t b2, size_t j,
Expand Down
4 changes: 2 additions & 2 deletions gtsam_unstable/slam/LocalOrientedPlane3Factor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ namespace gtsam {
void LocalOrientedPlane3Factor::print(const string& s,
const KeyFormatter& keyFormatter) const {
cout << s << (s == "" ? "" : "\n");
cout << "LocalOrientedPlane3Factor Factor (" << keyFormatter(key1()) << ", "
<< keyFormatter(key2()) << ", " << keyFormatter(key3()) << ")\n";
cout << "LocalOrientedPlane3Factor Factor (" << keyFormatter(key<1>()) << ", "
<< keyFormatter(key<2>()) << ", " << keyFormatter(key<3>()) << ")\n";
measured_p_.print("Measured Plane");
this->noiseModel_->print(" noise model: ");
}
Expand Down

0 comments on commit d7491a1

Please sign in to comment.