Skip to content

Commit

Permalink
Merge pull request #956 from borglab/fix/compiler-warnings-posetopoin…
Browse files Browse the repository at this point in the history
…tfactor
  • Loading branch information
varunagrawal authored Dec 9, 2021
2 parents b47f46a + 45d5328 commit 3615c4b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions gtsam_unstable/slam/PoseToPointFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ class PoseToPointFactor : public NoiseModelFactor2<POSE, POINT> {
/** implement functions needed for Testable */

/** print */
virtual void print(const std::string& s, const KeyFormatter& keyFormatter =
DefaultKeyFormatter) const {
void print(const std::string& s, const KeyFormatter& keyFormatter =
DefaultKeyFormatter) const override {
std::cout << s << "PoseToPointFactor(" << keyFormatter(this->key1()) << ","
<< keyFormatter(this->key2()) << ")\n"
<< " measured: " << measured_.transpose() << std::endl;
this->noiseModel_->print(" noise model: ");
}

/** equals */
virtual bool equals(const NonlinearFactor& expected,
double tol = 1e-9) const {
bool equals(const NonlinearFactor& expected,
double tol = 1e-9) const override {
const This* e = dynamic_cast<const This*>(&expected);
return e != nullptr && Base::equals(*e, tol) &&
traits<POINT>::Equals(this->measured_, e->measured_, tol);
Expand All @@ -70,9 +70,10 @@ class PoseToPointFactor : public NoiseModelFactor2<POSE, POINT> {
*
* Note: measured_ and the error are in local coordiantes.
*/
Vector evaluateError(const POSE& w_T_b, const POINT& w_P,
boost::optional<Matrix&> H1 = boost::none,
boost::optional<Matrix&> H2 = boost::none) const {
Vector evaluateError(
const POSE& w_T_b, const POINT& w_P,
boost::optional<Matrix&> H1 = boost::none,
boost::optional<Matrix&> H2 = boost::none) const override {
return w_T_b.transformTo(w_P, H1, H2) - measured_;
}

Expand Down

0 comments on commit 3615c4b

Please sign in to comment.