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  std::uint32_t id;
48  std::optional<double> speed;
53  bool is_cup;
61  bool is_deleted;
65  pcl::PointCloud<pcl::PointXYZ> point_cloud;
76  bool operator==(const Object& rhs) const;
82  bool operator!=(const Object& rhs) const;
87  explicit operator HLR::Object() const;
88 };
89 
90 } // namespace PointCloud
91 } // namespace HLR
92 #endif /* OBJECT_HPP */
std::optional< double > speed
The velocity in m/s at which the Object is moving the real world.
Definition: Object.hpp:48
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
bool operator!=(const Object &rhs) const
Compares each of the attributes for inequality.
std::uint32_t id
Must be unique.
Definition: Object.hpp:38
CGAL::Surface_mesh< Point > Polyhedron
Data type specifying a polyhedron.
Definition: Object.hpp:33
Polyhedron polyhedron
The polyhedron defining the Object.
Definition: Object.hpp:43
pcl::PointCloud< pcl::PointXYZ > point_cloud
PointCloud of the found object.
Definition: Object.hpp:65
Point middlepoint
Contains middlepoint (x,y) of the complete object.
Definition: Object.hpp:70
bool is_cup
Is true if Vision recognizes it as a cup.
Definition: Object.hpp:53
bool is_deleted
Is true if the Object is not visible in the world anymore.
Definition: Object.hpp:61
bool operator==(const Object &rhs) const
Compares each of the attributes for equality.