YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeDepthCameraDriver_mini.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_FAKEDEPTHCAMERADRIVER_MINI_H
7#define YARP_FAKEDEPTHCAMERADRIVER_MINI_H
8
9#include <string>
10#include <mutex>
11
13#include <yarp/dev/PolyDriver.h>
14
15#include <yarp/sig/all.h>
16#include <yarp/sig/Matrix.h>
17#include <yarp/os/Stamp.h>
18
22
24
38{
39protected:
44
45public:
48
49 // DeviceDriver
50 bool open(yarp::os::Searchable& config) override;
51 bool close() override;
52
53 // IRGBDSensor
54 int getRgbHeight() override;
55 int getRgbWidth() override;
56 yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector<yarp::dev::CameraConfig>& configurations) override;
57 yarp::dev::ReturnValue getRgbResolution(int& width, int& height) override;
58 yarp::dev::ReturnValue setRgbResolution(int width, int height) override;
59 yarp::dev::ReturnValue getRgbFOV(double& horizontalFov, double& verticalFov) override;
60 yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov) override;
61 yarp::dev::ReturnValue getRgbMirroring(bool& mirror) override;
62 yarp::dev::ReturnValue setRgbMirroring(bool mirror) override;
63
65 int getDepthHeight() override;
66 int getDepthWidth() override;
67 yarp::dev::ReturnValue getDepthResolution(int& width, int& height) override;
68 yarp::dev::ReturnValue setDepthResolution(int width, int height) override;
69 yarp::dev::ReturnValue getDepthFOV(double& horizontalFov, double& verticalFov) override;
70 yarp::dev::ReturnValue setDepthFOV(double horizontalFov, double verticalFov) override;
74 yarp::dev::ReturnValue getDepthClipPlanes(double& nearPlane, double& farPlane) override;
75 yarp::dev::ReturnValue setDepthClipPlanes(double nearPlane, double farPlane) override;
76 yarp::dev::ReturnValue getDepthMirroring(bool& mirror) override;
77 yarp::dev::ReturnValue setDepthMirroring(bool mirror) override;
78
80 yarp::dev::ReturnValue getRgbImage(FlexImage& rgbImage, Stamp* timeStamp = nullptr) override;
81 yarp::dev::ReturnValue getDepthImage(depthImage& depthImage, Stamp* timeStamp = nullptr) override;
82 yarp::dev::ReturnValue getImages(FlexImage& colorFrame, depthImage& depthFrame, Stamp* colorStamp = nullptr, Stamp* depthStamp = nullptr) override;
83
85 yarp::dev::ReturnValue getLastErrorMsg(std::string& mesg, Stamp* timeStamp = nullptr) override;
86
87protected:
90 bool m_depth_mirror = false;
91 bool m_rgb_mirror = false;
94 std::recursive_mutex m_mutex;
95
96};
97
98#endif // YARP_FAKEDEPTHCAMERADRIVER_MINI_H
contains the definition of a Matrix type
This class is the parameters parser for class FakeDepthCameraDriver.
fakeDepthCamera_mini: Documentation to be added
yarp::dev::ReturnValue setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
yarp::dev::ReturnValue getDepthIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
int getDepthWidth() override
Return the height of each frame.
yarp::dev::ReturnValue getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
yarp::dev::ReturnValue getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
yarp::dev::ReturnValue setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
yarp::dev::ReturnValue getLastErrorMsg(std::string &mesg, Stamp *timeStamp=nullptr) override
Return an error message in case of error.
yarp::dev::ReturnValue getRgbIntrinsicParam(Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
yarp::dev::ReturnValue setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
int getRgbWidth() override
Return the width of each frame.
int getDepthHeight() override
Return the height of each frame.
yarp::dev::ReturnValue getImages(FlexImage &colorFrame, depthImage &depthFrame, Stamp *colorStamp=nullptr, Stamp *depthStamp=nullptr) override
yarp::dev::ReturnValue getDepthAccuracy(double &accuracy) override
Get the minimum detectable variation in distance [meter].
yarp::dev::ReturnValue getDepthResolution(int &width, int &height) override
Get the resolution of the depth image from the camera.
yarp::dev::ReturnValue getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
int getRgbHeight() override
Return the height of each frame.
yarp::dev::ReturnValue setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
yarp::sig::ImageOf< yarp::sig::PixelFloat > depthImage
~FakeDepthCameraDriver_mini() override
yarp::dev::ReturnValue setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
yarp::dev::ReturnValue getDepthImage(depthImage &depthImage, Stamp *timeStamp=nullptr) override
yarp::dev::ReturnValue setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
yarp::dev::ReturnValue getSensorStatus(RGBDSensor_status &status) override
yarp::dev::ReturnValue getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
yarp::dev::ReturnValue getRgbImage(FlexImage &rgbImage, Stamp *timeStamp=nullptr) override
Get the rgb frame from the device.
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
yarp::dev::ReturnValue setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
Interface implemented by all device drivers.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
Definition IRGBDSensor.h:39
A class for storing options and configuration information.
Definition Property.h:33
A base class for nested structures that can be searched.
Definition Searchable.h:31
An abstraction for a time stamp and/or sequence number.
Definition Stamp.h:21
Image class with user control of representation details.
Definition Image.h:361
Typed image class.
Definition Image.h:603
A class for a Matrix.
Definition Matrix.h:39
constexpr char accuracy[]