robotology / peripersonal-space

This repository deals with the implementation of peripersonal space representations on the iCub humanoid robot.
GNU General Public License v2.0
1 stars 4 forks source link

skinPart indexing #9

Closed matejhof closed 9 years ago

matejhof commented 9 years ago

In iCubDblTchThrd.h, there is

 // SkinPart to be handled
    // it can be either 2 (forearm_left), 5 (forearm_right)
    // or even 3 (upperarm_left) and 6 (upperarm_right) [TO DO]
    int skinPart;

which is consistent with iCub::skinDynLib::SkinPart (skinDynLib/common.h)

enum SkinPart { 
    SKIN_PART_UNKNOWN=0, 
    SKIN_LEFT_HAND, SKIN_LEFT_FOREARM, SKIN_LEFT_UPPER_ARM, 
    SKIN_RIGHT_HAND, SKIN_RIGHT_FOREARM, SKIN_RIGHT_UPPER_ARM, 
    SKIN_FRONT_TORSO, LEFT_LEG_UPPER, LEFT_LEG_LOWER, LEFT_FOOT,
    RIGHT_LEG_UPPER, RIGHT_LEG_LOWER, RIGHT_FOOT,
    SKIN_PART_ALL, SKIN_PART_SIZE
};

but should be replaced by the enum. What you think?

alecive commented 9 years ago

Yes, I agree.

matejhof commented 9 years ago

In addition, in utils.h, the skinPart class has a member "name", which is then assigned "left_forearm", for example, in setTaxelPosesFromFile. I suggest to replace the string name with skindynlib SkinPart enum.

alecive commented 9 years ago

@matejhof btw, in my library there is already a skinPart class which is different from the skinPart enum present in the skinDynLib. Honestly, I'd rather prefer mine as an implementation of a skin part (i.e. a proper class with a name, a vector of taxels that belong to it, and some related methods). My question is: can this incur with some problems in your module?