Merge branch 'develop' of https://github.com/borglab/gtsam into develop
commit
15a8f41990
|
|
@ -102,6 +102,27 @@ class Line3 {
|
||||||
*/
|
*/
|
||||||
Point3 point(double distance = 0) const;
|
Point3 point(double distance = 0) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the rotation of the line.
|
||||||
|
*/
|
||||||
|
inline Rot3 R() const {
|
||||||
|
return R_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the x-coordinate of the intersection of the line with the xy plane.
|
||||||
|
*/
|
||||||
|
inline double a() const {
|
||||||
|
return a_;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the y-coordinate of the intersection of the line with the xy plane.
|
||||||
|
*/
|
||||||
|
inline double b() const {
|
||||||
|
return b_;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform a line from world to camera frame
|
* Transform a line from world to camera frame
|
||||||
* @param wTc - Pose3 of camera in world frame
|
* @param wTc - Pose3 of camera in world frame
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,16 @@ GTSAM_CONCEPT_MANIFOLD_INST(Line3)
|
||||||
|
|
||||||
static const Line3 l(Rot3(), 1, 1);
|
static const Line3 l(Rot3(), 1, 1);
|
||||||
|
|
||||||
|
// Testing getters
|
||||||
|
TEST(Line3, getMethods) {
|
||||||
|
const double a = 5, b = 10;
|
||||||
|
const Rot3 R = Rot3::Expmap(Vector3(0.1, 0.2, 0.3));
|
||||||
|
const Line3 line(R, a, b);
|
||||||
|
EXPECT_DOUBLES_EQUAL(a, line.a(), 1e-8);
|
||||||
|
EXPECT_DOUBLES_EQUAL(b, line.b(), 1e-8);
|
||||||
|
EXPECT(assert_equal(R, line.R(), 1e-8));
|
||||||
|
}
|
||||||
|
|
||||||
// Testing equals function of Line3
|
// Testing equals function of Line3
|
||||||
TEST(Line3, equals) {
|
TEST(Line3, equals) {
|
||||||
Line3 l_same = l;
|
Line3 l_same = l;
|
||||||
|
|
|
||||||
|
|
@ -2933,9 +2933,14 @@ class ShonanAveragingParameters2 {
|
||||||
void setAnchorWeight(double value);
|
void setAnchorWeight(double value);
|
||||||
double getAnchorWeight() const;
|
double getAnchorWeight() const;
|
||||||
void setKarcherWeight(double value);
|
void setKarcherWeight(double value);
|
||||||
double getKarcherWeight();
|
double getKarcherWeight() const;
|
||||||
void setGaugesWeight(double value);
|
void setGaugesWeight(double value);
|
||||||
double getGaugesWeight();
|
double getGaugesWeight() const;
|
||||||
|
void setUseHuber(bool value);
|
||||||
|
bool getUseHuber() const;
|
||||||
|
void setCertifyOptimality(bool value);
|
||||||
|
bool getCertifyOptimality() const;
|
||||||
|
void print() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShonanAveragingParameters3 {
|
class ShonanAveragingParameters3 {
|
||||||
|
|
@ -2949,9 +2954,14 @@ class ShonanAveragingParameters3 {
|
||||||
void setAnchorWeight(double value);
|
void setAnchorWeight(double value);
|
||||||
double getAnchorWeight() const;
|
double getAnchorWeight() const;
|
||||||
void setKarcherWeight(double value);
|
void setKarcherWeight(double value);
|
||||||
double getKarcherWeight();
|
double getKarcherWeight() const;
|
||||||
void setGaugesWeight(double value);
|
void setGaugesWeight(double value);
|
||||||
double getGaugesWeight();
|
double getGaugesWeight() const;
|
||||||
|
void setUseHuber(bool value);
|
||||||
|
bool getUseHuber() const;
|
||||||
|
void setCertifyOptimality(bool value);
|
||||||
|
bool getCertifyOptimality() const;
|
||||||
|
void print() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShonanAveraging2 {
|
class ShonanAveraging2 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue