iCub-main
Loading...
Searching...
No Matches
Classes | Public Member Functions | Friends | List of all members
iCub::perception::SpringyFingersModel Class Reference

A class that provides the user with a suitable framework to deal with the elastic approach for the problem of detecting contacts of fingers with external forces. More...

#include <springyFingers.h>

+ Inheritance diagram for iCub::perception::SpringyFingersModel:

Public Member Functions

 SpringyFingersModel ()
 Constructor.
 
bool fromProperty (const yarp::os::Property &options)
 Configure the model taking its parameters from a Property object.
 
void toProperty (yarp::os::Property &options) const
 Return a Property representation of all the model parameters.
 
bool toStream (std::ostream &str) const
 Similar to the toProperty() method but it operates on output streams (e.g.
 
bool calibrate (const yarp::os::Property &options)
 Execute the fingers calibration.
 
bool isCalibrated () const
 Return the internal status of the calibration.
 
bool getOutput (yarp::os::Value &out) const
 Retrieve the complete output of the model.
 
virtual ~SpringyFingersModel ()
 Destructor.
 
- Public Member Functions inherited from iCub::perception::Model
 Model ()
 Constructor.
 
std::string getName () const
 Retrieve the model name.
 
void attachNode (Node &node)
 Attach a node object to the model.
 
NodegetNode (const std::string &name) const
 Retrieve an attached node by its name.
 
virtual ~Model ()
 Destructor.
 

Friends

class CalibThread
 

Additional Inherited Members

- Protected Member Functions inherited from iCub::perception::Model
virtual void printMessage (const int logtype, const int level, const char *format,...) const
 
- Protected Attributes inherited from iCub::perception::Model
std::string name
 
int verbosity
 
std::map< std::string, Node * > nodes
 

Detailed Description

A class that provides the user with a suitable framework to deal with the elastic approach for the problem of detecting contacts of fingers with external forces.

Definition at line 204 of file springyFingers.h.

Constructor & Destructor Documentation

◆ SpringyFingersModel()

SpringyFingersModel::SpringyFingersModel ( )

Constructor.

Definition at line 261 of file springyFingers.cpp.

◆ ~SpringyFingersModel()

SpringyFingersModel::~SpringyFingersModel ( )
virtual

Destructor.

Definition at line 835 of file springyFingers.cpp.

Member Function Documentation

◆ calibrate()

bool SpringyFingersModel::calibrate ( const yarp::os::Property &  options)
virtual

Execute the fingers calibration.

Parameters
optionsa Property containing the calibration parameters. Available options are:
finger: a string that encodes the finger to calibrate; it can be "thumb", "index", "middle", "ring", "little", "all", "all_serial", "all_parallel". The special tags "all" and "all_serial" serve to calibrate all the fingers consecutively, whereas the tag "all_parallel" allows calibrating all the fingers at the same time. Moreover, if a list is provided in place of a string - e.g. ("thumb" "little" "middle") - then the specified fingers are calibrated in parallel.
Returns
true/false on success/failure.

Implements iCub::perception::Model.

Definition at line 505 of file springyFingers.cpp.

◆ fromProperty()

bool SpringyFingersModel::fromProperty ( const yarp::os::Property &  options)
virtual

Configure the model taking its parameters from a Property object.

Parameters
optionsa Property containing the configuration parameters. Available options are:
name: the name of the model.
type: the handedness type; it can be either "left" or "right".
robot: the name of the robot to connect to; e.g. "icub" or "icubSim".
carrier: the protocol used to connect yarp streaming ports; e.g. "udp", "mcast", "tcp".
verbosity: an integer that accounts for the verbosity level of model print-outs.
Returns
true/false on success/failure.

Implements iCub::perception::Model.

Definition at line 268 of file springyFingers.cpp.

◆ getOutput()

bool SpringyFingersModel::getOutput ( yarp::os::Value &  out) const
virtual

Retrieve the complete output of the model.

Parameters
outa Value containing the model output in the form: (thumb_out index_out ... little_out), where the finger_out is the output of the corresponding finger.
Returns
true/false on success/failure.

Implements iCub::perception::Model.

Definition at line 695 of file springyFingers.cpp.

◆ isCalibrated()

bool SpringyFingersModel::isCalibrated ( ) const
virtual

Return the internal status of the calibration.

Returns
true/false on calibrated/uncalibrated-failure.

Implements iCub::perception::Model.

Definition at line 807 of file springyFingers.cpp.

◆ toProperty()

void SpringyFingersModel::toProperty ( yarp::os::Property &  options) const
virtual

Return a Property representation of all the model parameters.

Parameters
optionsa Property filled with the configuration parameters.

Implements iCub::perception::Model.

Definition at line 425 of file springyFingers.cpp.

◆ toStream()

bool SpringyFingersModel::toStream ( std::ostream &  str) const
virtual

Similar to the toProperty() method but it operates on output streams (e.g.

string, ofstream, ...). It allows to better manage the storing of the configuration over files.

Parameters
strthe reference to the output stream.
Returns
true/false on success/failure.
See also
toProperty

Implements iCub::perception::Model.

Definition at line 468 of file springyFingers.cpp.

Friends And Related Symbol Documentation

◆ CalibThread

friend class CalibThread
friend

Definition at line 256 of file springyFingers.h.


The documentation for this class was generated from the following files: