YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeDepthCameraDriver Class Reference

fakeDepthCamera: Documentation to be added More...

#include <fake/fakeDepthCamera/FakeDepthCameraDriver.h>

+ Inheritance diagram for FakeDepthCameraDriver:

Public Member Functions

 FakeDepthCameraDriver ()
 
 ~FakeDepthCameraDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
yarp::dev::ReturnValue getCameraDescription (yarp::dev::CameraDescriptor &camera) override
 Get a basic description of the camera hw.
 
yarp::dev::ReturnValue hasFeature (yarp::dev::cameraFeature_id_t feature, bool &hasFeature) override
 Check if camera has the requested feature (saturation, brightness ... )
 
yarp::dev::ReturnValue setFeature (yarp::dev::cameraFeature_id_t feature, double value) override
 Set the requested feature to a value (saturation, brightness ... )
 
yarp::dev::ReturnValue getFeature (yarp::dev::cameraFeature_id_t feature, double &value) override
 Get the current value for the requested feature.
 
yarp::dev::ReturnValue setFeature (yarp::dev::cameraFeature_id_t feature, double value1, double value2) override
 Set the requested feature to a value using 2 params (like white balance)
 
yarp::dev::ReturnValue getFeature (yarp::dev::cameraFeature_id_t feature, double &value1, double &value2) override
 Get the current value for the requested feature.
 
yarp::dev::ReturnValue hasOnOff (yarp::dev::cameraFeature_id_t feature, bool &HasOnOff) override
 Check if the camera has the ability to turn on/off the requested feature.
 
yarp::dev::ReturnValue setActive (yarp::dev::cameraFeature_id_t feature, bool onoff) override
 Set the requested feature on or off.
 
yarp::dev::ReturnValue getActive (yarp::dev::cameraFeature_id_t feature, bool &isActive) override
 Get the current status of the feature, on or off.
 
yarp::dev::ReturnValue hasAuto (yarp::dev::cameraFeature_id_t feature, bool &hasAuto) override
 Check if the requested feature has the 'auto' mode.
 
yarp::dev::ReturnValue hasManual (yarp::dev::cameraFeature_id_t feature, bool &hasManual) override
 Check if the requested feature has the 'manual' mode.
 
yarp::dev::ReturnValue hasOnePush (yarp::dev::cameraFeature_id_t feature, bool &hasOnePush) override
 Check if the requested feature has the 'onePush' mode.
 
yarp::dev::ReturnValue setMode (yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode mode) override
 Set the requested mode for the feature.
 
yarp::dev::ReturnValue getMode (yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode &mode) override
 Get the current mode for the feature.
 
yarp::dev::ReturnValue setOnePush (yarp::dev::cameraFeature_id_t feature) override
 Set the requested feature to a value (saturation, brightness ... )
 
- Public Member Functions inherited from FakeDepthCameraDriver_mini
 FakeDepthCameraDriver_mini ()
 
 ~FakeDepthCameraDriver_mini () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
int getRgbHeight () override
 Return the height of each frame.
 
int getRgbWidth () override
 Return the width of each frame.
 
yarp::dev::ReturnValue getRgbSupportedConfigurations (std::vector< yarp::dev::CameraConfig > &configurations) override
 Get the possible configurations of the camera.
 
yarp::dev::ReturnValue getRgbResolution (int &width, int &height) override
 Get the resolution of the rgb image from the camera.
 
yarp::dev::ReturnValue setRgbResolution (int width, int height) override
 Set the resolution of the rgb image from the camera.
 
yarp::dev::ReturnValue getRgbFOV (double &horizontalFov, double &verticalFov) override
 Get the field of view (FOV) of the rgb camera.
 
yarp::dev::ReturnValue setRgbFOV (double horizontalFov, double verticalFov) override
 Set the field of view (FOV) of the rgb camera.
 
yarp::dev::ReturnValue getRgbMirroring (bool &mirror) override
 Get the mirroring setting of the sensor.
 
yarp::dev::ReturnValue setRgbMirroring (bool mirror) override
 Set the mirroring setting of the sensor.
 
yarp::dev::ReturnValue getRgbIntrinsicParam (Property &intrinsic) override
 Get the intrinsic parameters of the rgb camera.
 
int getDepthHeight () override
 Return the height of each frame.
 
int getDepthWidth () override
 Return the height of each frame.
 
