RealObjectPoint.hpp
Go to the documentation of this file.
1 
20 #ifndef REALOBJECTPOINT_HPP_
21 #define REALOBJECTPOINT_HPP_
22 
23 #define PCL_NO_PRECOMPILE
24 #include "typedef.hpp"
25 #include <geometry_msgs/Pose.h>
26 #include <string>
27 #include <pcl/point_types.h>
28 #include <pcl/impl/point_types.hpp>
29 #include <pcl/search/search.h>
30 #include <pcl/search/organized.h>
31 #include <pcl/search/impl/organized.hpp>
32 #include <pcl/search/kdtree.h>
33 #include <pcl/search/impl/kdtree.hpp>
34 #include <pcl/kdtree/kdtree_flann.h>
35 #include <pcl/kdtree/impl/kdtree_flann.hpp>
36 #include <pcl/segmentation/conditional_euclidean_clustering.h>
37 #include <pcl/segmentation/impl/conditional_euclidean_clustering.hpp>
38 #include <pcl/pcl_base.h>
39 #include <pcl/impl/pcl_base.hpp>
40 #include <std_msgs/ColorRGBA.h>
41 
42 namespace next_best_view {
43  namespace gm = geometry_msgs;
44 
53  /*
54  * Describes a Object in the pointcloud.
55  */
56  struct RealObjectPoint {
58 
59  union {
60  struct {
61  float qw;
62  float qx;
63  float qy;
64  float qz;
65  };
66  };
67 
68  //Type of the object
69  std::string type;
70  //Identifier of the object
71  std::string identifier;
74  std_msgs::ColorRGBA color;
76  public:
77  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
78  RealObjectPoint(const gm::Pose &pose = gm::Pose()) : normal_vectors(new SimpleVector3Collection()), active_normal_vectors(new Indices()) {
79  x = pose.position.x;
80  y = pose.position.y;
81  z = pose.position.z;
82 
83  qw = pose.orientation.w;
84  qx = pose.orientation.x;
85  qy = pose.orientation.y;
86  qz = pose.orientation.z;
87  }
88 
89  RealObjectPoint(const SimpleVector3 &vector) : qw(1.0), qx(0.0), qy(0.0), qz(0.0), normal_vectors(new SimpleVector3Collection()) {
90  x = vector[0];
91  y = vector[1];
92  z = vector[2];
93  }
94 
95  gm::Point getPoint() const {
96  gm::Point pt;
97  pt.x = x;
98  pt.y = y;
99  pt.z = z;
100  return pt;
101  }
102 
103  gm::Quaternion getQuaternion() const {
104  gm::Quaternion qt;
105  qt.w = qw;
106  qt.x = qx;
107  qt.y = qy;
108  qt.z = qz;
109  return qt;
110  }
111 
112  gm::Pose getPose() const {
113  gm::Pose pose;
114  pose.position = this->getPoint();
115  pose.orientation = this->getQuaternion();
116  return pose;
117  }
118 
120  return SimpleVector3(x, y, z);
121  }
122 
124  return SimpleQuaternion(qw, qx, qy, qz);
125  }
126  } EIGEN_ALIGN16;
128 
129  std::ostream& operator<<(std::ostream &strm, const next_best_view::RealObjectPoint &p);
130  std::ostream& operator<<(std::ostream &strm, const next_best_view::RealObjectPointPtr &p);
131 }
132 
133 POINT_CLOUD_REGISTER_POINT_STRUCT (next_best_view::RealObjectPoint,
134  (float, x, x)
135  (float, y, y)
136  (float, z, z)
137 )
138 
139 #endif /* REALOBJECTPOINT_HPP_ */
140 
141 
SimpleVector3CollectionPtr normal_vectors
Eigen::Matrix< Precision, 3, 1 > SimpleVector3
Definition: typedef.hpp:53
boost::shared_ptr< RealObjectPoint > RealObjectPointPtr
TFSIMD_FORCE_INLINE const tfScalar & y() const
std::vector< int > Indices
Definition: typedef.hpp:117
RealObjectPoint(const SimpleVector3 &vector)
this namespace contains all generally usable classes.
TFSIMD_FORCE_INLINE const tfScalar & x() const
TFSIMD_FORCE_INLINE const tfScalar & z() const
SimpleVector3 getPosition() const
struct next_best_view::DefaultViewportPoint EIGEN_ALIGN16
EIGEN_MAKE_ALIGNED_OPERATOR_NEW RealObjectPoint(const gm::Pose &pose=gm::Pose())
std::vector< SimpleVector3, Eigen::aligned_allocator< SimpleVector3 > > SimpleVector3Collection
Definition: typedef.hpp:60
std::ostream & operator<<(std::ostream &strm, const next_best_view::DefaultViewportPoint &p)
Eigen::Quaternion< Precision > SimpleQuaternion
Definition: typedef.hpp:67
SimpleQuaternion getSimpleQuaternion() const
gm::Quaternion getQuaternion() const


asr_next_best_view
Author(s): Aumann Florian, Borella Jocelyn, Heller Florian, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Stroh Daniel, Trautmann Jeremias, Walter Milena, Wittenbeck Valerij
autogenerated on Thu Jan 9 2020 07:20:18