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

Modify origin of assigned collisions in simmechanics-generated Gazebo-related models for sole links after sole link frame location was changed #175

Closed
wants to merge 2 commits into from

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Sep 20, 2023

Fix #174 .

In #158 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 aae9cd6#diff-4a8f86568a5c3c3a54aa41e5ae088cbcb40bbfd3a63077a9d2c760840494cf1fL239), to obtain:

newCollisionZ = oldCollisionZ + (newVisualZ - oldVisualZ)
= 0.003 + (0.9335 - 0.9558 )
= -0.0193

In #158 the location
of the frames of the links of the soles ( (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 aae9cd6#diff-4a8f86568a5c3c3a54aa41e5ae088cbcb40bbfd3a63077a9d2c760840494cf1fL239),
to obtain:
newCollisionZ = oldCollisionZ + (newVisualZ - oldVisualZ)
              = 0.003         + (0.9335     - 0.9558    )
              = -0.0193
@traversaro traversaro changed the title Modify origin of assigned collisions for sole links Modify origin of assigned collisions for sole links after sole link frame location was changed Sep 20, 2023
@traversaro traversaro changed the title Modify origin of assigned collisions for sole links after sole link frame location was changed Modify origin of assigned collisions in simmechanics-generated Gazebo-related models for sole links after sole link frame location was changed Sep 20, 2023
@Nicogene
Copy link
Member

Closing in favour of:

@Nicogene Nicogene closed this Sep 20, 2023
@Nicogene Nicogene deleted the fix174 branch October 17, 2023 12:45
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.

2 participants