icub-models
icub-models copied to clipboard
iCubGenova09 hip pitch limits differ from robot configuration
Currently the hip_pitch
upper joint limits in the iCubGenova09 model are set to 115 degrees (2.007128639793479 rad).
This value looks to be much different from the actual limits in robots configuration. In particular, that value is matching previous values of joint limits, but they have been changed in https://github.com/robotology/robots-configuration/commit/1a88059334cac87d83a2816864cbc94c2e3ae699, and are now set to be:
- 94 degrees in the
mechanical
- 90 degrees in the
motorControl
cc @S-Dafarra @mebbaid
As you can see in https://github.com/robotology/robots-configuration/blob/8a37d27138f722b0fc35084840c70a8637355ecd/iCubGenova09/calibrators/left_leg-calib.xml#L25, actually 93deg is the value of the hard stop. In this way, when ar 0deg, the leg is straight.
We should then change the limit in the urdf as well (via icub-models-generator
). Not sure thou what value we should use (94, 93, 90?)
@pattacini do you have any idea on the "right" limits?
The difference between 94 deg (or 93 deg) and 90 deg is clear: the former is the hard limit (mechanical), whereas the latter is the soft limit (software). At this point, I don't know what is the strategy used in Gazebo. I would set that limit, hard or soft, in accordance with the other joints.
Concerning the difference between 94 deg (in mechanicals) and 93 deg (in calibrators), I've frankly no clue. Calling for @ale-git then.
The difference between 94 deg (or 93 deg) and 90 deg is clear: the former is the hard limit (mechanical), whereas the latter is the soft limit (software). At this point, I don't know what is the strategy used in Gazebo. I would set that limit, hard or soft, in accordance with the other joints.
Historically (I am a bit out of time to find the issue, ping me if you are interested) the one that we specified in .urdf
have been the hard limits, while the software limits have been specified in the .ini configuration files of gazebo-yarp-plugins (https://github.com/robotology/icub-models-generator/blob/9c2ef28669a1af0d5f351ba2b9e644a8b9af0bd4/simmechanics/data/icub3/conf/gazebo_icub_right_leg.ini#L70). The logic is that the phyisics engine should be the one in charge of enforcing the hard limits (as the nature in reality is the one in charge of enforcing the "hard limits" via a contact) while gazebo-yarp-plugins is enforcing the soft limits.
Concerning the difference between 94 deg (in mechanicals) and 93 deg (in calibrators), I've frankly no clue. Calling for @ale-git then.
I think this could be due to the fact that we might have changed those limits while tuning the incremental calibration. Maybe because of differences in the mechanical assembly of the two legs, the limits appear to be different.
About the calibration value we set it to 93 because it was the value shown by the yarpmotorgui after absolute calibration, so that in this way there would have been no changes after switching to hard stop calibration. 94 or 93 degrees for hardware limits doesn't make any difference in practice, by the way it would be more correct to move the hardware limit to 93 in order to match the calibration value.
Thanks @S-Dafarra and @ale-git for the feedback 👍🏻
by the way it would be more correct to move the hardware limit to 93 in order to match the calibration value.
Agree on this 👍🏻 @S-Dafarra, what about applying the tiny fix in your fork? The integration back on upstream would be easier this way.
I was just checking the values. Right now, when calibrating the right leg, we expect the limit to be at 93.2 (see https://github.com/ami-iit/robots-configuration/blob/fab02fe65329fb7b30068e6586c8ab99f0c72a9b/iCubGenova09/calibrators/right_leg-calib.xml#L25). Is that 0.2 a problem of we set the hardware limit to 93? Would it make more sense to use 93.5, or just keep 94?
Is that 0.2 a problem of we set the hardware limit to 93? Would it make more sense to use 93.5, or just keep 94?
I would call for @ale-git's educated opinion on that.