YARP
Yet Another Robot Platform
laserFromPointCloud.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-License-Identifier: LGPL-2.1-or-later
4  */
5 
6 #ifndef LASER_FROM_POINTCLOUDS_H
7 #define LASER_FROM_POINTCLOUDS_H
8 
10 #include <yarp/os/Semaphore.h>
13 #include <yarp/dev/PolyDriver.h>
14 #include <yarp/sig/Vector.h>
16 #include <yarp/sig/PointCloud.h>
18 #include <yarp/sig/Vector.h>
19 #include <yarp/dev/IRGBDSensor.h>
22 
23 #include <mutex>
24 #include <string>
25 #include <vector>
26 
27 using namespace yarp::os;
28 using namespace yarp::dev;
29 
30 typedef unsigned char byte;
31 
32 //---------------------------------------------------------------------------------------------------------------
39 {
40 protected:
42  IRGBDSensor* m_iRGBD = nullptr;
43 
45  IFrameTransform* m_iTc = nullptr;
46 
47  size_t m_depth_width = 0;
48  size_t m_depth_height = 0;
52 
53  //point cloud
54  size_t m_pc_stepx = 0;
55  size_t m_pc_stepy = 0;
57 
58  //frames and point cloud clipping planes
60  std::string m_ground_frame_id;
61  std::string m_camera_frame_id;
66 
67 public:
68  LaserFromPointCloud(double period = 0.01) : PeriodicThread(period),
70  {}
71 
73  {
74  }
75 
76  bool open(yarp::os::Searchable& config) override;
77  bool close() override;
78  bool threadInit() override;
79  void threadRelease() override;
80  void run() override;
81 
82 public:
83  //IRangefinder2D interface
84  bool setDistanceRange (double min, double max) override;
85  bool setScanLimits (double min, double max) override;
86  bool setHorizontalResolution (double step) override;
87  bool setScanRate (double rate) override;
88 
89 public:
90  //Lidar2DDeviceBase
91  bool acquireDataFromHW() override final;
92 };
93 
94 #endif
define control board standard interfaces
contains the definition of a Vector type
laserFromPointCloud: Documentation to be added
yarp::sig::IntrinsicParams m_intrinsics
yarp::sig::utils::PCL_ROI m_pc_roi
yarp::sig::Matrix m_transform_mtrx
yarp::sig::ImageOf< float > m_depth_image
yarp::os::Property m_propIntrinsics
LaserFromPointCloud(double period=0.01)
Interface implemented by all device drivers.
Definition: DeviceDriver.h:35
Transform Interface.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
Definition: IRGBDSensor.h:40
The Lidar2DDeviceBase class.
A container for a device driver.
Definition: PolyDriver.h:24
An abstraction for a periodic thread.
A class for storing options and configuration information.
Definition: Property.h:34
A base class for nested structures that can be searched.
Definition: Searchable.h:66
A class for a Matrix.
Definition: Matrix.h:43
unsigned char byte
An interface for the device drivers.
An interface to the operating system, including Port based communication.
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).