Skip to content

Commit

Permalink
Modify origin of assigned collisions for sole links
Browse files Browse the repository at this point in the history
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
  • Loading branch information
traversaro committed Sep 20, 2023
1 parent b8c9fc0 commit 77a3d57
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions urdf/simmechanics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,22 @@ macro(generate_ergocub_simmechanics)
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: r_foot_rear
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: l_foot_front
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: l_foot_rear
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
")
endif()

Expand All @@ -149,22 +149,22 @@ macro(generate_ergocub_simmechanics)
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: r_foot_rear
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: l_foot_front
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: l_foot_rear
geometricShape:
shape: box
size: 0.117 0.100 0.006
origin: \"0.0 0.0 0.003 0.0 0.0 0.0\"
origin: \"0.0 0.0 -0.0193 0.0 0.0 0.0\"
- linkName: r_hip_1
geometricShape:
shape: box
Expand Down

0 comments on commit 77a3d57

Please # to comment.