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

HandMk5CouplingHandler: refactor it in order to make it configurable #662

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

Nicogene
Copy link
Member

@Nicogene Nicogene commented Sep 7, 2023

It fixes #661

This is a first draft, I thoght that the configuration file will become:

[COUPLING]
icub_hand_mk5 (0 1 2 3 4 5 6 7 8 9 10 11) (l_thumb_add l_thumb_oc l_index_add l_index_oc l_middle_oc l_ring_pinky_oc reserved reserved reserved reserved reserved reserved) (0.0 0.0 0.0 0.0 0.0 0.0) (90.0 82.1 15.0 90.0 90.0 90.0)

[COUPLING_PARAMS]
L0x     -0.00555 -0.00555 -0.00555 -0.00555 -0.00555
L0y      0.00285  0.00285  0.00285  0.00285  0.00285
q2bias     180.0    180.0    180.0    180.0    180.0
q1off       4.29     4.29     4.29     4.29     4.29
k         0.0171   0.0171   0.0171   0.0171   0.0171
d        0.02006  0.02006  0.02006  0.02006  0.02006
l         0.0085   0.0085   0.0085   0.0085   0.0085
b        0.00624  0.00624  0.00624  0.00624  0.00624

Right now I am asking to specify all the coefficient for all the fingers, but @xEnVrE said that only thumb index and pinky is required, maybe I can ask only those?

cc @pattacini @traversaro

@Nicogene Nicogene linked an issue Sep 7, 2023 that may be closed by this pull request
@xEnVrE
Copy link
Contributor

xEnVrE commented Sep 7, 2023

Right now I am asking to specify all the coefficient for all the fingers, but @xEnVrE said that only thumb index and pinky is required, maybe I can ask only those?

In my opinion, I would leave them all just for clarity also considering that in the code they are easily handled within a for cycle and just once at configuration time.

I will review the PR within today and tomorrow.

Copy link
Contributor

@xEnVrE xEnVrE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Nicogene. I have added some comments for requested changes.

plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
@Nicogene Nicogene marked this pull request as ready for review September 11, 2023 09:58
@Nicogene
Copy link
Member Author

As suggested by @xEnVrE, with the usage of a map, we got rid of some functions that are now useless

Copy link
Contributor

@xEnVrE xEnVrE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Nicogene, I added some comments for requested changes. It seems that at the moment the code was not using the values for the middle and the ring and still using those of the index for them.

plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoardDriverCoupling.cpp Outdated Show resolved Hide resolved
@Nicogene
Copy link
Member Author

@xEnVrE for the pinkie/pinky I am a little confused what is the correct name, in the documentation there is a pinkie

immagine

In any case it is ok for me if we prefer pinky

@xEnVrE
Copy link
Contributor

xEnVrE commented Sep 11, 2023

for the pinkie/pinky I am a little confused what is the correct name, in the documentation there is a pinkie

Then there is a bit of a mix. In this part of the documentation:

image

pinky is used instead.

@Nicogene

Copy link
Contributor

@xEnVrE xEnVrE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @Nicogene

Important
We need to wait for icub-tech-iit/ergocub-software#169 to be ready for merging I guess.

Nicogene added a commit to icub-tech-iit/ergocub-software that referenced this pull request Sep 12, 2023
@Nicogene
Copy link
Member Author

@traversaro I think we can ignore the failures, they seems strange conda/windows failures that seems unrelated

 LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj' [D:\a\gazebo-yarp-plugins\gazebo-yarp-plugins\build\plugins\modelposepublisher\gazebo_yarp_modelposepublisher.vcxproj]
  Building Custom Rule D:/a/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/CMakeLists.txt

I saw it also in other repositories (icub-basic-demos)

if (disable_wrapper && !m_parameters.check("yarpDeviceName"))
{
yError() << "GazeboYarpControlBoard : missing yarpDeviceName parameter for one device in robot " << m_robotName;
return;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future, please avoid functional and whitespace changes in the same commit, thanks!

@traversaro
Copy link
Member

@Nicogene can you add a note in the CHANGELOG, also considering that (if I am not wrong) this change breaks old mk5 simulations, so there is a strict dependency between future gyp releases and ergocub-software releases.

@traversaro
Copy link
Member

@traversaro I think we can ignore the failures, they seems strange conda/windows failures that seems unrelated

 LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj' [D:\a\gazebo-yarp-plugins\gazebo-yarp-plugins\build\plugins\modelposepublisher\gazebo_yarp_modelposepublisher.vcxproj]
  Building Custom Rule D:/a/gazebo-yarp-plugins/gazebo-yarp-plugins/thrift/worldinterface/CMakeLists.txt

I saw it also in other repositories (icub-basic-demos)

See #664 . If you see this kind of environmental regression, please report them in new issues. Unfortunately in GitHub actions only the last person that modified the ci files is getting notification of CI failures (see #664), so it is not possible for me or any other mantainer to get all possible notifications.

@traversaro traversaro merged commit ca16bd0 into devel Sep 13, 2023
8 of 10 checks passed
@traversaro traversaro deleted the refactorMK5Coupling branch September 13, 2023 08:35
@xEnVrE xEnVrE mentioned this pull request Sep 18, 2023
traversaro added a commit that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Hand mk5.1 coupling handler
3 participants