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++) {
100 p =
static_cast<double>(index) / (
totalPixels - 1);
107 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
116 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
124 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
133 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
141 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
149 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
156 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
164 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);
179 intrinsic.
put(
"physFocalLength", 0.5);
180 intrinsic.
put(
"focalLengthX", 512);
181 intrinsic.
put(
"focalLengthY", 512);
182 intrinsic.
put(
"principalPointX", 235);
183 intrinsic.
put(
"principalPointY", 231);
184 intrinsic.
put(
"distortionModel",
"plumb_bob");
185 intrinsic.
put(
"k1", 0);
186 intrinsic.
put(
"k2", 0);
187 intrinsic.
put(
"t1", 0);
188 intrinsic.
put(
"t2", 0);
189 intrinsic.
put(
"k3", 0);
197 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);
217 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
218 intrinsic.
put(
"physFocalLength", 0.5);
219 intrinsic.
put(
"focalLengthX", 512);
220 intrinsic.
put(
"focalLengthY", 512);
221 intrinsic.
put(
"principalPointX", 235);
222 intrinsic.
put(
"principalPointY", 231);
223 intrinsic.
put(
"distortionModel",
"plumb_bob");
224 intrinsic.
put(
"k1", 0);
225 intrinsic.
put(
"k2", 0);
226 intrinsic.
put(
"t1", 0);
227 intrinsic.
put(
"t2", 0);
228 intrinsic.
put(
"k3", 0);
236 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
243 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
251 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
259 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
266 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
273 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
286 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
296 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
306 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
315 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
322 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
323 msg = std::string(
"no error");
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
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.
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.
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.
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 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.
Struct describing a possible camera configuration.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
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...
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.
#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[]