111 std::lock_guard <std::mutex>
lg(
m_mutex);
120 std::lock_guard <std::mutex>
lg(
m_mutex);
129 std::lock_guard <std::mutex>
lg(
m_mutex);
133 *timeStamp = r.stamp;
141 std::lock_guard <std::mutex>
lg(
m_mutex);
145 return ReturnValue::return_code::return_value_error_not_ready;
153 std::lock_guard <std::mutex>
lg(
m_mutex);
157 return ReturnValue::return_code::return_value_error_not_ready;
165 std::lock_guard <std::mutex>
lg(
m_mutex);
172 return ReturnValue::return_code::return_value_error_not_ready;
182 std::lock_guard <std::mutex>
lg(
m_mutex);
189 std::lock_guard <std::mutex>
lg(
m_mutex);
196 std::lock_guard <std::mutex>
lg(
m_mutex);
198 configurations = r.configuration;
204 std::lock_guard <std::mutex>
lg(
m_mutex);
213 std::lock_guard <std::mutex>
lg(
m_mutex);
220 std::lock_guard <std::mutex>
lg(
m_mutex);
222 horizontalFov = r.horizontalFov;
223 verticalFov = r.verticalFOV;
229 std::lock_guard <std::mutex>
lg(
m_mutex);
236 std::lock_guard <std::mutex>
lg(
m_mutex);
238 intrinsic = r.params;
244 std::lock_guard <std::mutex>
lg(
m_mutex);
252 std::lock_guard <std::mutex>
lg(
m_mutex);
262 std::lock_guard <std::mutex>
lg(
m_mutex);
269 std::lock_guard <std::mutex>
lg(
m_mutex);
276 std::lock_guard <std::mutex>
lg(
m_mutex);
294 horizontalFov = r.horizontalFov;
295 verticalFov = r.verticalFOV;
325 nearPlane = r.nearPlane;
326 farPlane = r.farPlane;
341 intrinsic = r.params;
415 HasOnOff = r.HasOnOff;
const yarp::os::LogComponent & RGBDSENSOR_NWC_YARP()
virtual IFrameGrabberControlMsgs_return_getCameraDescription getCameraDescriptionRPC()
virtual IRGBDMsgs_return_getExtrinsic getExtrinsicParamRPC()
virtual IRGBVisualParamsMsgs_return_getRgbIntrinsicParam getRgbIntrinsicParamRPC()
virtual yarp::dev::ReturnValue setFeature2RPC(const std::int32_t feature, const double value1, const double value2)
virtual yarp::dev::ReturnValue setRgbResolutionRPC(const std::int32_t width, const std::int32_t height)
virtual IRGBDMsgs_return_getLastErrorMsg getLastErrorMsgRPC()
virtual yarp::dev::ReturnValue setRgbMirroringRPC(const bool mirror)
virtual IFrameGrabberControlMsgs_return_hasOnOff hasOnOffRPC(const std::int32_t feature)
virtual IDepthVisualParamsMsgs_return_getDepthHeight getDepthHeightRPC()
virtual IFrameGrabberControlMsgs_return_getMode getModeRPC(const std::int32_t feature)
virtual IDepthVisualParamsMsgs_return_getDepthWidth getDepthWidthRPC()
virtual yarp::dev::ReturnValue setRgbFOVRPC(const double horizontalFov, const double verticalFov)
virtual yarp::dev::ReturnValue setDepthClipPlanesRPC(const double nearPlane, const double farPlane)
virtual IRGBVisualParamsMsgs_return_getRgbSupportedCfg getRgbSupportedConfigurationsRPC()
virtual IFrameGrabberControlMsgs_return_getFeature1 getFeature1RPC(const std::int32_t feature)
virtual IDepthVisualParamsMsgs_return_getDepthClipPlanes getDepthClipPlanesRPC()
virtual IDepthVisualParamsMsgs_return_getDepthIntrinsicParam getDepthIntrinsicParamRPC()
virtual IRGBVisualParamsMsgs_return_getRgbMirroring getRgbMirroringRPC()
virtual IDepthVisualParamsMsgs_return_getDepthFOV getDepthFOVRPC()
virtual IRGBVisualParamsMsgs_return_getRgbFOV getRgbFOVRPC()
virtual IRGBVisualParamsMsgs_return_getRgbResolution getRgbResolutionRPC()
virtual IFrameGrabberControlMsgs_return_hasFeature hasFeatureRPC(const std::int32_t feature)
virtual yarp::dev::ReturnValue setOnePushRPC(const std::int32_t feature)
virtual IFrameGrabberControlMsgs_return_hasManual hasManualRPC(const std::int32_t feature)
virtual yarp::dev::ReturnValue setModeRPC(const std::int32_t feature, const yarp::dev::FeatureMode mode)
virtual yarp::dev::ReturnValue setFeature1RPC(const std::int32_t feature, const double value)
virtual IDepthVisualParamsMsgs_return_getDepthAccuracy getDepthAccuracyRPC()
virtual yarp::dev::ReturnValue setDepthFOVRPC(const double horizontalFov, const double verticalFov)
virtual yarp::dev::ReturnValue setDepthMirroringRPC(const bool mirror)
virtual yarp::dev::ReturnValue setActiveRPC(const std::int32_t feature, const bool onoff)
virtual IRGBVisualParamsMsgs_return_getRgbHeight getRgbHeightRPC()
virtual IFrameGrabberControlMsgs_return_getFeature2 getFeature2RPC(const std::int32_t feature)
virtual IDepthVisualParamsMsgs_return_getDepthResolution getDepthResolutionRPC()
virtual yarp::dev::ReturnValue setDepthResolutionRPC(const std::int32_t width, const std::int32_t height)
virtual yarp::dev::ReturnValue setDepthAccuracyRPC(const double accuracy)
virtual IDepthVisualParamsMsgs_return_getDepthMirroring getDepthMirroringRPC()
virtual IFrameGrabberControlMsgs_return_getActive getActiveRPC(const std::int32_t feature)
virtual bool checkProtocolVersion()
virtual IRGBVisualParamsMsgs_return_getRgbWidth getRgbWidthRPC()
virtual IFrameGrabberControlMsgs_return_hasAuto hasAutoRPC(const std::int32_t feature)
virtual IRGBDMsgs_return_getSensorStatus getSensorStatusRPC()
virtual IFrameGrabberControlMsgs_return_hasOnePush hasOnePushRPC(const std::int32_t feature)
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)
std::string m_localImagePort
std::string m_localRpcPort
std::string m_remoteRpcPort
std::string m_remoteDepthPort
std::string m_remoteImagePort
std::string m_localDepthPort
std::string m_ImageCarrier
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
std::string m_DepthCarrier
RGBDSensor_nwc_yarp: A Network client to receive data from kinect-like devices.
RgbImageBufferedPort m_colorFrame_StreamingPort
yarp::os::Stamp depthStamp
FloatImageBufferedPort m_depthFrame_StreamingPort
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
yarp::dev::ReturnValue getRgbResolution(int &width, int &height) override
Get 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 setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
yarp::dev::ReturnValue getActive(yarp::dev::cameraFeature_id_t feature, bool &isActive) override
Get the current status of the feature, on or off.
yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
int getRgbHeight() override
Return the height of each frame.
yarp::dev::ReturnValue setActive(yarp::dev::cameraFeature_id_t feature, bool onoff) override
Set the requested feature on or off.
yarp::dev::ReturnValue hasOnePush(yarp::dev::cameraFeature_id_t feature, bool &hasOnePush) override
Check if the requested feature has the 'onePush' mode.
yarp::dev::ReturnValue getFeature(yarp::dev::cameraFeature_id_t feature, double &value) override
Get the current value for the requested feature.
~RGBDSensor_nwc_yarp() override
yarp::dev::ReturnValue getDepthClipPlanes(double &near, double &far) override
Get the clipping planes of the sensor.
yarp::dev::ReturnValue hasManual(yarp::dev::cameraFeature_id_t feature, bool &hasManual) override
Check if the requested feature has the 'manual' mode.
yarp::dev::ReturnValue getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
yarp::dev::ReturnValue hasOnOff(yarp::dev::cameraFeature_id_t feature, bool &HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
yarp::dev::ReturnValue getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
int getDepthHeight() override
Return the height of each frame.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue setFeature(yarp::dev::cameraFeature_id_t feature, double value) override
Set the requested feature to a value (saturation, brightness ... )
yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
int getDepthWidth() override
Return the height of each frame.
yarp::dev::ReturnValue hasAuto(yarp::dev::cameraFeature_id_t feature, bool &hasAuto) override
Check if the requested feature has the 'auto' mode.
yarp::dev::ReturnValue getExtrinsicParam(yarp::sig::Matrix &extrinsic) override
Get the extrinsic parameters from the device.
yarp::dev::ReturnValue getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
yarp::dev::ReturnValue getDepthResolution(int &width, int &height) override
Get the resolution of the depth image from the camera.
yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
yarp::dev::ReturnValue setMode(yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode mode) override
Set the requested mode for the feature.
yarp::dev::ReturnValue getCameraDescription(yarp::dev::CameraDescriptor &camera) override
Get a basic description of the camera hw.
yarp::dev::ReturnValue hasFeature(yarp::dev::cameraFeature_id_t feature, bool &hasFeature) override
Check if camera has the requested feature (saturation, brightness ... )
yarp::dev::ReturnValue getSensorStatus(IRGBDSensor::RGBDSensor_status &status) override
yarp::dev::ReturnValue getLastErrorMsg(std::string &message, yarp::os::Stamp *timeStamp=nullptr) override
Return an error message in case of error.
yarp::dev::ReturnValue setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
yarp::dev::ReturnValue getDepthAccuracy(double &accuracy) override
Get the minimum detectable variation in distance [meter].
RGBDSensorMsgs m_rgbdsensor_RPC
yarp::dev::ReturnValue getDepthImage(yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the depth frame from the device.
yarp::dev::ReturnValue getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp=nullptr) override
Get the rgb frame from the device.
yarp::dev::ReturnValue getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
yarp::dev::ReturnValue setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
yarp::dev::ReturnValue setOnePush(yarp::dev::cameraFeature_id_t feature) override
Set the requested feature to a value (saturation, brightness ... )
RGBDSensor_StreamingMsgParser * streamingReader
yarp::dev::ReturnValue getMode(yarp::dev::cameraFeature_id_t feature, yarp::dev::FeatureMode &mode) override
Get the current mode for the feature.
yarp::dev::ReturnValue 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.
int getRgbWidth() override
Return the width of each frame.
yarp::dev::ReturnValue setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
yarp::dev::ReturnValue setDepthClipPlanes(double near, double far) override
Set the clipping planes of the sensor.
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 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.
bool attachAsClient(yarp::os::UnbufferedContactable &port)
Tag this WireLink as a client, sending data via the specified port.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
Image class with user control of representation details.
#define yCError(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.
constexpr char accuracy[]
std::string deviceDescription