robotology / icub-models-generator

Resources and programs to generated models (URDF, SDF) of the iCub robot
14 stars 23 forks source link

Fix location of *_foot_* links in iCub3 models and add tests on the location of FT sensors #243

Closed traversaro closed 11 months ago

traversaro commented 12 months ago

The test added in the first commit of this PR ensures that the FT sensor frames origin are coincident with the origin of the frames of the child link of the joint to which they are attached, to ensure that they can be correctly simulated in Gazebo (see https://github.com/gazebosim/sdformat/issues/130). To get the test to work I also needed to update iDynTree to version 2.0.0, but that should not influence

See https://github.com/icub-tech-iit/ergocub-software/issues/146 for more details.

Note that the first commit of this PR will fail due to the problem discussed in https://github.com/icub-tech-iit/ergocub-software/issues/146, with error (see https://github.com/robotology/icub-models-generator/actions/runs/5532882398/jobs/10095587053?pr=243):

10: icub-model-test : translation between link l_foot_rear and sensor l_foot_rear_ft is non-zero, test failed, see  https://github.com/gazebosim/sdformat/issues/130  for more details.
10: icub-model-test : childLink_H_sensorFrame.getPosition(): 0 0 0.0223
10: icub-model-test : translation between link r_foot_rear and sensor r_foot_rear_ft is non-zero, test failed, see  https://github.com/gazebosim/sdformat/issues/130  for more details.
10: icub-model-test : childLink_H_sensorFrame.getPosition(): 0 0 0.0223
10: icub-model-test : translation between link l_foot_front and sensor l_foot_front_ft is non-zero, test failed, see  https://github.com/gazebosim/sdformat/issues/130  for more details.
10: icub-model-test : childLink_H_sensorFrame.getPosition(): 0 0 0.0223
10: icub-model-test : translation between link r_foot_front and sensor r_foot_front_ft is non-zero, test failed, see  https://github.com/gazebosim/sdformat/issues/130  for more details.
10: icub-model-test : childLink_H_sensorFrame.getPosition(): 0 0 0.0223

While the third commit fixes the tests by moving manually the origin of the links:

in the iCub3 simmechanics file, from having the origin aligned with the sole of the robot, to having the origin aligned with the FT sensor frame. Users interesting in getting the location of the sole should use the l_sole and r_sole frames, as documented in https://icub-tech-iit.github.io/documentation/icub_kinematics/icub-model-naming-conventions/icub-model-naming-conventions/#1-dof-joints .

traversaro commented 12 months ago

fyi @vpunithreddy @FabioBergonti @gabrielenava @GiulioRomualdi @G-Cervettini

traversaro commented 12 months ago

As discussed in https://github.com/icub-tech-iit/ergocub-software/issues/146#issuecomment-1635939950, for iCub3 and ergoCub 1.0 the fixes will be done at the software level and not at the CAD level, so at this point I think we can merge this PR, do you agree @Nicogene ?