HLR  0.0.1
Object.hpp
1 #ifndef OBJECT_HPP
2 #define OBJECT_HPP
3 
4 #include <cstdint>
5 #include <optional>
6 #include <HLR/Object.h> //ROS msg
7 #include <CGAL/Simple_cartesian.h>
8 #include <CGAL/Surface_mesh.h>
9 #include <pcl/point_cloud.h>
10 #include <pcl/point_types.h>
11 
12 namespace HLR
13 {
14 namespace PointCloud
15 {
24 struct Object
25 {
29  using Point = CGAL::Simple_cartesian<double>::Point_3;
33  using Polyhedron = CGAL::Surface_mesh<Point>;
38  using Vector = CGAL::Simple_cartesian<double>::Vector_3;
43  std::uint32_t id;
55  std::optional<Vector> speed;
60  bool is_cup;
68  bool is_deleted;
72  pcl::PointCloud<pcl::PointXYZ> point_cloud;
83  bool operator==(const Object& rhs) const;
89  bool operator!=(const Object& rhs) const;
94  explicit operator HLR::Object() const;
95 };
96 
97 } // namespace PointCloud
98 } // namespace HLR
99 #endif /* OBJECT_HPP */
A class for mapping the ROS::Object defined in msg/Object.msg.
Definition: Object.hpp:24
CGAL::Simple_cartesian< double >::Point_3 Point
Data type specifying a point in 3D space.
Definition: Object.hpp:29
std::optional< Vector > speed
The velocity in m/s at which the Object is moving the real world.
Definition: Object.hpp:55
bool operator!=(const Object &rhs) const
Compares each of the attributes for inequality.
std::uint32_t id
Must be unique.
Definition: Object.hpp:43
CGAL::Surface_mesh< Point > Polyhedron
Data type specifying a polyhedron.
Definition: Object.hpp:33
Polyhedron polyhedron
The polyhedron defining the Object.
Definition: Object.hpp:48
pcl::PointCloud< pcl::PointXYZ > point_cloud
PointCloud of the found object.
Definition: Object.hpp:72
CGAL::Simple_cartesian< double >::Vector_3 Vector
Date type specifying a (physics) vector.
Definition: Object.hpp:38
Point middlepoint
Contains middlepoint (x,y) of the complete object.
Definition: Object.hpp:77
bool is_cup
Is true if Vision recognizes it as a cup.
Definition: Object.hpp:60
bool is_deleted
Is true if the Object is not visible in the world anymore.
Definition: Object.hpp:68
bool operator==(const Object &rhs) const
Compares each of the attributes for equality.