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);
186 intrinsic.
put(
"physFocalLength", 0.5);
189 intrinsic.
put(
"principalPointX", (
m_dep_w-1)/2);
190 intrinsic.
put(
"principalPointY", (
m_dep_h-1)/2);
191 intrinsic.
put(
"distortionModel",
"plumb_bob");
192 intrinsic.
put(
"k1", 0);
193 intrinsic.
put(
"k2", 0);
194 intrinsic.
put(
"t1", 0);
195 intrinsic.
put(
"t2", 0);
196 intrinsic.
put(
"k3", 0);
204 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
210 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
216 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
224 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
225 intrinsic.
put(
"physFocalLength", 0.5);
226 const double deg2rad = 3.1415926535/180.0;
231 intrinsic.
put(
"principalPointX", (
m_dep_w-1)/2);
232 intrinsic.
put(
"principalPointY", (
m_dep_h-1)/2);
233 intrinsic.
put(
"distortionModel",
"plumb_bob");
234 intrinsic.
put(
"k1", 0);
235 intrinsic.
put(
"k2", 0);
236 intrinsic.
put(
"t1", 0);
237 intrinsic.
put(
"t2", 0);
238 intrinsic.
put(
"k3", 0);
246 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
253 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
261 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
269 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
276 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
283 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);
316 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
325 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
332 std::lock_guard <std::recursive_mutex>
lg(
m_mutex);
333 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.
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[]