pose.hpp
1 #ifndef NOOS_OBJECT_POSE
2 #define NOOS_OBJECT_POSE
3 #include "includes.ihh"
4 #include "point.hpp"
5 #include "orientation.hpp"
6 /*
7  * LICENSE HERE
8  */
9 namespace noos {
10 namespace object {
17 template <class value_type>
18 struct pose
19 {
24 
26  pose() = default;
27 
29  pose(point<value_type> coordinates,
31 
33  pose(const json::const_iterator & position);
34 
36  json::object_t to_json() const;
37 
39  bool operator==(const noos::object::pose<value_type> & rhs) const;
40 
42  friend std::ostream& operator<<(std::ostream& out,
43  const noos::object::pose<value_type>& pose3d)
44  {
45  //TODO: overload operator << in point and orientation
46  return out << "x: " << pose3d.coordinates.x
47  << " y: " << pose3d.coordinates.y
48  << " z: " << pose3d.coordinates.z
49  << " roll: " << pose3d.angles.roll
50  << " pitch: " << pose3d.angles.pitch
51  << " yaw: " << pose3d.angles.yaw << std::endl;
52  }
53 
54 };
55 
56 #include "pose.tpl"
57 }
58 }
59 #endif
point< value_type > coordinates
position
Definition: pose.hpp:21
Definition: asio_handler.hpp:14
orientation< value_type > angles
orientation
Definition: pose.hpp:23
bool operator==(const noos::object::pose< value_type > &rhs) const
Equality operator.
Definition: pose.hpp:36
pose()=default
default constructor
encapsulate euler angles (roll, pitch, yaw)
Definition: orientation.hpp:16
encapsulate point position vector
Definition: point.hpp:17
encapsulates position and orientation
Definition: pose.hpp:18
json::object_t to_json() const
Definition: pose.hpp:28
friend std::ostream & operator<<(std::ostream &out, const noos::object::pose< value_type > &pose3d)
overload operator
Definition: pose.hpp:42