YARP
Yet Another Robot Platform
RGBDSensorClient.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #include "RGBDSensorClient.h"
11 #include <yarp/os/Portable.h>
12 #include <yarp/os/LogComponent.h>
13 #include <yarp/os/LogStream.h>
14 #include <yarp/dev/GenericVocabs.h>
15 
16 using namespace yarp::os;
17 using namespace yarp::sig;
18 using namespace yarp::dev;
19 
20 #define RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR 1
21 #define RGBD_INTERFACE_PROTOCOL_VERSION_MINOR 0
22 
23 YARP_LOG_COMPONENT(RGBDSENSORCLIENT, "yarp.devices.RGBDSensorClient")
24 
25 
28  RgbMsgSender(new Implement_RgbVisualParams_Sender(rpcPort)),
29  DepthMsgSender(new Implement_DepthVisualParams_Sender(rpcPort)),
30  streamingReader(new RGBDSensor_StreamingMsgParser)
31 {
32 }
33 
35 {
36  close();
37  delete RgbMsgSender;
38  delete DepthMsgSender;
39  delete streamingReader;
40 }
41 
43 {
44  if(verbose >= 5) {
45  yCTrace(RGBDSENSORCLIENT) << "\n Paramerters are: \n" << config.toString();
46  }
47 
48  if(!fromConfig(config))
49  {
50  yCError(RGBDSENSORCLIENT) << "Failed to open, check previous log for error messages.";
51  return false;
52  }
53 
54  sensorId= "RGBDSensorClient for " + local_depthFrame_StreamingPort_name;
55 
56  if(!initialize_YARP(config) )
57  {
58  yCError(RGBDSENSORCLIENT) << sensorId << "\n\t* Error initializing YARP ports *";
59  return false;
60  }
61 
62  return true;
63 }
64 
65 
67 {
68  // Parse LOCAL port names
69  // TBD: check if user types '...' as port name, how to create RPC port names
70  if (!config.check("localImagePort", "full name of the port for streaming color image"))
71  {
72  yCError(RGBDSENSORCLIENT) << "Missing 'localImagePort' parameter. Check you configuration file; it must be like:";
73  yCError(RGBDSENSORCLIENT) << " localImagePort: Full name of the local port to open, e.g. /myApp/image_camera";
74  return false;
75  }
76 
77  local_colorFrame_StreamingPort_name = config.find("localImagePort").asString();
78 
79  if (!config.check("localDepthPort", "full name of the port for streaming depth image"))
80  {
81  yCError(RGBDSENSORCLIENT) << "Missing 'localDepthPort' parameter. Check you configuration file; it must be like:";
82  yCError(RGBDSENSORCLIENT) << " localDepthPort: Full name of the local port to open, e.g. /myApp/depth_camera";
83  return false;
84  }
85 
86  local_depthFrame_StreamingPort_name = config.find("localDepthPort").asString();
87 
88  // Parse REMOTE port names
89  if (!config.check("remoteImagePort", "full name of the port for streaming color image"))
90  {
91  yCError(RGBDSENSORCLIENT) << "Missing 'remoteImagePort' parameter. Check you configuration file; it must be like:";
92  yCError(RGBDSENSORCLIENT) << " remoteImagePort: Full name of the port to read color images from, e.g. /robotName/image_camera";
93  return false;
94  }
95 
96  remote_colorFrame_StreamingPort_name = config.find("remoteImagePort").asString();
97 
98  if (!config.check("remoteDepthPort", "full name of the port for streaming depth image"))
99  {
100  yCError(RGBDSENSORCLIENT) << "Missing 'remoteDepthPort' parameter. Check you configuration file; it must be like:";
101  yCError(RGBDSENSORCLIENT) << " remoteDepthPort: Full name of the port to read depth images from, e.g. /robotName/depth_camera ";
102  return false;
103  }
104 
105  remote_depthFrame_StreamingPort_name = config.find("remoteDepthPort").asString();
106 
107  // Single RPC port
108  if (!config.check("localRpcPort", "full name of the port for streaming depth image"))
109  {
110  yCError(RGBDSENSORCLIENT) << "Missing 'localRpcPort' parameter. Check you configuration file; it must be like:";
111  yCError(RGBDSENSORCLIENT) << " localRpcPort: Full name of the local RPC port to open, e.g. /myApp/RGBD/rpc";
112  return false;
113  }
114 
115  local_rpcPort_name = config.find("localRpcPort").asString();
116 
117  if (!config.check("remoteRpcPort", "full name of the port for streaming depth image"))
118  {
119  yCError(RGBDSENSORCLIENT) << "Missing 'remoteRpcPort' parameter. Check you configuration file; it must be like:";
120  yCError(RGBDSENSORCLIENT) << " remoteRpcPort: Full name of the remote RPC port, e.g. /robotName/RGBD/rpc";
121  return false;
122  }
123 
124  remote_rpcPort_name = config.find("remoteRpcPort").asString();
125 
126  image_carrier_type = "udp";
127  depth_carrier_type = "udp";
128 
129  if (config.check("ImageCarrier", "carrier for the image stream"))
130  {
131  image_carrier_type = config.find("ImageCarrier").asString();
132  }
133 
134  if (config.check("DepthCarrier", "carrier for the depth tream"))
135  {
136  depth_carrier_type = config.find("DepthCarrier").asString();
137  }
138 
139  /*
140  * When using multiple RPC ports
141  *
142  local_colorFrame_rpcPort_Name = local_colorFrame_StreamingPort_Name + "/rpc:i";
143  remote_colorFrame_rpcPort_Name = remote_colorFrame_StreamingPort_Name + "/rpc:i";
144  local_depthFrame_rpcPort_Name = local_depthFrame_StreamingPort_Name + "/rpc:i";
145  remote_depthFrame_rpcPort_Name = remote_depthFrame_StreamingPort_Name + "/rpc:i";
146 
147  */
148 
149  return true;
150 }
151 
153 {
154  bool ret;
155 
156  // Opening Streaming ports
157  ret = colorFrame_StreamingPort.open(local_colorFrame_StreamingPort_name);
158  ret &= depthFrame_StreamingPort.open(local_depthFrame_StreamingPort_name);
159 
160  if(!ret)
161  {
162  yCError(RGBDSENSORCLIENT) << sensorId << " cannot open local streaming ports.";
163  colorFrame_StreamingPort.close();
164  depthFrame_StreamingPort.close();
165  }
166 
167  if(! yarp::os::Network::connect(remote_colorFrame_StreamingPort_name, colorFrame_StreamingPort.getName(), image_carrier_type) )
168  {
169  yCError(RGBDSENSORCLIENT) << colorFrame_StreamingPort.getName() << " cannot connect to remote port " << remote_colorFrame_StreamingPort_name << "with carrier " << image_carrier_type;
170  return false;
171  }
172 
173  if(! yarp::os::Network::connect(remote_depthFrame_StreamingPort_name, depthFrame_StreamingPort.getName(), depth_carrier_type) )
174  {
175  yCError(RGBDSENSORCLIENT) << depthFrame_StreamingPort.getName() << " cannot connect to remote port " << remote_depthFrame_StreamingPort_name << "with carrier " << depth_carrier_type;
176  return false;
177  }
178 
179 
180  // Single RPC port
181  ret = rpcPort.open(local_rpcPort_name);
182 
183  if(!ret)
184  {
185  yCError(RGBDSENSORCLIENT) << sensorId << " cannot open local RPC port " << local_rpcPort_name;
186  colorFrame_StreamingPort.close();
187  depthFrame_StreamingPort.close();
188  rpcPort.close();
189  }
190 
191  if(! rpcPort.addOutput(remote_rpcPort_name) )
192  {
193  yCError(RGBDSENSORCLIENT) << sensorId << " cannot connect to port " << remote_rpcPort_name;
194  colorFrame_StreamingPort.close();
195  depthFrame_StreamingPort.close();
196  rpcPort.close();
197  return false;
198  }
199 
200  // Check protocol version
201  yarp::os::Bottle cmd;
202  yarp::os::Bottle response;
204  cmd.addVocab(VOCAB_GET);
206  rpcPort.write(cmd, response);
207  int major = response.get(3).asInt32();
208  int minor = response.get(4).asInt32();
209 
211  {
212  yCError(RGBDSENSORCLIENT) << "Major protocol number does not match, please verify client and server are updated. \
213  Expected: " << RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR << " received: " << major;
214  return false;
215  }
216 
217 
219  {
220  yCWarning(RGBDSENSORCLIENT) << "Minor protocol number does not match, please verify client and server are updated.\
221  Expected: " << RGBD_INTERFACE_PROTOCOL_VERSION_MINOR << " received: " << minor;
222  }
223 
224  /*
225  * Multiple RPC ports
226  *
227  ret &= colorFrame_rpcPort.open(local_colorFrame_rpcPort_Name.c_str() );
228  ret &= depthFrame_rpcPort.open(local_depthFrame_rpcPort_Name.c_str() );
229 
230  if(!ret)
231  yCError(RGBDSENSORCLIENT) << "sensorId cannot open ports";
232 
233  // doing connections: How to correctly handle YARP_PORT_PREFIX for remote port names??
234  if(! colorFrame_rpcPort.addOutput(remote_colorFrame_rpcPort_Name.c_str()) ) // This will handle local port names only
235  {
236  yCError(RGBDSENSORCLIENT) << sensorId << " cannot add output " << remote_colorFrame_rpcPort_Name;
237  return false;
238  }
239 
240  if(! depthFrame_rpcPort.addOutput(remote_depthFrame_rpcPort_Name.c_str()) ) // This will handle local port names only
241  {
242  yCError(RGBDSENSORCLIENT) << sensorId << " cannot add output " << remote_depthFrame_rpcPort_Name;
243  return false;
244  }
245  */
246 
247 
248  streamingReader->attach(&colorFrame_StreamingPort, &depthFrame_StreamingPort);
249 
250  return true;
251 }
252 
254 {
255  colorFrame_StreamingPort.close();
256  depthFrame_StreamingPort.close();
257  rpcPort.close();
258  return true;
259 }
260 
261 /*
262  * IDepthVisualParams interface. Look at IVisualParams.h for documentation
263  *
264  * Implemented by Implement_DepthVisualParams_Sender
265  */
266 
267 /*
268  * IDepthVisualParams interface. Look at IVisualParams.h for documentation
269  *
270  * Implemented by Implement_DepthVisualParams_Sender
271  */
272 
273 
274 /*
275  * IRGBDSensor specific interface methods
276  */
277 
279 {
280  yarp::os::Bottle cmd;
281  yarp::os::Bottle response;
283  cmd.addVocab(VOCAB_GET);
285  rpcPort.write(cmd, response);
286 
287  // Minimal check on response, we suppose the response is always correctly formatted
288  if((response.get(0).asVocab()) == VOCAB_FAILED)
289  {
290  extrinsic.zero();
291  return false;
292  }
293 
294  return Property::copyPortable(response.get(3), extrinsic); // will it really work??
295 }
296 
297 
299 {
300  yarp::os::Bottle cmd;
301  yarp::os::Bottle response;
303  cmd.addVocab(VOCAB_GET);
304  cmd.addVocab(VOCAB_STATUS);
305  rpcPort.write(cmd, response);
306  return static_cast<IRGBDSensor::RGBDSensor_status>(response.get(3).asInt32());
307 }
308 
309 
311 {
312  yarp::os::Bottle cmd;
313  yarp::os::Bottle response;
315  cmd.addVocab(VOCAB_GET);
317  rpcPort.write(cmd, response);
318  return response.get(3).asString();
319 }
320 
322 {
323  return streamingReader->readRgb(rgbImage, timeStamp);
324 }
325 
327 {
328  return streamingReader->readDepth(depthImage, timeStamp);
329 }
330 
332 {
333  return streamingReader->read(rgbImage,
334  depthImage,
335  rgbStamp,
336  depthStamp);
337 }
338 
339 //
340 // IFrame Grabber Control 2 interface is implemented by FrameGrabberControls2_Sender
341 //
342 
343 //
344 // Rgb
345 //
347 {
348  return RgbMsgSender->getRgbHeight();
349 }
350 
352 {
353  return RgbMsgSender->getRgbWidth();
354 }
355 
357 {
358  return RgbMsgSender->getRgbSupportedConfigurations(configurations);
359 }
360 
361 bool RGBDSensorClient::getRgbResolution(int &width, int &height)
362 {
363  return RgbMsgSender->getRgbResolution(width, height);
364 }
365 
366 bool RGBDSensorClient::setRgbResolution(int width, int height)
367 {
368  return RgbMsgSender->setRgbResolution(width, height);
369 }
370 
371 bool RGBDSensorClient::getRgbFOV(double &horizontalFov, double &verticalFov)
372 {
373  return RgbMsgSender->getRgbFOV(horizontalFov, verticalFov);
374 }
375 
376 bool RGBDSensorClient::setRgbFOV(double horizontalFov, double verticalFov)
377 {
378  return RgbMsgSender->getRgbFOV(horizontalFov, verticalFov);
379 }
380 
382 {
383  return RgbMsgSender->getRgbIntrinsicParam(intrinsic);
384 }
385 
387 {
388  return RgbMsgSender->getRgbMirroring(mirror);
389 }
390 
392 {
393  return RgbMsgSender->setRgbMirroring(mirror);
394 }
395 
396 //
397 // Depth
398 //
400 {
401  return DepthMsgSender->getDepthHeight();
402 }
403 
405 {
406  return DepthMsgSender->getDepthWidth();
407 }
408 
409 bool RGBDSensorClient::setDepthResolution(int width, int height)
410 {
411  return DepthMsgSender->setDepthResolution(width, height);
412 }
413 
414 bool RGBDSensorClient::getDepthFOV(double &horizontalFov, double &verticalFov)
415 {
416  return DepthMsgSender->getDepthFOV(horizontalFov, verticalFov);
417 }
418 
419 bool RGBDSensorClient::setDepthFOV(double horizontalFov, double verticalFov)
420 {
421  return DepthMsgSender->setDepthFOV(horizontalFov, verticalFov);
422 }
423 
425 {
426  return DepthMsgSender->getDepthAccuracy();
427 }
428 
430 {
431  return DepthMsgSender->setDepthAccuracy(accuracy);
432 }
433 
434 bool RGBDSensorClient::getDepthClipPlanes(double &nearPlane, double &farPlane)
435 {
436  return DepthMsgSender->getDepthClipPlanes(nearPlane, farPlane);
437 }
438 
439 bool RGBDSensorClient::setDepthClipPlanes(double nearPlane, double farPlane)
440 {
441  return DepthMsgSender->setDepthClipPlanes(nearPlane, farPlane);
442 }
443 
445 {
446  return DepthMsgSender->getDepthIntrinsicParam(intrinsic);
447 }
448 
450 {
451  return DepthMsgSender->getDepthMirroring(mirror);
452 }
453 
455 {
456  return DepthMsgSender->setDepthMirroring(mirror);
457 }
LogStream.h
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::os::Value::asVocab
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
Definition: Value.cpp:231
yarp::dev::FrameGrabberControls_Sender
This classes implement a sender / parser for IFrameGrabberControls interface messages.
Definition: FrameGrabberControlImpl.h:33
RGBDSensorClient::setRgbFOV
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
Definition: RGBDSensorClient.cpp:376
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
yarp::sig
Signal processing.
Definition: Image.h:25
VOCAB_RGBD_PROTOCOL_VERSION
constexpr yarp::conf::vocab32_t VOCAB_RGBD_PROTOCOL_VERSION
Definition: IRGBDSensor.h:23
yCWarning
#define yCWarning(component,...)
Definition: LogComponent.h:146
RGBDSensorClient::getRgbIntrinsicParam
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
Definition: RGBDSensorClient.cpp:381
yarp::os::Searchable::toString
virtual std::string toString() const =0
Return a standard text representation of the content of the object.
RGBDSensorClient::setDepthAccuracy
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
Definition: RGBDSensorClient.cpp:429
RGBDSensorClient::setRgbResolution
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
Definition: RGBDSensorClient.cpp:366
RGBDSensorClient::getImages
bool getImages(yarp::sig::FlexImage &colorFrame, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthFrame, yarp::os::Stamp *colorStamp=nullptr, yarp::os::Stamp *depthStamp=nullptr) override
Get the both the color and depth frame in a single call.
Definition: RGBDSensorClient.cpp:331
YARP_LOG_COMPONENT
#define YARP_LOG_COMPONENT(name,...)
Definition: LogComponent.h:80
Portable.h
VOCAB_STATUS
constexpr yarp::conf::vocab32_t VOCAB_STATUS
Definition: IRGBDSensor.h:31
VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_GET
Definition: GenericVocabs.h:16
yarp::dev::Implement_DepthVisualParams_Sender
Definition: IVisualParamsImpl.h:71
VOCAB_RGBD_SENSOR
constexpr yarp::conf::vocab32_t VOCAB_RGBD_SENSOR
Definition: IRGBDSensor.h:22
RGBDSensorClient::getDepthWidth
int getDepthWidth() override
Return the height of each frame.
Definition: RGBDSensorClient.cpp:404
ret
bool ret
Definition: ImplementAxisInfo.cpp:72
RGBDSensorClient::getRgbImage
bool getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the rgb frame from the device.
Definition: RGBDSensorClient.cpp:321
yarp::dev::IRGBDSensor::RGBDSensor_status
RGBDSensor_status
Definition: IRGBDSensor.h:63
yarp::dev
An interface for the device drivers.
Definition: audioBufferSizeData.cpp:17
RGBDSensorClient::getDepthAccuracy
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
Definition: RGBDSensorClient.cpp:424
RGBDSensorClient::getDepthMirroring
bool getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
Definition: RGBDSensorClient.cpp:449
yarp::sig::ImageOf< yarp::sig::PixelFloat >
VOCAB_ERROR_MSG
constexpr yarp::conf::vocab32_t VOCAB_ERROR_MSG
Definition: IRGBDSensor.h:27
RGBDSensorClient::initialize_YARP
bool initialize_YARP(yarp::os::Searchable &config)
Definition: RGBDSensorClient.cpp:152
RGBDSensorClient::~RGBDSensorClient
~RGBDSensorClient() override
Definition: RGBDSensorClient.cpp:34
yarp::sig::VectorOf
Provides:
Definition: Vector.h:122
RGBDSensor_StreamingMsgParser
Definition: RGBDSensorClient_StreamingMsgParser.h:62
RGBDSensorClient_StreamingMsgParser.h
yarp::dev::Implement_RgbVisualParams_Sender
Definition: IVisualParamsImpl.h:32
RGBDSensorClient::getDepthHeight
int getDepthHeight() override
Return the height of each frame.
Definition: RGBDSensorClient.cpp:399
RGBDSensorClient::getExtrinsicParam
bool getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
Definition: RGBDSensorClient.cpp:278
RGBDSensorClient::getSensorStatus
IRGBDSensor::RGBDSensor_status getSensorStatus() override
Get the surrent status of the sensor, using enum type.
Definition: RGBDSensorClient.cpp:298
yarp::os::Bottle::get
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition: Bottle.cpp:249
RGBDSensorClient::fromConfig
bool fromConfig(yarp::os::Searchable &config)
Definition: RGBDSensorClient.cpp:66
yarp::sig::FlexImage
Image class with user control of representation details.
Definition: Image.h:403
RGBDSensorClient::setDepthClipPlanes
bool setDepthClipPlanes(double near, double far) override
Set the clipping planes of the sensor.
Definition: RGBDSensorClient.cpp:439
yarp::os::Portable::copyPortable
static bool copyPortable(const PortWriter &writer, PortReader &reader)
Copy one portable to another, via writing and reading.
Definition: Portable.cpp:19
yarp::os::Value::asString
virtual std::string asString() const
Get string value.
Definition: Value.cpp:237
yarp::os::NetworkBase::connect
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
Definition: Network.cpp:685
RGBDSensorClient::close
bool close() override
Close the DeviceDriver.
Definition: RGBDSensorClient.cpp:253
VOCAB_FAILED
constexpr yarp::conf::vocab32_t VOCAB_FAILED
Definition: GenericVocabs.h:19
RGBDSensorClient::getRgbWidth
int getRgbWidth() override
Return the width of each frame.
Definition: RGBDSensorClient.cpp:351
RGBDSensorClient::getLastErrorMsg
std::string getLastErrorMsg(yarp::os::Stamp *timeStamp=nullptr) override
Return an error message in case of error.
Definition: RGBDSensorClient.cpp:310
RGBDSensorClient::setDepthResolution
bool setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
Definition: RGBDSensorClient.cpp:409
RGBDSENSORCLIENT
const yarp::os::LogComponent & RGBDSENSORCLIENT()
Definition: RGBDSensorClient.cpp:23
yarp::os::Searchable::check
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR
#define RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR
Definition: RGBDSensorClient.cpp:20
yarp::os::Searchable::find
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
RGBDSensorClient::open
bool open(yarp::os::Searchable &config) override
Create and configure a device, by name.
Definition: RGBDSensorClient.cpp:42
RGBDSensorClient::setDepthFOV
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
Definition: RGBDSensorClient.cpp:419
yarp::os::Bottle::addVocab
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
Definition: Bottle.cpp:167
RGBDSensorClient::setDepthMirroring
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
Definition: RGBDSensorClient.cpp:454
LogComponent.h
yarp::os::Stamp
An abstraction for a time stamp and/or sequence number.
Definition: Stamp.h:25
RGBD_INTERFACE_PROTOCOL_VERSION_MINOR
#define RGBD_INTERFACE_PROTOCOL_VERSION_MINOR
Definition: RGBDSensorClient.cpp:21
yCError
#define yCError(component,...)
Definition: LogComponent.h:157
RGBDSensorClient.h
yarp::os::Value::asInt32
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition: Value.cpp:207
yarp::os
An interface to the operating system, including Port based communication.
Definition: AbstractCarrier.h:17
RGBDSensorClient::getRgbResolution
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
Definition: RGBDSensorClient.cpp:361
RGBDSensorClient::getDepthIntrinsicParam
bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
Definition: RGBDSensorClient.cpp:444
RGBDSensorClient::getRgbSupportedConfigurations
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
Definition: RGBDSensorClient.cpp:356
yarp::sig::Matrix::zero
void zero()
Zero the matrix.
Definition: Matrix.cpp:308
RGBDSensorClient
RGBDSensorClient: A Network client to receive data from kinect-like devices. This device will read fr...
Definition: RGBDSensorClient.h:88
RGBDSensorClient::getRgbHeight
int getRgbHeight() override
Return the height of each frame.
Definition: RGBDSensorClient.cpp:346
yCTrace
#define yCTrace(component,...)
Definition: LogComponent.h:88
RGBDSensorClient::getDepthClipPlanes
bool getDepthClipPlanes(double &near, double &far) override
Get the clipping planes of the sensor.
Definition: RGBDSensorClient.cpp:434
RGBDSensorClient::getRgbFOV
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
Definition: RGBDSensorClient.cpp:371
RGBDSensorClient::getDepthImage
bool getDepthImage(yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the depth frame from the device.
Definition: RGBDSensorClient.cpp:326
GenericVocabs.h
VOCAB_EXTRINSIC_PARAM
constexpr yarp::conf::vocab32_t VOCAB_EXTRINSIC_PARAM
Definition: IRGBDSensor.h:26
RGBDSensorClient::getRgbMirroring
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
Definition: RGBDSensorClient.cpp:386
RGBDSensorClient::getDepthFOV
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
Definition: RGBDSensorClient.cpp:414
RGBDSensorClient::setRgbMirroring
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
Definition: RGBDSensorClient.cpp:391
yarp::os::Property
A class for storing options and configuration information.
Definition: Property.h:37
yarp::sig::Matrix
A class for a Matrix.
Definition: Matrix.h:46