Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Merged
merged 3 commits into from
Aug 7, 2023

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jul 12, 2023

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 gazebosim/sdformat#130). To get the test to work I also needed to update iDynTree to version 2.0.0, but that should not influence

See icub-tech-iit/ergocub-software#146 for more details.

Note that the first commit of this PR will fail due to the problem discussed in icub-tech-iit/ergocub-software#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:

  • r_foot_front
  • r_foot_rear
  • l_foot_front
  • l_foot_rear

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 traversaro changed the title Add tests on for iCub3 models location of FT sensors Add tests for iCub3 models on the location of FT sensors Jul 12, 2023
@traversaro traversaro changed the title Add tests for iCub3 models on the location of FT sensors Fix location of *_foot_* links in iCub3 models and add tests on the location of FT sensors Jul 12, 2023
@traversaro traversaro requested review from Nicogene and mfussi66 July 12, 2023 14:35
@traversaro
Copy link
Member Author

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

@traversaro
Copy link
Member Author

As discussed in icub-tech-iit/ergocub-software#146 (comment), 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 ?

@traversaro traversaro merged commit 2f94125 into master Aug 7, 2023
@traversaro traversaro deleted the ftorigintesticub3 branch August 7, 2023 13:00
traversaro added a commit that referenced this pull request Sep 20, 2023
Fix robotology/icub-models#209 .

In #243 the location of the frames of the links of the soles ( with names like `(r|l)_foot_(front|back)` ) have been moved to the origin of the FT sensors that connect them with the `(r|l)_ankle_2` link. All the quantities expressed in this frame have been automatically modified to account for its new location by the simmechanics-to-urdf script, except for the location of the assigned collision, that are hardcoded in the .yaml file . This created a regression, has it effectly moved the sole assigned collisions up, so the robot was actually touching the ground with the (r|l)_ankle_2 links, that do not have any contact parameter assigned.

This commit fixes the situation by taking the existing z value of the assigned collision origin, and adding the offset with which the other elements (visual, inertial) have been modified 
(see robotology/icub-models@799ae07#diff-9d811d6ae4a80f936a2466cdc3b852ac4fb6d6e3a4cd40d2c42e794f42d6415aL260), to obtain:

newCollisionZ = oldCollisionZ + (newVisualZ - oldVisualZ)
              = 0.003         + (0.9241470000000105     - 0.9464470000000105    )
              = -0.0193
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants