stream printing for Pose2
parent
56eb1bb808
commit
2168cd4a04
|
@ -48,7 +48,13 @@ Matrix3 Pose2::matrix() const {
|
|||
|
||||
/* ************************************************************************* */
|
||||
void Pose2::print(const string& s) const {
|
||||
cout << s << "(" << t_.x() << ", " << t_.y() << ", " << r_.theta() << ")" << endl;
|
||||
cout << s << this << endl;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
std::ostream &operator<<(std::ostream &os, const Pose2& pose) {
|
||||
os << "(" << pose.x() << ", " << pose.y() << ", " << pose.theta() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
@ -287,6 +287,10 @@ public:
|
|||
*/
|
||||
static std::pair<size_t, size_t> rotationInterval() { return std::make_pair(2, 2); }
|
||||
|
||||
/// Output stream operator
|
||||
GTSAM_EXPORT
|
||||
friend std::ostream &operator<<(std::ostream &os, const Pose2& p);
|
||||
|
||||
/// @}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue