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

Add couplingICubHandMk2 device coupling handler #995

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

Nicogene
Copy link
Member

@Nicogene Nicogene commented Nov 28, 2024

This PR adds the couplingICubHandMk2 device driver, that implement the IJointCoupling interface:

@Nicogene Nicogene self-assigned this Nov 28, 2024
@Nicogene Nicogene changed the base branch from master to devel November 28, 2024 14:43
@Nicogene
Copy link
Member Author

This work bring to light a thing to be understand/discussed related to devices that are outside the YARP repository but want to exploit the param parser generation feature.
In:

We added inside the relative devices' CMakeLists:

  option(ALLOW_DEVICE_PARAM_PARSER_GENERATION "Generate the param parser for foo device" OFF)

this option is forwarded in order to enable the parser generation.

@randaz81 is it the correct way the external repositories for exploiting this new feature?
Maybe we need to add this option in the root CMakeLists?

cc @traversaro @martinaxgloria

@traversaro
Copy link
Member

traversaro commented Nov 28, 2024

I guess that we can simply leave the option not set, as we do for the similar ALLOW_IDL_GENERATION option? As anyhow the option is set to OFF in https://github.com/robotology/yarp/blob/77d31ce3413fa3c8b4feeb9b6fe92694530c449a/cmake/YarpDeviceParamsParserGenerator.cmake#L9, I guess we need to define it before only if we want a different default value (for example ON).

@pattacini pattacini requested a review from Copilot November 28, 2024 15:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 8 changed files in this pull request and generated 18 suggestions.

Files not reviewed (5)
  • src/libraries/icubmod/CMakeLists.txt: Language not supported
  • src/libraries/icubmod/couplingICubHandMk2/CMakeLists.txt: Language not supported
  • src/libraries/icubmod/couplingICubHandMk2/CouplingICubHandMk2.cpp: Language not supported
  • src/libraries/icubmod/couplingICubHandMk2/CouplingICubHandMk2.h: Language not supported
  • src/libraries/icubmod/couplingICubHandMk2/CouplingICubHandMk2_ParamsParser.h: Language not supported

src/libraries/icubmod/couplingICubHandMk2/README.md Outdated Show resolved Hide resolved
src/libraries/icubmod/couplingICubHandMk2/README.md Outdated Show resolved Hide resolved
src/libraries/icubmod/couplingICubHandMk2/README.md Outdated Show resolved Hide resolved
src/libraries/icubmod/couplingICubHandMk2/README.md Outdated Show resolved Hide resolved
src/libraries/icubmod/couplingICubHandMk2/README.md Outdated Show resolved Hide resolved
@Nicogene Nicogene force-pushed the feat/addCouplingICubHandMk2 branch 2 times, most recently from 1d38a6a to b371828 Compare November 29, 2024 11:07
@Nicogene
Copy link
Member Author

Nicogene commented Nov 29, 2024

In:

I managed to merge all the coupling handlers (we used to have one separated per finger) into one.

couplingICubHandMk2 is handling 20 physical joints and 9 actuated axes.
I don't know who could review it (maybe @traversaro @PasMarra @xEnVrE ?) in any case I need to give a try, in this way instead of having 10 inis (2x5 inis) for the hands we just need one ini per hand like this one:

disableImplicitNetworkWrapper
yarpDeviceName left_hand_hardware_device

jointNames l_hand_thumb_0_joint l_hand_thumb_1_joint l_hand_thumb_2_joint l_hand_thumb_3_joint l_hand_index_0_joint l_hand_index_1_joint l_hand_index_2_joint l_hand_index_3_joint l_hand_middle_0_joint l_hand_middle_1_joint l_hand_middle_2_joint l_hand_middle_3_joint l_hand_ring_0_joint l_hand_ring_1_joint l_hand_ring_2_joint l_hand_ring_3_joint l_hand_little_0_joint l_hand_little_1_joint l_hand_little_2_joint l_hand_little_3_joint

min_stiffness 0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0
max_stiffness 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0
min_damping   0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0
max_damping   100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0

[TRAJECTORY_GENERATION]
trajectory_type minimum_jerk

[COUPLING]
device                   couplingICubHandMk2
actuatedAxesNames        l_hand_finger l_thumb_oppose l_thumb_proximal l_thumb_distal l_index_proximal l_index_distal l_middle_proximal l_middle_distal l_pinky
actuatedAxesPosMin       0.0  0.0  0.0  0.0   0.0  0.0   0.0  0.0   0.0
actuatedAxesPosMax       60.0 90.0 90.0 180.0 90.0 180.0 90.0 180.0 270.0

[POSITION_CONTROL]
controlUnits  metric_units
controlLaw    joint_pid_gazebo_v1
kp            0.1   0.1   0.1   0.1  0.1   0.1   0.1   0.1  0.1   0.1   0.1   0.1  0.1   0.1   0.1   0.1  0.1   0.1   0.1   0.1
kd            0.01  0.01  0.01  0.01 0.01  0.01  0.01  0.01 0.01  0.01  0.01  0.01 0.01  0.01  0.01  0.01 0.01  0.01  0.01  0.01
ki            0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0
maxInt        9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999
maxOutput     9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999
shift         0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0
ko            0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0
stictionUp    0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0
stictionDwn   0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0

[VELOCITY_CONTROL]
velocityControlImplementationType integrator_and_position_pid
controlUnits  metric_units
controlLaw    joint_pid_gazebo_v1
kp            8.726 8.726 8.726 5.235 8.726 8.726 8.726 5.235 8.726 8.726 8.726 8.726 8.726 8.726 8.726 8.726 8.726 8.726 8.726 8.726
kd            0.035 0.035 0.035 0.002 0.035 0.035 0.035 0.002 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035 0.035
ki            0.002 0.002 0.002 0.0   0.002 0.002 0.002 0.0   0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002
maxInt        9999  9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999  9999  9999  9999  9999  9999  9999  9999
maxOutput     9999  9999  9999  9999  9999 9999  9999  9999  9999 9999  9999  9999  9999  9999  9999  9999  9999  9999  9999  9999
shift         0.0   0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
ko            0.0   0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
stictionUp    0.0   0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0
stictionDwn   0.0   0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0  0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0   0.0

[IMPEDANCE_CONTROL]
controlUnits  metric_units
controlLaw    joint_pid_gazebo_v1
stiffness     0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0
damping       0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0 0.0   0.0   0.0   0.0

[LIMITS]
jntPosMax 0.0    0.0 20.0 20.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0 90.0
jntPosMin -20.0  0.0  0.0 0.0  0.0  0.0  0.0  0.0  0.  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  90.0 90.0
jntVelMax 100.0  100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0 100.0

@Nicogene Nicogene force-pushed the feat/addCouplingICubHandMk2 branch from b371828 to fd86701 Compare December 18, 2024 10:50
@Nicogene Nicogene marked this pull request as ready for review December 18, 2024 13:45
@Nicogene
Copy link
Member Author

This PR has been tested with:

@pattacini @traversaro it is ready to be reviewed/merged

@pattacini pattacini merged commit fb7f977 into robotology:devel Dec 18, 2024
4 of 8 checks passed
@Nicogene Nicogene deleted the feat/addCouplingICubHandMk2 branch December 18, 2024 14:46
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.

3 participants