22 Implement_RgbVisualParams_Sender::Implement_RgbVisualParams_Sender(
yarp::os::Port &port) : _port(port) {};
52 configurations.
clear();
56 for(
int i=0; i<response.
get(3).asInt32(); i++){
57 configurations[i].width=response.
get(4 + i*4).
asInt32();
58 configurations[i].height=response.
get(4 + i*4 + 1).
asInt32();
59 configurations[i].framerate=response.
get(4 + i*4 + 2).
asFloat64();
143 ret=Property::copyPortable(response.
get(3), intrinsic);
147 ret &= Property::copyPortable(response.
get(4),p);
190 iRgbVisual = interface;
195 iRgbVisual =
nullptr;
207 yError() <<
"Rgb Visual parameter Parser has not been correctly configures. IRgbVisualParams interface is not valid";
215 yError() <<
"Rgb Visual Params Parser received a command not belonging to this interface. Required interface is " <<
yarp::os::Vocab::decode(code);
251 for(
size_t i=0; i<conf.
size(); i++){
255 response.
addVocab(conf[i].pixelCoding);
308 ret &= Property::copyPortable(params, tmp);
333 yError() <<
"Rgb Visual Parameter interface parser received an unknown GET command. Command is " << cmd.
toString();
371 yError() <<
"Rgb Visual Parameter interface parser received am unknown SET command. Command is " << cmd.
toString();
382 yError() <<
"Rgb Visual parameter interface Parser received a malformed request. Command should either be 'set' or 'get', received " << cmd.
toString();
407 _port.
write(cmd, response);
417 _port.
write(cmd, response);
429 _port.
write(cmd, response);
439 _port.
write(cmd, response);
461 _port.
write(cmd, response);
471 _port.
write(cmd, response);
482 _port.
write(cmd, response);
492 _port.
write(cmd, response);
514 _port.
write(cmd, response);
524 _port.
write(cmd, response);
533 Property::copyPortable(response.
get(3), intrinsic);
543 _port.
write(cmd, response);
559 _port.
write(cmd, response);
571 iDepthVisual = interface;
576 iDepthVisual =
nullptr;
588 yError() <<
"Depth Visual parameter Parser has not been correctly configured. IDepthVisualParams interface is not valid";
596 yError() <<
"Depth Visual Params Parser received a command not belonging to this interface. Required interface was " <<
yarp::os::Vocab::decode(code);
652 ret &= Property::copyPortable(params, tmp);
672 double nearPlane, farPlane;
700 yError() <<
"Depth Visual Parameter interface parser received am unknown GET command. Command is " << cmd.
toString();
760 yError() <<
"Rgb Visual Parameter interface parser received am unknown SET command. Command is " << cmd.
toString();
771 yError() <<
"Rgb Visual parameter interface Parser received a malformed request. Command should either be 'set' or 'get', received " << cmd.
toString();
constexpr yarp::conf::vocab32_t VOCAB_IS
constexpr yarp::conf::vocab32_t VOCAB_WIDTH
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_FAILED
constexpr yarp::conf::vocab32_t VOCAB_SET
constexpr yarp::conf::vocab32_t VOCAB_HEIGHT
constexpr yarp::conf::vocab32_t VOCAB_DEPTH_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_RGB_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_CLIP_PLANES
constexpr yarp::conf::vocab32_t VOCAB_RESOLUTION
constexpr yarp::conf::vocab32_t VOCAB_MIRROR
constexpr yarp::conf::vocab32_t VOCAB_FOV
constexpr yarp::conf::vocab32_t VOCAB_ACCURACY
constexpr yarp::conf::vocab32_t VOCAB_INTRINSIC_PARAM
constexpr yarp::conf::vocab32_t VOCAB_SUPPORTED_CONF
An interface for retrieving intrinsic parameter from a depth camera.
virtual bool setDepthMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual double getDepthAccuracy()=0
Get the minimum detectable variation in distance [meter].
virtual bool setDepthAccuracy(double accuracy)=0
Set the minimum detectable variation in distance [meter] when possible.
virtual int getDepthWidth()=0
Return the height of each frame.
virtual bool getDepthIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the depth camera.
virtual bool getDepthFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the depth camera.
virtual bool setDepthFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the depth camera.
virtual bool setDepthClipPlanes(double nearPlane, double farPlane)=0
Set the clipping planes of the sensor.
virtual bool getDepthClipPlanes(double &nearPlane, double &farPlane)=0
Get the clipping planes of the sensor.
virtual bool getDepthMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual int getDepthHeight()=0
Return the height of each frame.
virtual bool setDepthResolution(int width, int height)=0
Set the resolution of the depth image from the camera.
An interface for retrieving intrinsic parameter from a rgb camera.
virtual bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations)
Get the possible configurations of the camera.
virtual bool setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
virtual bool getRgbResolution(int &width, int &height)
Get the resolution of the rgb image from the camera.
virtual bool setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
virtual bool getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
virtual int getRgbHeight()=0
Return the height of each frame.
virtual bool getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
virtual bool setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
virtual int getRgbWidth()=0
Return the width of each frame.
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
bool configure(IDepthVisualParams *interface)
Implement_DepthVisualParams_Parser()
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
Implement_DepthVisualParams_Sender(os::Port &port)
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
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.
bool setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
int getDepthHeight() override
Return the height of each frame.
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
int getDepthWidth() override
Return the height of each frame.
bool getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
bool configure(IRgbVisualParams *interface)
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
Implement_RgbVisualParams_Parser()
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< CameraConfig > &configurations) override
Get the possible configurations of the camera.
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
int getRgbWidth() override
Return the width of each frame.
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
bool 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.
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
A simple collection of objects that can be described and transmitted in a portable way.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
void addFloat64(yarp::conf::float64_t x)
Places a 64-bit floating point number in the bottle, at the end of the list.
void addVocab(int 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.
void clear()
Empties the bottle of any objects it contains.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
A mini-server for network communication.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
A class for storing options and configuration information.
void clear()
Remove all associations.
Property & addGroup(const std::string &key)
Add a nested group.
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
virtual bool asBool() const
Get boolean value.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
bool isNull() const override
Checks if the object is invalid.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
void resize(size_t size) override
Resize the vector.
An interface for the device drivers.
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
An interface to the operating system, including Port based communication.
constexpr char framerate[]
constexpr char accuracy[]