YARP
Yet Another Robot Platform
laserFromDepth.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_DEPTH_H
7 #define LASER_FROM_DEPTH_H
8 
10 #include <yarp/os/Semaphore.h>
13 #include <yarp/dev/PolyDriver.h>
14 #include <yarp/sig/Vector.h>
15 #include <yarp/dev/IRGBDSensor.h>
17 
18 #include <mutex>
19 #include <string>
20 #include <vector>
21 
22 using namespace yarp::os;
23 using namespace yarp::dev;
24 
25 typedef unsigned char byte;
26 
27 //---------------------------------------------------------------------------------------------------------------
34 {
35 protected:
37  IRGBDSensor* iRGBD = nullptr;
38 
39  size_t m_depth_width = 0;
40  size_t m_depth_height = 0;
42 
43 public:
44  LaserFromDepth(double period = 0.01) : PeriodicThread(period),
46  {}
47 
49  {
50  }
51 
52  bool open(yarp::os::Searchable& config) override;
53  bool close() override;
54  bool threadInit() override;
55  void threadRelease() override;
56  void run() override;
57 
58 public:
59  //IRangefinder2D interface
60  bool setDistanceRange (double min, double max) override;
61  bool setScanLimits (double min, double max) override;
62  bool setHorizontalResolution (double step) override;
63  bool setScanRate (double rate) override;
64 
65 public:
66  //Lidar2DDeviceBase
67  bool acquireDataFromHW() override final;
68 };
69 
70 #endif
define control board standard interfaces
contains the definition of a Vector type
laserFromDepth: Documentation to be added
PolyDriver driver
LaserFromDepth(double period=0.01)
yarp::sig::ImageOf< float > m_depth_image
Interface implemented by all device drivers.
Definition: DeviceDriver.h:30
A generic interface for cameras that have both color camera as well as depth camera sensor,...
Definition: IRGBDSensor.h:39
The Lidar2DDeviceBase class.
A container for a device driver.
Definition: PolyDriver.h:23
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
Definition: Searchable.h:63
unsigned char byte
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.