13YARP_LOG_COMPONENT(ICHATBOTMSGSIMPL,
"yarp.devices.chatBot_nws_yarp.ChatBotRPC_CallbackHelper")
26 std::lock_guard <std::mutex> lg(m_mutex);
32 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
39 yCError(ICHATBOTMSGSIMPL) <<
"Could not perform getRgbWidth()";
40 response.
ret = ReturnValue::return_code::return_value_error_generic;
52 std::lock_guard<std::mutex> lg(m_mutex);
57 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
63 yCError(ICHATBOTMSGSIMPL) <<
"Could not perform getRgbHeight()";
64 response.
ret = ReturnValue::return_code::return_value_error_generic;
76 std::lock_guard<std::mutex> lg(m_mutex);
81 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
85 std::vector<CameraConfig> cfgs;
101 std::lock_guard<std::mutex> lg(m_mutex);
106 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
127 std::lock_guard<std::mutex> lg(m_mutex);
131 return ReturnValue::return_code::return_value_error_not_ready;
136 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setRgbResolutionRPC()";
145 std::lock_guard<std::mutex> lg(m_mutex);
150 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
171 std::lock_guard<std::mutex> lg(m_mutex);
175 return ReturnValue::return_code::return_value_error_not_ready;
178 auto ret = m_irgbd->
setRgbFOV(horizontalFov, verticalFov);
180 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setRgbFOVRPC()";
189 std::lock_guard<std::mutex> lg(m_mutex);
194 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
203 response.
params = intrinsic;
213 std::lock_guard<std::mutex> lg(m_mutex);
218 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
237 std::lock_guard<std::mutex> lg(m_mutex);
241 return ReturnValue::return_code::return_value_error_not_ready;
246 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setRgbMirroringRPC()";
255 std::lock_guard<std::mutex> lg(m_mutex);
260 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
280 std::lock_guard<std::mutex> lg(m_mutex);
285 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
289 bool hasfeat =
false;
304 std::lock_guard<std::mutex> lg(m_mutex);
308 return ReturnValue::return_code::return_value_error_not_ready;
313 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setFeature1RPC()";
322 std::lock_guard<std::mutex> lg(m_mutex);
327 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
336 response.
value = value;
346 std::lock_guard<std::mutex> lg(m_mutex);
350 return ReturnValue::return_code::return_value_error_not_ready;
355 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setFeature2RPC()";
364 std::lock_guard<std::mutex> lg(m_mutex);
369 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
390 std::lock_guard<std::mutex> lg(m_mutex);
395 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
399 bool hasonoff =
false;
414 std::lock_guard<std::mutex> lg(m_mutex);
418 return ReturnValue::return_code::return_value_error_not_ready;
423 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setActiveRPC()";
432 std::lock_guard<std::mutex> lg(m_mutex);
436 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
455 std::lock_guard<std::mutex> lg(m_mutex);
459 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
463 bool hasauto =
false;
478 std::lock_guard<std::mutex> lg(m_mutex);
483 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
502 std::lock_guard<std::mutex> lg(m_mutex);
507 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
526 std::lock_guard<std::mutex> lg(m_mutex);
530 return ReturnValue::return_code::return_value_error_not_ready;
535 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setModeRPC()";
544 std::lock_guard<std::mutex> lg(m_mutex);
549 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
568 std::lock_guard<std::mutex> lg(m_mutex);
572 return ReturnValue::return_code::return_value_error_not_ready;
577 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setOnePushRPC()";
588 std::lock_guard<std::mutex> lg(m_mutex);
593 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
600 response.
ret = ReturnValue::return_code::return_value_error_method_failed;
612 std::lock_guard<std::mutex> lg(m_mutex);
617 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
624 response.
ret = ReturnValue::return_code::return_value_error_method_failed;
636 std::lock_guard<std::mutex> lg(m_mutex);
641 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
664 std::lock_guard<std::mutex> lg(m_mutex);
668 return ReturnValue::return_code::return_value_error_not_ready;
673 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setDepthResolutionRPC()";
682 std::lock_guard<std::mutex> lg(m_mutex);
687 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
708 std::lock_guard<std::mutex> lg(m_mutex);
712 return ReturnValue::return_code::return_value_error_not_ready;
717 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setDepthFOVRPC()";
726 std::lock_guard<std::mutex> lg(m_mutex);
731 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
750 std::lock_guard<std::mutex> lg(m_mutex);
754 return ReturnValue::return_code::return_value_error_not_ready;
759 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setDepthAccuracyRPC()";
768 std::lock_guard<std::mutex> lg(m_mutex);
773 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
794 std::lock_guard<std::mutex> lg(m_mutex);
798 return ReturnValue::return_code::return_value_error_not_ready;
803 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setDepthClipPlanesRPC()";
812 std::lock_guard<std::mutex> lg(m_mutex);
817 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
836 std::lock_guard<std::mutex> lg(m_mutex);
840 return ReturnValue::return_code::return_value_error_not_ready;
845 yCError(ICHATBOTMSGSIMPL) <<
"Could not do setDepthMirroringRPC()";
854 std::lock_guard<std::mutex> lg(m_mutex);
859 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
868 response.
params = intrinsic;
878 std::lock_guard<std::mutex> lg(m_mutex);
883 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
902 std::lock_guard<std::mutex> lg(m_mutex);
907 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
918 response.
stamp = stmp;
928 std::lock_guard<std::mutex> lg(m_mutex);
933 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
944 response.
stamp = stmp;
954 std::lock_guard<std::mutex> lg(m_mutex);
959 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
970 response.
stamp = stmp;
980 std::lock_guard<std::mutex> lg(m_mutex);
985 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
1009 std::lock_guard<std::mutex> lg(m_mutex);
1014 response.
ret = ReturnValue::return_code::return_value_error_not_ready;
1023 response.
status = status;
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::os::Property params
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::FeatureMode mode
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::sig::ImageOf< yarp::sig::PixelFloat > img
yarp::dev::ReturnValue ret
yarp::os::Stamp depthstamp
yarp::sig::FlexImage rgbimg
yarp::sig::ImageOf< yarp::sig::PixelFloat > depthimg
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::IRGBDSensor::RGBDSensor_status status
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::os::Property params
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
std::vector< yarp::dev::CameraConfig > configuration
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
virtual IFrameGrabberControlMsgs_return_hasOnePush hasOnePushRPC(const std::int32_t feature) override
virtual yarp::dev::ReturnValue setRgbResolutionRPC(const std::int32_t width, const std::int32_t height) override
virtual IDepthVisualParamsMsgs_return_getDepthResolution getDepthResolutionRPC() override
RGBDSensorMsgsImpl(yarp::dev::IRGBDSensor *_irgbd, yarp::dev::IFrameGrabberControls *_ictrls)
virtual IDepthVisualParamsMsgs_return_getDepthFOV getDepthFOVRPC() override
virtual IRGBDMsgs_return_getDepthImage getDepthImageRPC() override
virtual IRGBVisualParamsMsgs_return_getRgbIntrinsicParam getRgbIntrinsicParamRPC() override
virtual IDepthVisualParamsMsgs_return_getDepthMirroring getDepthMirroringRPC() override
virtual IFrameGrabberControlMsgs_return_getFeature1 getFeature1RPC(const std::int32_t feature) override
virtual yarp::dev::ReturnValue setDepthFOVRPC(const double horizontalFov, const double verticalFov) override
virtual yarp::dev::ReturnValue setFeature1RPC(const std::int32_t feature, const double value) override
virtual yarp::dev::ReturnValue setDepthAccuracyRPC(const double accuracy) override
virtual yarp::dev::ReturnValue setOnePushRPC(const std::int32_t feature) override
virtual IFrameGrabberControlMsgs_return_hasManual hasManualRPC(const std::int32_t feature) override
virtual IDepthVisualParamsMsgs_return_getDepthHeight getDepthHeightRPC() override
virtual IDepthVisualParamsMsgs_return_getDepthWidth getDepthWidthRPC() override
virtual yarp::dev::ReturnValue setDepthResolutionRPC(const std::int32_t width, const std::int32_t height) override
virtual IRGBDMsgs_return_getRgbImage getRgbImageRPC() override
virtual IRGBVisualParamsMsgs_return_getRgbFOV getRgbFOVRPC() override
virtual IDepthVisualParamsMsgs_return_getDepthAccuracy getDepthAccuracyRPC() override
virtual IDepthVisualParamsMsgs_return_getDepthClipPlanes getDepthClipPlanesRPC() override
virtual IFrameGrabberControlMsgs_return_getMode getModeRPC(const std::int32_t feature) override
virtual IRGBDMsgs_return_getExtrinsic getExtrinsicParamRPC() override
virtual IRGBVisualParamsMsgs_return_getRgbSupportedCfg getRgbSupportedConfigurationsRPC() override
virtual IFrameGrabberControlMsgs_return_getFeature2 getFeature2RPC(const std::int32_t feature) override
virtual IRGBVisualParamsMsgs_return_getRgbHeight getRgbHeightRPC() override
virtual yarp::dev::ReturnValue setFeature2RPC(const std::int32_t feature, const double value1, const double value2) override
virtual IDepthVisualParamsMsgs_return_getDepthIntrinsicParam getDepthIntrinsicParamRPC() override
virtual yarp::dev::ReturnValue setModeRPC(const std::int32_t feature, const yarp::dev::FeatureMode mode) override
virtual IFrameGrabberControlMsgs_return_getActive getActiveRPC(const std::int32_t feature) override
virtual IRGBVisualParamsMsgs_return_getRgbResolution getRgbResolutionRPC() override
virtual IFrameGrabberControlMsgs_return_getCameraDescription getCameraDescriptionRPC() override
virtual IRGBDMsgs_return_getImages getImagesRPC() override
virtual IRGBDMsgs_return_getLastErrorMsg getLastErrorMsgRPC() override
virtual IFrameGrabberControlMsgs_return_hasAuto hasAutoRPC(const std::int32_t feature) override
virtual yarp::dev::ReturnValue setRgbFOVRPC(const double horizontalFov, const double verticalFov) override
virtual IFrameGrabberControlMsgs_return_hasOnOff hasOnOffRPC(const std::int32_t feature) override
virtual yarp::dev::ReturnValue setDepthMirroringRPC(const bool mirror) override
virtual yarp::dev::ReturnValue setRgbMirroringRPC(const bool mirror) override
virtual yarp::dev::ReturnValue setDepthClipPlanesRPC(const double nearPlane, const double farPlane) override
virtual IRGBVisualParamsMsgs_return_getRgbMirroring getRgbMirroringRPC() override
virtual IFrameGrabberControlMsgs_return_hasFeature hasFeatureRPC(const std::int32_t feature) override
virtual IRGBDMsgs_return_getSensorStatus getSensorStatusRPC() override
virtual yarp::dev::ReturnValue setActiveRPC(const std::int32_t feature, const bool onoff) override
virtual IRGBVisualParamsMsgs_return_getRgbWidth getRgbWidthRPC() override
yarp::dev::BusType busType
std::string deviceDescription
virtual yarp::dev::ReturnValue setDepthResolution(int width, int height)=0
Set the resolution of the depth image from the camera.
virtual yarp::dev::ReturnValue setDepthClipPlanes(double nearPlane, double farPlane)=0
Set the clipping planes of the sensor.
virtual int getDepthWidth()=0
Return the height of each frame.
virtual yarp::dev::ReturnValue setDepthMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue getDepthIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the depth camera.
virtual yarp::dev::ReturnValue getDepthMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue setDepthAccuracy(double accuracy)=0
Set the minimum detectable variation in distance [meter] when possible.
virtual yarp::dev::ReturnValue getDepthFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the depth camera.
virtual yarp::dev::ReturnValue getDepthClipPlanes(double &nearPlane, double &farPlane)=0
Get the clipping planes of the sensor.
virtual yarp::dev::ReturnValue getDepthAccuracy(double &accuracy)=0
Get the minimum detectable variation in distance [meter].
virtual yarp::dev::ReturnValue setDepthFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the depth camera.
virtual yarp::dev::ReturnValue getDepthResolution(int &width, int &height)=0
Get the resolution of the depth image from the camera.
Control interface for frame grabber devices.
virtual yarp::dev::ReturnValue setFeature(cameraFeature_id_t feature, double value)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue hasOnOff(cameraFeature_id_t feature, bool &HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual yarp::dev::ReturnValue getMode(cameraFeature_id_t feature, FeatureMode &mode)=0
Get the current mode for the feature.
virtual yarp::dev::ReturnValue hasManual(cameraFeature_id_t feature, bool &hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual yarp::dev::ReturnValue setOnePush(cameraFeature_id_t feature)=0
Set the requested feature to a value (saturation, brightness ... )
virtual yarp::dev::ReturnValue getCameraDescription(CameraDescriptor &camera)=0
Get a basic description of the camera hw.
virtual yarp::dev::ReturnValue hasOnePush(cameraFeature_id_t feature, bool &hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
virtual yarp::dev::ReturnValue getActive(cameraFeature_id_t feature, bool &isActive)=0
Get the current status of the feature, on or off.
virtual yarp::dev::ReturnValue hasAuto(cameraFeature_id_t feature, bool &hasAuto)=0
Check if the requested feature has the 'auto' mode.
virtual yarp::dev::ReturnValue setActive(cameraFeature_id_t feature, bool onoff)=0
Set the requested feature on or off.
virtual yarp::dev::ReturnValue setMode(cameraFeature_id_t feature, FeatureMode mode)=0
Set the requested mode for the feature.
virtual yarp::dev::ReturnValue hasFeature(cameraFeature_id_t, bool &hasFeature)=0
Check if camera has the requested feature (saturation, brightness ... )
virtual yarp::dev::ReturnValue getFeature(cameraFeature_id_t feature, double &value)=0
Get the current value for the requested feature.
A generic interface for cameras that have both color camera as well as depth camera sensor,...
virtual 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)=0
Get the both the color and depth frame in a single call.
virtual yarp::dev::ReturnValue getLastErrorMsg(std::string &message, yarp::os::Stamp *timeStamp=nullptr)=0
Return an error message in case of error.
virtual yarp::dev::ReturnValue getRgbImage(yarp::sig::FlexImage &rgbImage, yarp::os::Stamp *timeStamp=nullptr)=0
Get the rgb frame from the device.
virtual yarp::dev::ReturnValue getDepthImage(yarp::sig::ImageOf< yarp::sig::PixelFloat > &depthImage, yarp::os::Stamp *timeStamp=nullptr)=0
Get the depth frame from the device.
virtual yarp::dev::ReturnValue getSensorStatus(RGBDSensor_status &status)=0
Get the current status of the sensor, using enum type.
virtual yarp::dev::ReturnValue getExtrinsicParam(yarp::sig::Matrix &extrinsic)=0
Get the extrinsic parameters from the device.
virtual yarp::dev::ReturnValue setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
virtual yarp::dev::ReturnValue setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
virtual yarp::dev::ReturnValue getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
virtual yarp::dev::ReturnValue getRgbSupportedConfigurations(std::vector< yarp::dev::CameraConfig > &configurations)=0
Get the possible configurations of the camera.
virtual int getRgbHeight()=0
Return the height of each frame.
virtual yarp::dev::ReturnValue getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual yarp::dev::ReturnValue setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
virtual yarp::dev::ReturnValue getRgbResolution(int &width, int &height)=0
Get the resolution of the rgb image from the camera.
virtual int getRgbWidth()=0
Return the width of each frame.
A class for storing options and configuration information.
An abstraction for a time stamp and/or sequence number.
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.
constexpr char accuracy[]
std::string deviceDescription