43 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
49 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
55 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
61 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
63 configurations.push_back(
cfg);
69 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
77 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
82 for (
size_t y = 0; y <
m_rgb_h; y++)
83 for (
size_t x = 0; x <
m_rgb_w; x++)
93 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
97 for (
size_t y = 0; y <
m_dep_h; y++)
98 for (
size_t x = 0; x <
m_dep_w; x++) {
106 p =
static_cast<double>(index) / (
totalPixels - 1);
114 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
123 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
131 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
140 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
148 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
156 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
163 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
171 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
178 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
185 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
203 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
209 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
215 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
223 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
225 const double deg2rad = 3.1415926535/180.0;
245 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
252 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
260 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
268 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
275 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
282 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
295 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
305 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
315 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
324 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
331 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
332 msg = std::string(
"no error");
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
double m_test_distance_constant
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.
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.
void regenerate_depth_image()
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.
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 getDepthIntrinsicParam(yarp::sig::IntrinsicParams &intrinsic) override
Get the intrinsic parameters of the depth camera.
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.
void regenerate_rgb_image()
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].
FakeDepthCameraDriver_mini()
yarp::dev::ReturnValue getDepthResolution(int &width, int &height) override
Get the resolution of the depth image from the camera.
yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::sig::IntrinsicParams &intrinsic) override
Get the intrinsic parameters of the rgb camera.
yarp::dev::ReturnValue getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
std::recursive_mutex m_mutex
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.
~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.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.
void update()
Set the timestamp to the current time, and increment the sequence number (wrapping to 0 if the sequen...
CameraDistortionType type
Image class with user control of representation details.
void setQuantum(size_t imgQuantum)
void setPixelCode(int imgPixelCode)
T & pixel(size_t x, size_t y)
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
yarp::sig::DistortionModelData distortionModel
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.
constexpr char accuracy[]
The IntrinsicParams struct to handle the intrinsic parameter of cameras(RGB and RGBD either).