yarp::dev::ReturnValue getDepthResolution (int &width, int &height) override
 Get the resolution of the depth image from the camera.
 
yarp::dev::ReturnValue setDepthResolution (int width, int height) override
 Set the resolution of the depth image from the camera.
 
yarp::dev::ReturnValue getDepthFOV (double &horizontalFov, double &verticalFov) override
 Get the field of view (FOV) of the depth camera.
 
yarp::dev::ReturnValue setDepthFOV (double horizontalFov, double verticalFov) override
 Set the field of view (FOV) of the depth camera.
 
yarp::dev::ReturnValue getDepthIntrinsicParam (Property &intrinsic) override
 Get the intrinsic parameters of the depth camera.
 
yarp::dev::ReturnValue getDepthAccuracy (double &accuracy) override
 Get the minimum detectable variation in distance [meter].
 
yarp::dev::ReturnValue setDepthAccuracy (double accuracy) override
 Set the minimum detectable variation in distance [meter] when possible.
 
yarp::dev::ReturnValue getDepthClipPlanes (double &nearPlane, double &farPlane) override
 Get the clipping planes of the sensor.
 
yarp::dev::ReturnValue setDepthClipPlanes (double nearPlane, double farPlane) override
 Set the clipping planes of the sensor.
 
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 getExtrinsicParam (yarp::sig::Matrix &extrinsic) override
 Get the extrinsic parameters from the device.
 
yarp::dev::ReturnValue getRgbImage (FlexImage &rgbImage, Stamp *timeStamp=nullptr) override
 Get the rgb frame from the device.
 
yarp::dev::ReturnValue getDepthImage (depthImage &depthImage, Stamp *timeStamp=nullptr) override
 
yarp::dev::ReturnValue getImages (FlexImage &colorFrame, depthImage &depthFrame, Stamp *colorStamp=nullptr, Stamp *depthStamp=nullptr) override
 
yarp::dev::ReturnValue getSensorStatus (RGBDSensor_status &status) override
 
yarp::dev::ReturnValue getLastErrorMsg (std::string &mesg, Stamp *timeStamp=nullptr) override
 Return an error message in case of error.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IRGBDSensor
virtual ~IRGBDSensor ()
 
virtual yarp::dev::ReturnValue getDepthImage (yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr)=0
 Get the depth frame from the device.
 
virtual yarp::dev::ReturnValue getImages (yarp::sig::FlexImage &colorFrame, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthFrame, yarp::os::Stamp *colorStamp=nullptr, yarp::os::Stamp *depthStamp=nullptr)=0
 Get the both the color and depth frame in a single call.
 
virtual yarp::dev::ReturnValue getSensorStatus (RGBDSensor_status &status)=0
 Get the current status of the sensor, using enum type.
 
- Public Member Functions inherited from yarp::dev::IRgbVisualParams
virtual ~IRgbVisualParams ()
 
- Public Member Functions inherited from yarp::dev::IDepthVisualParams
virtual ~IDepthVisualParams ()
 
- Public Member Functions inherited from FakeDepthCameraDriver_ParamsParser
 FakeDepthCameraDriver_ParamsParser ()
 
 ~FakeDepthCameraDriver_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
bool getParamValue (const std::string &paramName, std::string &paramValue) const override
 Return the value (represented as a string) of the requested parameter.
 
std::string getConfiguration () const override
 Return the configuration of the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 
- Public Member Functions inherited from yarp::dev::IFrameGrabberControls
virtual ~IFrameGrabberControls ()
 Destructor.
 
std::string busType2String (BusType type)
 
FeatureMode toFeatureMode (bool _auto)
 

Additional Inherited Members

- Public Types inherited from yarp::dev::IRGBDSensor
enum  RGBDSensor_status {
  RGBD_SENSOR_NOT_READY = 0 ,
  RGBD_SENSOR_OK_STANDBY = 1 ,
  RGBD_SENSOR_OK_IN_USE = 2 ,
  RGB_SENSOR_ERROR = 3 ,
  DEPTH_SENSOR_ERROR = 4 ,
  RGBD_SENSOR_GENERIC_ERROR = 5 ,
  RGBD_SENSOR_TIMEOUT = 6
}
 
- Public Attributes inherited from FakeDepthCameraDriver_ParamsParser
const std::string m_device_classname = {"FakeDepthCameraDriver"}
 
