Fixed print issues
parent
1c920967d9
commit
1a69a71c2c
|
|
@ -100,7 +100,7 @@ Vector6 Pose3::adjointTranspose(const Vector6& xi, const Vector6& y,
|
||||||
void Pose3::print(const string& s) const {
|
void Pose3::print(const string& s) const {
|
||||||
cout << s;
|
cout << s;
|
||||||
R_.print("R:\n");
|
R_.print("R:\n");
|
||||||
traits<Point3>::Print(t_, "t: ");
|
cout << '[' << t_.x() << ", " << t_.y() << ", " << t_.z() << "]\';";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
@ -394,7 +394,9 @@ boost::optional<Pose3> align(const vector<Point3Pair>& pairs) {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
std::ostream &operator<<(std::ostream &os, const Pose3& pose) {
|
std::ostream &operator<<(std::ostream &os, const Pose3& pose) {
|
||||||
os << pose.rotation() << "\n" << pose.translation() << endl;
|
os << pose.rotation() << "\n";
|
||||||
|
const Point3& t = pose.translation();
|
||||||
|
os << '[' << t.x() << ", " << t.y() << ", " << t.z() << "]\';\n";
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,14 @@ TEST( Point3, dot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
#ifndef GTSAM_USE_VECTOR3_POINTS
|
||||||
TEST( Point3, stream) {
|
TEST( Point3, stream) {
|
||||||
Point3 p(1, 2, -3);
|
Point3 p(1, 2, -3);
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << p;
|
os << p;
|
||||||
EXPECT(os.str() == "[1, 2, -3]';");
|
EXPECT(os.str() == "[1, 2, -3]';");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//*************************************************************************
|
//*************************************************************************
|
||||||
TEST (Point3, normalize) {
|
TEST (Point3, normalize) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue