-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend SkinDynLib (fixes #149) #151
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…el and skinPart classes.
…ft here. Further, moved Pos and Nrm members of the Taxel class to Position and Normal
…der to comply with old conventions
… files. It can now work with both files.
…d put it back to empty calibrations (ref robotology#124)
… with the name of the member in the skinPart class
… changed members that start with capital letters to lowercase letters
Closed
Merging after chat with @lornat75 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, there is no standard high-level API for the skin on the iCub. What I'm referring to, is a set of classes that ease and standardize the process of handling single taxels / skin parts / file management. To this end, I propose and extension of the
skinDynLib
library with some tools I implemented inhttps://github.com/alecive/periPersonalSpace
and might be useful for other users.1. New Classes
1.1. CLASS 1 :
Taxel
- the basic elementBasic Members
ID
Position
Normal
FoR
Pos
as translational component;z-axis
coincident withNrm
;x-axis
andy-axis
are chosen arbitrarily on the plane normal toNrm
WRFposition
px
Methods
Various constructors,
toString()
,print()
, copy operator, etc), but no method to assign the aforementioned members (see below).1.2. CLASS 2 :
skinPart
It is a collection of taxels (it is way too similar to the
SkinPart
enum (cf. http://wiki.icub.org/brain/namespaceiCub_1_1skinDynLib.html#ad9eb09d94574e8020c27676ca5e9bdfc ) already used in the library, but I don't know how to call it better [any help?]).Basic Members
string name
vector<Taxel*> taxels
string spatial_mapping
taxel
(i.e.1:1
mapping) orpatch
(i.e. a mapping where each taxel is represented by the central taxel of the triangular patch it belongs - if the skinPart has triangular patchesvector<int> taxel2Repr
map<unsigned int, list<unsigned int> > repr2TaxelList
Methods
toString()
,print()
, copy operator, etcskinGui
txt files (as they are https://github.com/robotology/icub-main/tree/master/app/skinGui/conf/positions )1.3. CLASS 3 :
iCubSkin
It is a collection of skinParts , useful to have everything in one place : it lets the skin to be populated with the same interface used for the skinmanager.
Basic Members
vector<skinPart> sp
Methods
toString()
,print()
, copy operator, etcbool configureSkinFromFile(const std::string &_from="skinManAll.ini", const std::string &_context="skinGui");
: it reads the same file read by theskinManager
, and creates skinParts accordingly.2. What changes
2.1. New classes to play with
The new classes greatly simplify the process of managing position files. E.g., this snippet will create a
iCubSkin
class with 7skinPart
(s), each of them properly populated.2.2. New configuration files that break compatibility with the past (but are already taken care of)
From now on, the position files in https://github.com/robotology/icub-main/tree/master/app/skinGui/conf/positions will change from this:
to a more
.ini
like convention, i.e. this:2.3.
SkinDynLib
is now compliant with the new naming conventionIn agreement with @traversaro , we decided to modify the array called
SkinParts_s
and available in https://github.com/robotology/icub-main/blob/master/src/libraries/skinDynLib/include/iCub/skinDynLib/common.h to what described in #124 (theLink Name
field) and #57 . By doing so, we explicitly relate a skinPart to its link, and we remove redundancies throughout the codebase.So, I moved from this:
to this:
3. Important note
Everything has been tested and works fine, but I still miss the testing of the
skinManager
on a real iCub (no one is available currently). After that, everything can be merged gracefully 😄