|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
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();
A simple collection of objects that can be described and transmitted in a portable way.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
virtual bool getRgbFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the rgb camera.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
void clear()
Empties the bottle of any objects it contains.
bool setRgbMirroring(bool mirror) override
Set the mirroring setting of the sensor.
void resize(size_t size) override
Resize the vector.
virtual bool getDepthClipPlanes(double &nearPlane, double &farPlane)=0
Get the clipping planes of the sensor.
constexpr yarp::conf::vocab32_t VOCAB_ACCURACY
int getDepthHeight() override
Return the height of each frame.
constexpr yarp::conf::vocab32_t VOCAB_DEPTH_VISUAL_PARAMS
constexpr yarp::conf::vocab32_t VOCAB_SUPPORTED_CONF
virtual bool getDepthMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
constexpr yarp::conf::vocab32_t VOCAB_FOV
virtual bool getDepthFOV(double &horizontalFov, double &verticalFov)=0
Get the field of view (FOV) of the depth camera.
bool setRgbFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the rgb camera.
bool getDepthMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_INTRINSIC_PARAM
bool getDepthClipPlanes(double &nearPlane, double &farPlane) override
Get the clipping planes of the sensor.
virtual bool setRgbResolution(int width, int height)=0
Set the resolution of the rgb image from the camera.
virtual bool setDepthClipPlanes(double nearPlane, double farPlane)=0
Set the clipping planes of the sensor.
int getRgbHeight() override
Return the height of each frame.
virtual bool setRgbFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the rgb camera.
virtual bool getRgbSupportedConfigurations(yarp::sig::VectorOf< yarp::dev::CameraConfig > &configurations)
Get the possible configurations of the camera.
void addFloat64(yarp::conf::float64_t x)
Places a 64-bit floating point number in the bottle, at the end of the list.
constexpr yarp::conf::vocab32_t VOCAB_HEIGHT
constexpr yarp::conf::vocab32_t VOCAB_CLIP_PLANES
An interface for the device drivers.
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
A mini-server for network communication.
bool setDepthAccuracy(double accuracy) override
Set the minimum detectable variation in distance [meter] when possible.
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
constexpr yarp::conf::vocab32_t VOCAB_SET
virtual int getDepthHeight()=0
Return the height of each frame.
bool getRgbIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the rgb camera.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
virtual bool getDepthIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the depth camera.
bool setDepthResolution(int width, int height) override
Set the resolution of the depth image from the camera.
virtual bool asBool() const
Get boolean value.
virtual bool getRgbMirroring(bool &mirror)=0
Get the mirroring setting of the sensor.
constexpr yarp::conf::vocab32_t VOCAB_FAILED
Implement_DepthVisualParams_Parser()
double getDepthAccuracy() override
Get the minimum detectable variation in distance [meter].
bool setRgbResolution(int width, int height) override
Set the resolution of the rgb image from the camera.
virtual bool setDepthResolution(int width, int height)=0
Set the resolution of the depth image from the camera.
bool isNull() const override
Checks if the object is invalid.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
virtual bool getRgbIntrinsicParam(yarp::os::Property &intrinsic)=0
Get the intrinsic parameters of the rgb camera.
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
void clear()
Remove all associations.
constexpr yarp::conf::vocab32_t VOCAB_MIRROR
bool setDepthFOV(double horizontalFov, double verticalFov) override
Set the field of view (FOV) of the depth camera.
bool configure(IRgbVisualParams *interface)
bool getRgbSupportedConfigurations(yarp::sig::VectorOf< CameraConfig > &configurations) override
Get the possible configurations of the camera.
virtual bool setDepthFOV(double horizontalFov, double verticalFov)=0
Set the field of view (FOV) of the depth camera.
constexpr yarp::conf::vocab32_t VOCAB_WIDTH
constexpr yarp::conf::vocab32_t VOCAB_RGB_VISUAL_PARAMS
virtual std::int32_t asInt32() const
Get 32-bit integer value.
bool getRgbFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the rgb camera.
bool getRgbResolution(int &width, int &height) override
Get the resolution of the rgb image from the camera.
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
An interface for retrieving intrinsic parameter from a rgb camera.
virtual double getDepthAccuracy()=0
Get the minimum detectable variation in distance [meter].
Implement_RgbVisualParams_Parser()
An interface to the operating system, including Port based communication.
bool getDepthIntrinsicParam(yarp::os::Property &intrinsic) override
Get the intrinsic parameters of the depth camera.
bool setDepthMirroring(bool mirror) override
Set the mirroring setting of the sensor.
Property & addGroup(const std::string &key)
Add a nested group.
virtual bool setDepthMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
bool getRgbMirroring(bool &mirror) override
Get the mirroring setting of the sensor.
int getRgbWidth() override
Return the width of each frame.
constexpr yarp::conf::vocab32_t VOCAB_RESOLUTION
virtual bool setRgbMirroring(bool mirror)=0
Set the mirroring setting of the sensor.
virtual bool getRgbResolution(int &width, int &height)
Get the resolution of the rgb image from the camera.
constexpr yarp::conf::vocab32_t VOCAB_IS
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
An interface for retrieving intrinsic parameter from a depth camera.
virtual int getRgbWidth()=0
Return the width of each frame.
virtual int getRgbHeight()=0
Return the height of each frame.
int getDepthWidth() override
Return the height of each frame.
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
virtual bool setDepthAccuracy(double accuracy)=0
Set the minimum detectable variation in distance [meter] when possible.
A class for storing options and configuration information.
Implement_DepthVisualParams_Sender(os::Port &port)
bool getDepthFOV(double &horizontalFov, double &verticalFov) override
Get the field of view (FOV) of the depth camera.
virtual int getDepthWidth()=0
Return the height of each frame.
bool setDepthClipPlanes(double nearPlane, double farPlane) override
Set the clipping planes of the sensor.
bool configure(IDepthVisualParams *interface)