17#define RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR 1
18#define RGBD_INTERFACE_PROTOCOL_VERSION_MINOR 0
24 yarp::proto::framegrabber::FrameGrabberControls_Forwarder(rpcPort),
25 RgbMsgSender(
new yarp::proto::framegrabber::RgbVisualParams_Forwarder(rpcPort)),
26 DepthMsgSender(
new yarp::proto::framegrabber::DepthVisualParams_Forwarder(rpcPort)),
35 delete DepthMsgSender;
101 yCError(
RGBDSENSORCLIENT) <<
"Major protocol number does not match, please verify client and server are updated. \
159 return Property::copyPortable(response.
get(3),
extrinsic);
238 return RgbMsgSender->
getRgbFOV(horizontalFov, verticalFov);
243 return RgbMsgSender->
getRgbFOV(horizontalFov, verticalFov);
281 return DepthMsgSender->
getDepthFOV(horizontalFov, verticalFov);
286 return DepthMsgSender->
setDepthFOV(horizontalFov, verticalFov);
constexpr yarp::conf::vocab32_t VOCAB_RGBD_SENSOR
constexpr yarp::conf::vocab32_t VOCAB_EXTRINSIC_PARAM
constexpr yarp::conf::vocab32_t VOCAB_RGBD_PROTOCOL_VERSION
constexpr yarp::conf::vocab32_t VOCAB_STATUS
constexpr yarp::conf::vocab32_t VOCAB_ERROR_MSG
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_FAILED
const yarp::os::LogComponent & RGBDSENSORCLIENT()
#define RGBD_INTERFACE_PROTOCOL_VERSION_MINOR
#define RGBD_INTERFACE_PROTOCOL_VERSION_MAJOR
std::string m_localRpcPort
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_DepthCarrier
std::string m_remoteDepthPort
std::string m_localImagePort
std::string m_remoteRpcPort
std::string m_localDepthPort
std::string m_remoteImagePort
std::string m_ImageCarrier
RGBDSensorClient: A Network client to receive data from kinect-like devices. This device will read fr...
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
int getDepthWidth() override
Return the height of each frame.
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
RgbImageBufferedPort colorFrame_StreamingPort
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
std::string getLastErrorMsg(yarp::os::Stamp *timeStamp=nullptr) override
Return an error message in case of error.
bool getDepthClipPlanes(double &near, double &far) override
Get the clipping planes of the sensor.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
int getRgbWidth() override
Return the width of each frame.
bool setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
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.
bool setDepthClipPlanes(double near, double far) override
Set the clipping planes of the sensor.
bool getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool getDepthImage(yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the depth frame from the device.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
~RGBDSensorClient() override
bool close() override
Close the DeviceDriver.
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
bool getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the rgb frame from the device.
RGBDSensor_StreamingMsgParser * streamingReader
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
bool getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
int getDepthHeight() override
Return the height of each frame.
IRGBDSensor::RGBDSensor_status getSensorStatus() override
Get the surrent status of the sensor, using enum type.
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
bool open(yarp::os::Searchable &config) override
Create and configure a device, by name.
int getRgbHeight() override
Return the height of each frame.
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
FloatImageBufferedPort depthFrame_StreamingPort
yarp::os::Stamp depthStamp
bool read(yarp::sig::FlexImage &rgbImage, yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *rgbStamp=nullptr, yarp::os::Stamp *depthStamp=nullptr)
void attach(RgbImageBufferedPort *_port_rgb, FloatImageBufferedPort *_port_depth)
bool readDepth(yarp::sig::ImageOf< yarp::sig::PixelFloat > &data, yarp::os::Stamp *timeStamp=nullptr)
bool readRgb(yarp::sig::FlexImage &data, yarp::os::Stamp *timeStamp=nullptr)
A simple collection of objects that can be described and transmitted in a portable way.
void addVocab32(yarp::conf::vocab32_t x)
Places a vocabulary item in the bottle, at the end of the list.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
A mini-server for performing network communication in the background.
std::string getName() const override
Get name of port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
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.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
bool addOutput(const std::string &name) override
Add an output connection to the specified port.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A class for storing options and configuration information.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.
virtual yarp::conf::vocab32_t asVocab32() const
Get vocabulary identifier as an integer.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual std::string asString() const
Get string value.
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
bool getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
bool setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
int getDepthWidth() override
Return the height of each frame.
bool getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
int getDepthHeight() override
Return the height of each frame.
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations) override
Get the possible configurations of the camera.
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
int getRgbHeight() override
Return the height of each frame.
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
int getRgbWidth() override
Return the width of each frame.
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
Image class with user control of representation details.
#define yCError(component,...)
#define yCWarning(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
The main, catch-all namespace for YARP.
constexpr char accuracy[]