1 #ifndef LIDAR_INTERPRETER_HPP 2 #define LIDAR_INTERPRETER_HPP 6 #include "ISensorInterpreter.hpp" 7 #include "Vision/ICupDetector.hpp" 9 #include "Vision/mock/MockCupDetector.hpp" 11 #include "Vision/CupDetector.hpp" 13 #include <pcl/point_cloud.h> 14 #include <pcl/point_types.h> 40 const pcl::PointCloud<pcl::PointXYZ>& point_cloud)
override;
52 using PointCloudWithId =
53 std::pair<pcl::PointCloud<pcl::PointXYZ>, std::uint32_t>;
55 struct CupMeasurements
60 CupMeasurements() =
default;
62 CupMeasurements(
double upper_radius,
double lower_radius,
double height)
63 : upper_radius(upper_radius)
64 , lower_radius(lower_radius)
69 static Object convert_cup_to_polyhedron(
const Cup& cup_in_robot_arm_space);
70 static Cup translate_lidar_to_robot_arm(
const Cup& cup_in_lidar_space);
71 static Cup get_centerpoint_from_contour(
72 const PointCloudWithId& point_cloud_with_id);
73 PointCloudWithId find_contour(
75 const pcl::PointCloud<pcl::PointXYZ>& newest_cloud);
76 static double translate_kinect_to_lidar(
77 const std::shared_ptr<cv::Mat>& distance_frame,
78 const cv::Point& location_cup);
79 bool is_angle_in_angle_range(
double input,
82 std::vector<PointCloudWithId> pointcloud_database;
83 unsigned long highest_pointcloud_id = 0;
84 std::unique_ptr<HLR::Vision::ICupDetector> cup_detector
86 = std::make_unique<HLR::Vision::MockCupDetector>();
88 = std::make_unique<HLR::Vision::CupDetector>();
91 static constexpr
double distance_kinect_lidar = 0.082;
92 static constexpr
unsigned number_of_cylinder_faces = 24;
96 static const CupMeasurements
98 static constexpr
double lidar_height = 0.032;
99 static const CGAL::Simple_cartesian<double>::Vector_3
100 lidar_to_robot_arm_translation;
A class for mapping the ROS::Object defined in msg/Object.msg.
Definition: Object.hpp:22
CGAL::Simple_cartesian< double >::Point_3 Point
Data type specifying a point in 3D space.
Definition: Object.hpp:27
Collection of detected cups Collection of detected cups where the location of the cups is described i...
Definition: ICupDetector.hpp:17
An abstract class responsible for reading and interpreting the data from a device interpreting the wo...
Definition: ISensorInterpreter.hpp:18
std::vector< Object > get_objects(const HLR::Vision::CupDetection &detected_cups, const pcl::PointCloud< pcl::PointXYZ > &point_cloud) override
Construct the objects in the given CupDetection.
A class responsible for reading and interpreting the LiDAR data.
Definition: LidarInterpreter.hpp:24