diff --git a/gtsam/geometry/Pose3.cpp b/gtsam/geometry/Pose3.cpp index ccf39f153..f1cb482bb 100644 --- a/gtsam/geometry/Pose3.cpp +++ b/gtsam/geometry/Pose3.cpp @@ -100,7 +100,7 @@ Vector6 Pose3::adjointTranspose(const Vector6& xi, const Vector6& y, void Pose3::print(const string& s) const { cout << s; R_.print("R:\n"); - traits::Print(t_, "t: "); + cout << '[' << t_.x() << ", " << t_.y() << ", " << t_.z() << "]\';"; } /* ************************************************************************* */ @@ -394,7 +394,9 @@ boost::optional align(const vector& pairs) { /* ************************************************************************* */ 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; } diff --git a/gtsam/geometry/tests/testPoint3.cpp b/gtsam/geometry/tests/testPoint3.cpp index c7fb44716..a4e2b139e 100644 --- a/gtsam/geometry/tests/testPoint3.cpp +++ b/gtsam/geometry/tests/testPoint3.cpp @@ -84,12 +84,14 @@ TEST( Point3, dot) { } /* ************************************************************************* */ +#ifndef GTSAM_USE_VECTOR3_POINTS TEST( Point3, stream) { Point3 p(1, 2, -3); std::ostringstream os; os << p; EXPECT(os.str() == "[1, 2, -3]';"); } +#endif //************************************************************************* TEST (Point3, normalize) {