An abstract class that provides basic methods for interfacing with the data acquisition.
More...
#include <models.h>
|
| Model () |
| Constructor.
|
|
std::string | getName () const |
| Retrieve the model name.
|
|
void | attachNode (Node &node) |
| Attach a node object to the model.
|
|
Node * | getNode (const std::string &name) const |
| Retrieve an attached node by its name.
|
|
virtual bool | fromProperty (const yarp::os::Property &options)=0 |
| Configure the model taking its parameters from a Property object.
|
|
virtual void | toProperty (yarp::os::Property &options) const =0 |
| Return a Property representation of all the model parameters.
|
|
virtual bool | toStream (std::ostream &str) const =0 |
| Similar to the toProperty() method but it operates on output streams (e.g.
|
|
virtual bool | calibrate (const yarp::os::Property &options)=0 |
| Some kinds of models need to be calibrated to properly operate.
|
|
virtual bool | isCalibrated () const =0 |
| Return the internal status of the calibration.
|
|
virtual bool | getOutput (yarp::os::Value &out) const =0 |
| Provide the higher layers with the model output computed over the attached sensors.
|
|
virtual | ~Model () |
| Destructor.
|
|
|
virtual void | printMessage (const int logtype, const int level, const char *format,...) const |
|
An abstract class that provides basic methods for interfacing with the data acquisition.
Definition at line 61 of file models.h.
◆ Model()
◆ ~Model()
virtual iCub::perception::Model::~Model |
( |
| ) |
|
|
inlinevirtual |
◆ attachNode()
void Model::attachNode |
( |
Node & |
node | ) |
|
Attach a node object to the model.
- Parameters
-
node | the node object to be attached, so that the mode can employ it. |
Definition at line 73 of file models.cpp.
◆ calibrate()
virtual bool iCub::perception::Model::calibrate |
( |
const yarp::os::Property & |
options | ) |
|
|
pure virtual |
Some kinds of models need to be calibrated to properly operate.
This method executes the calibration phase.
- Parameters
-
options | a Property containing the calibration parameters. |
- Returns
- true/false on success/failure.
- Note
- Usually this method should call the corresponding calibrate method of all the nodes attached to the model.
-
For models that do not envisage any calibration, this method should always return true.
Implemented in iCub::perception::SpringyFingersModel, and iCub::perception::TactileFingersModel.
◆ fromProperty()
virtual bool iCub::perception::Model::fromProperty |
( |
const yarp::os::Property & |
options | ) |
|
|
pure virtual |
◆ getName()
std::string iCub::perception::Model::getName |
( |
| ) |
const |
|
inline |
Retrieve the model name.
- Returns
- a string containing the model name.
Definition at line 82 of file models.h.
◆ getNode()
Node * Model::getNode |
( |
const std::string & |
name | ) |
const |
Retrieve an attached node by its name.
- Parameters
-
name | the name of the attached node. |
- Returns
- the pointer to the node.
Definition at line 80 of file models.cpp.
◆ getOutput()
virtual bool iCub::perception::Model::getOutput |
( |
yarp::os::Value & |
out | ) |
const |
|
pure virtual |
◆ isCalibrated()
virtual bool iCub::perception::Model::isCalibrated |
( |
| ) |
const |
|
pure virtual |
◆ printMessage()
void Model::printMessage |
( |
const int |
logtype, |
|
|
const int |
level, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| const |
|
protectedvirtual |
◆ toProperty()
virtual void iCub::perception::Model::toProperty |
( |
yarp::os::Property & |
options | ) |
const |
|
pure virtual |
◆ toStream()
virtual bool iCub::perception::Model::toStream |
( |
std::ostream & |
str | ) |
const |
|
pure virtual |
◆ name
std::string iCub::perception::Model::name |
|
protected |
◆ nodes
std::map<std::string,Node*> iCub::perception::Model::nodes |
|
protected |
◆ verbosity
int iCub::perception::Model::verbosity |
|
protected |
The documentation for this class was generated from the following files:
- icub-main/src/libraries/perceptiveModels/include/iCub/perception/models.h
- icub-main/src/libraries/perceptiveModels/src/models.cpp