const std::string m_device_name = {"fakeDepthCamera"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
std::string m_provided_configuration
 
const std::string m_rgb_h_defaultValue = {"480.0"}
 
const std::string m_rgb_w_defaultValue = {"640.0"}
 
const std::string m_dep_h_defaultValue = {"480.0"}
 
const std::string m_dep_w_defaultValue = {"640.0"}
 
const std::string m_accuracy_defaultValue = {"0.001"}
 
const std::string m_rgb_Vfov_defaultValue = {"50.0"}
 
const std::string m_rgb_Hfov_defaultValue = {"36.0"}
 
const std::string m_dep_Vfov_defaultValue = {"50.0"}
 
const std::string m_dep_Hfov_defaultValue = {"36.0"}
 
const std::string m_dep_near_defaultValue = {"0.2"}
 
const std::string m_dep_far_defaultValue = {"6.0"}
 
double m_rgb_h = {480.0}
 
double m_rgb_w = {640.0}
 
double m_dep_h = {480.0}
 
double m_dep_w = {640.0}
 
double m_accuracy = {0.001}
 
double m_rgb_Vfov = {50.0}
 
double m_rgb_Hfov = {36.0}
 
double m_dep_Vfov = {50.0}
 
double m_dep_Hfov = {36.0}
 
double m_dep_near = {0.2}
 
double m_dep_far = {6.0}
 
- Protected Types inherited from FakeDepthCameraDriver_mini
typedef yarp::sig::ImageOf< yarp::sig::PixelFloatdepthImage
 
typedef yarp::os::Stamp Stamp
 
typedef yarp::os::Property Property
 
typedef yarp::sig::FlexImage FlexImage
 
- Protected Member Functions inherited from FakeDepthCameraDriver_mini
void regenerate_rgb_image ()
 
void regenerate_depth_image ()
 
- Protected Attributes inherited from FakeDepthCameraDriver_mini
FlexImage m_rgbImage
 
depthImage m_depthImage
 
bool m_depth_mirror = false
 
bool m_rgb_mirror = false
 
std::recursive_mutex m_mutex
 

Detailed Description

fakeDepthCamera: Documentation to be added

Parameters required by this device are shown in class: FakeDepthCameraDriver_ParamsParser

Definition at line 21 of file FakeDepthCameraDriver.h.

Constructor & Destructor Documentation

◆ FakeDepthCameraDriver()

FakeDepthCameraDriver::FakeDepthCameraDriver ( )

Definition at line 24 of file FakeDepthCameraDriver.cpp.

◆ ~FakeDepthCameraDriver()

FakeDepthCameraDriver::~FakeDepthCameraDriver ( )
overridedefault

Member Function Documentation

◆ close()

bool FakeDepthCameraDriver::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 40 of file FakeDepthCameraDriver.cpp.

◆ getActive()

ReturnValue FakeDepthCameraDriver::getActive ( yarp::dev::cameraFeature_id_t  feature,
bool isActive 
)
overridevirtual

Get the current status of the feature, on or off.

Parameters
featurethe identifier of the feature to check
isActiveflag true if the feature is active, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 95 of file FakeDepthCameraDriver.cpp.

◆ getCameraDescription()

ReturnValue FakeDepthCameraDriver::getCameraDescription ( yarp::dev::CameraDescriptor camera)
overridevirtual

Get a basic description of the camera hw.

This is mainly used to determine the HW bus type in order to choose the corresponding interface for advanced controls.

Parameters
devicereturns an identifier for the bus
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 46 of file FakeDepthCameraDriver.cpp.

◆ getFeature() [1/2]

ReturnValue FakeDepthCameraDriver::getFeature ( yarp::dev::cameraFeature_id_t  feature,
double value 
)
overridevirtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feature to read
valuepointer to current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 65 of file FakeDepthCameraDriver.cpp.

◆ getFeature() [2/2]

ReturnValue FakeDepthCameraDriver::getFeature ( yarp::dev::cameraFeature_id_t  feature,
double value1,
double value2 
)
overridevirtual

Get the current value for the requested feature.

Parameters
featurethe identifier of the feature to read
value1returns the current value of the feature, from 0 to 1 expressed as a percentage
value2returns the current value of the feature, from 0 to 1 expressed as a percentage
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 77 of file FakeDepthCameraDriver.cpp.

◆ getMode()

ReturnValue FakeDepthCameraDriver::getMode ( yarp::dev::cameraFeature_id_t  feature,
yarp::dev::FeatureMode mode 
)
overridevirtual

Get the current mode for the feature.

Parameters
featurethe identifier of the feature to change
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 125 of file FakeDepthCameraDriver.cpp.

◆ hasAuto()

ReturnValue FakeDepthCameraDriver::hasAuto ( yarp::dev::cameraFeature_id_t  feature,
bool hasAuto 
)
overridevirtual

Check if the requested feature has the 'auto' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'auto' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 101 of file FakeDepthCameraDriver.cpp.

◆ hasFeature()

ReturnValue FakeDepthCameraDriver::hasFeature ( yarp::dev::cameraFeature_id_t  ,
bool hasFeature 
)
overridevirtual

Check if camera has the requested feature (saturation, brightness ... )

Parameters
featurethe identifier of the feature to check
hasFeatureflag value: true if the feature is present, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 53 of file FakeDepthCameraDriver.cpp.

◆ hasManual()

ReturnValue FakeDepthCameraDriver::hasManual ( yarp::dev::cameraFeature_id_t  feature,
bool hasManual 
)
overridevirtual

Check if the requested feature has the 'manual' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'manual' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 107 of file FakeDepthCameraDriver.cpp.

◆ hasOnePush()

ReturnValue FakeDepthCameraDriver::hasOnePush ( yarp::dev::cameraFeature_id_t  feature,
bool hasOnePush 
)
overridevirtual

Check if the requested feature has the 'onePush' mode.

Parameters
featurethe identifier of the feature to check
hasAutoflag true if the feature is has 'onePush' mode, false otherwise
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 113 of file FakeDepthCameraDriver.cpp.

◆ hasOnOff()

ReturnValue FakeDepthCameraDriver::hasOnOff ( yarp::dev::cameraFeature_id_t  feature,
bool HasOnOff 
)
overridevirtual

Check if the camera has the ability to turn on/off the requested feature.

Parameters
featurethe identifier of the feature to change
hasOnOffflag true if this feature can be turned on/off, false otherwise.
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 83 of file FakeDepthCameraDriver.cpp.

◆ open()

bool FakeDepthCameraDriver::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 30 of file FakeDepthCameraDriver.cpp.

◆ setActive()

ReturnValue FakeDepthCameraDriver::setActive ( yarp::dev::cameraFeature_id_t  feature,
bool  onoff 
)
overridevirtual

Set the requested feature on or off.

Parameters
featurethe identifier of the feature to change
onofftrue to activate, off to deactivate the feature
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 89 of file FakeDepthCameraDriver.cpp.

◆ setFeature() [1/2]

ReturnValue FakeDepthCameraDriver::setFeature ( yarp::dev::cameraFeature_id_t  feature,
double  value 
)
overridevirtual

Set the requested feature to a value (saturation, brightness ... )

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, range from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 59 of file FakeDepthCameraDriver.cpp.

◆ setFeature() [2/2]

ReturnValue FakeDepthCameraDriver::setFeature ( yarp::dev::cameraFeature_id_t  feature,
double  value1,
double  value2 
)
overridevirtual

Set the requested feature to a value using 2 params (like white balance)

Parameters
featurethe identifier of the feature to change
value1first param, from 0 to 1 expressed as a percentage
value2second param, from 0 to 1 expressed as a percentage
Returns
returns true if success, false otherwise (e.g. the interface is not implemented)

Implements yarp::dev::IFrameGrabberControls.

Definition at line 71 of file FakeDepthCameraDriver.cpp.

◆ setMode()

ReturnValue FakeDepthCameraDriver::setMode ( yarp::dev::cameraFeature_id_t  feature,
yarp::dev::FeatureMode  mode 
)
overridevirtual

Set the requested mode for the feature.

Parameters
featurethe identifier of the feature to change
auto_onofftrue to activate 'auto' mode, false to activate 'manual' mode
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 119 of file FakeDepthCameraDriver.cpp.

◆ setOnePush()

ReturnValue FakeDepthCameraDriver::setOnePush ( yarp::dev::cameraFeature_id_t  feature)
overridevirtual

Set the requested feature to a value (saturation, brightness ... )

Parameters
featurethe identifier of the feature to change
valuenew value of the feature, from 0 to 1 as a percentage of param range
Returns
returns true on success, false on failure.

Implements yarp::dev::IFrameGrabberControls.

Definition at line 131 of file FakeDepthCameraDriver.cpp.


The documentation for this class was generated from the following files: