Skip to content
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

Wrong bodyPartId is assigned to skin on legs in skinContactList on /skinManager/skin_events:o #933

Closed
rustlluk opened this issue Jan 12, 2024 · 4 comments · Fixed by #936
Assignees

Comments

@rustlluk
Copy link
Contributor

rustlluk commented Jan 12, 2024

Bug description

When reading data through skinManager on /skinManager/skin_events:o (Reading High Level Contact Data
), skin on legs (LEFT/RIGHT_LEG_UPPER, LEFT/RIGHT_LEG_LOWER, LEFT/RIGHT_FOOT) get correct skinPart assigned with respect to skinPart enum in skinDynLib/common.h, but bodyPartId is always 0 (BODY_PART_UNKNOWN).

Steps to reproduce

Run skinManager with any config that contains skin on legs and read data on /skinManager/skin_events:o

Expected behavior

The correct bodyPartId for skin on left leg should be 5 (LEFT_LEG), and 6 (RIGHT_LEG) for the right leg. From BodyPart enum.

Example repository

No response

Additional context

The error is probably coming from not having the association of skin on legs to body part in SkinPart_2_BodyPart in skinDynLib/common.h and thus function iCub::skinDynLib::getBodyPart(SkinPart s) returns BODY_PART_UNKNOWN. But I am not brave enough to compile and test the library on our robot :)

@rustlluk rustlluk changed the title Skin on legs get assigned wrong bodyPartId in skinContactList on /skinManager/skin_events:o Wrong bodyPartId is assigned to skin on legs in skinContactList on /skinManager/skin_events:o Jan 12, 2024
@pattacini pattacini changed the title Wrong bodyPartId is assigned to skin on legs in skinContactList on /skinManager/skin_events:o Wrong bodyPartId is assigned to skin on legs in skinContactList on /skinManager/skin_events:o Jan 12, 2024
@pattacini
Copy link
Member

Thanks @rustlluk for reporting 👍🏻
We will probably deal with this while checking #932.

@traversaro
Copy link
Member

traversaro commented Jan 12, 2024

@rustlluk do you actually are using bodyPartId somewhere? That part of the code is quite iCub-centric, and it would be great to make it more general. However, to do so we would need to understand how people are actually using data like bodyPartId . See also the related PR #462, that was not merged back in time but it could be useful in making the code less iCub-centric and more generic.

@rustlluk
Copy link
Contributor Author

Well, actually not. I would say that bodyPartId and linkNumber are redundant, as you can easily extract both from skinPart. @traversaro

I even looked to an old code I used with our Nao with skin and the only thing I did with bodyPartId was saving it to log.

@Nicogene Nicogene self-assigned this Jan 22, 2024
@Nicogene
Copy link
Member

Unfortunately the iCub we have here have not the legs, but I can backtrack the code that assigns the bodypart and try to fix it, the other parts are ok instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants