iCub-main
|
Class that encloses everything relate to a skinPart. More...
#include <skinPart.h>
Public Member Functions | |
skinPart () | |
Constructor. | |
skinPart (const std::string &_filePath) | |
Constructor with the configuration file to load from. | |
skinPart (const skinPart &_sp) | |
Copy constructor. | |
skinPart & | operator= (const skinPart &_sp) |
Copy Operator. | |
bool | setTaxelPosesFromFile (const std::string &_filePath, const std::string &_spatial_sampling="default") |
Populates the skinPart by reading from a file. | |
bool | initRepresentativeTaxels () |
Initializes the mapping between the taxels and their representatives (i.e. | |
int | getTaxelsSize () |
gets the size of the taxel vector (it differs from skinPartBase::getSize()) | |
void | clearTaxels () |
Clears the vector of taxels properly and gracefully. | |
void | print (int verbosity=0) |
Print Method. | |
std::string | toString (int precision=0) |
toString Method | |
~skinPart () | |
Destructor. | |
Public Member Functions inherited from iCub::skinDynLib::skinPartBase | |
skinPartBase () | |
Constructor. | |
skinPartBase (const skinPartBase &_spb) | |
Copy constructor. | |
virtual skinPartBase & | operator= (const skinPartBase &_sp) |
Copy Operator. | |
void | setName (const std::string &_name) |
Sets the name of the class. | |
std::string | getName () |
Gets the name of the class. | |
void | setSize (int _size) |
Sets the size of the class. | |
int | getSize () |
Gets the size of the class. | |
void | setVersion (const std::string &_version) |
Sets the version ("V1" / "V2" / "V2.1") | |
std::string | getVersion () |
Gets the version. | |
Public Attributes | |
std::vector< Taxel * > | taxels |
List of taxels that belong to the skinPart. | |
std::string | spatial_sampling |
Spatial_sampling used in building up the skinPart class. | |
std::vector< int > | taxel2Repr |
Indexing variable used in the case of reducing the resolution - e.g. | |
std::map< int, std::list< unsigned int > > | repr2TaxelList |
Mapping in the opposite direction Indexed by representative taxel IDs, it stores lists of the taxels being represented - e.g. | |
Public Attributes inherited from iCub::skinDynLib::skinPartBase | |
std::string | name |
int | size |
std::string | version |
std::recursive_mutex | recursive_mtx |
Protected Member Functions | |
bool | setTaxelPosesFromFileOld (const std::string &_filePath) |
Populates the skinPart by reading from a file - old convention. | |
bool | mapTaxelsOntoThemselves () |
Maps the taxels onto themselves, performing a 1:1 mapping. | |
Class that encloses everything relate to a skinPart.
It consists of a std::vector of Taxel(s), and a number of methods for loading and populating these taxels from files.
Definition at line 145 of file skinPart.h.
skinPart::skinPart | ( | ) |
Constructor.
Definition at line 79 of file skinPart.cpp.
skinPart::skinPart | ( | const std::string & | _filePath | ) |
Constructor with the configuration file to load from.
_filePath | is the absolute path of the file to read |
Definition at line 84 of file skinPart.cpp.
skinPart::skinPart | ( | const skinPart & | _sp | ) |
Copy constructor.
_sp | is the skinPart to copy from |
Definition at line 89 of file skinPart.cpp.
skinPart::~skinPart | ( | ) |
Destructor.
Definition at line 395 of file skinPart.cpp.
void skinPart::clearTaxels | ( | ) |
Clears the vector of taxels properly and gracefully.
WARNING: it deletes the pointed objects as well!
Definition at line 335 of file skinPart.cpp.
int skinPart::getTaxelsSize | ( | ) |
gets the size of the taxel vector (it differs from skinPartBase::getSize())
Definition at line 330 of file skinPart.cpp.
bool skinPart::initRepresentativeTaxels | ( | ) |
Initializes the mapping between the taxels and their representatives (i.e.
the centers of the triangles)
Definition at line 313 of file skinPart.cpp.
|
protected |
Maps the taxels onto themselves, performing a 1:1 mapping.
This has been made in order for the "taxel" spatial_sampling modality to be consistent with the "triangle" sampling, thus maintaining integrity into taxel2Repr and repr2TaxelList
Definition at line 285 of file skinPart.cpp.
Copy Operator.
_sp | is the skinPart to copy from |
Definition at line 94 of file skinPart.cpp.
|
virtual |
Print Method.
verbosity | is the verbosity level |
Reimplemented from iCub::skinDynLib::skinPartBase.
Definition at line 349 of file skinPart.cpp.
|
virtual |
Populates the skinPart by reading from a file.
_filePath | is the full absolute path of the file |
_spatial_sampling | is the type of spatial sampling to perform (default "default") if "default", the spatial_sampling will be read from file if "taxel" or "triangle", this will be the spatial_sampling performed |
Reimplemented from iCub::skinDynLib::skinPartBase.
Definition at line 118 of file skinPart.cpp.
|
protected |
Populates the skinPart by reading from a file - old convention.
Spatial Sampling will be forced to "taxel"
_filePath | is the full absolute path of the file |
Definition at line 234 of file skinPart.cpp.
|
virtual |
toString Method
verbosity | is the verbosity level |
Reimplemented from iCub::skinDynLib::skinPartBase.
Definition at line 386 of file skinPart.cpp.
std::map<int, std::list<unsigned int> > iCub::skinDynLib::skinPart::repr2TaxelList |
Mapping in the opposite direction Indexed by representative taxel IDs, it stores lists of the taxels being represented - e.g.
all taxels of a triangle
Definition at line 170 of file skinPart.h.
std::string iCub::skinDynLib::skinPart::spatial_sampling |
Spatial_sampling used in building up the skinPart class.
It can be either full, i.e. "taxel", or "triangle", where the latter remaps the individual taxels onto the center taxels of their respective triangular module (composed of 10 taxels, but 12 values on the port - 2 are thermal pads)
Definition at line 158 of file skinPart.h.
std::vector<int> iCub::skinDynLib::skinPart::taxel2Repr |
Indexing variable used in the case of reducing the resolution - e.g.
taking only triangle centers The index into the vector is the taxel ID, the value stored is its representative
Definition at line 164 of file skinPart.h.
std::vector<Taxel*> iCub::skinDynLib::skinPart::taxels |
List of taxels that belong to the skinPart.
Definition at line 151 of file skinPart.h.