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>
17
18#include <mutex>
19#include <string>
20#include <vector>
21
22using namespace yarp::os;
23using namespace yarp::dev;
24
25typedef unsigned char byte;
26
27//---------------------------------------------------------------------------------------------------------------
34{
35protected:
37 IRGBDSensor* iRGBD = nullptr;
38
39 size_t m_depth_width = 0;
40 size_t m_depth_height = 0;
42
43public:
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
58public:
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
65public:
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
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
void run() override
Loop function.
size_t m_depth_height
IRGBDSensor * iRGBD
bool acquireDataFromHW() override final
This method should be implemented by the user, and contain the logic to grab data from the hardware.
LaserFromDepth(double period=0.01)
size_t m_depth_width
bool close() override
Close the DeviceDriver.
bool setScanLimits(double min, double max) override
set the scan angular range.
bool setScanRate(double rate) override
set the scan rate (scans per seconds)
void threadRelease() override
Release method.
bool threadInit() override
Initialization method.
bool setDistanceRange(double min, double max) override
set the device detection range.
bool setHorizontalResolution(double step) override
get the angular step between two measurements (if available)
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.
void step()
Call this to "step" the thread rather than starting it.
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.