icub-tech-iit / ergocub-gazebo-simulations

Repository containing the models and the simulations for ergoCub
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Change in the origin of the link in case of box shape #3

Closed CarlottaSartore closed 3 years ago

CarlottaSartore commented 3 years ago

When changing a link of Box shape, the output urdf does not contain changes w.r.t. the link origin.

I saw that in the function for modifying the link origin for the box, i.e. https://github.com/icub-tech-iit/ergocub-gazebo-simulations/blob/7c48f376a4a1af4748432f1d421a3d026e72c7ba/scripts/modifiers.py#L113-L127 The following line is missing:
visual_obj.origin = xyz_rpy_to_matrix(xyz_rpy)

By adding it, in my machine I can see the changes in the origin in the modified urdf

CarlottaSartore commented 3 years ago

I noticed that by adding the aforementioned line, the robot morphology appears wrongly, e.g. for the following values:

[torso]
dimension = 2.0
density = 1.0

image

I have tried to play a bit with the origin_modifier values but I was not able to find values for which the robot appears correctly

GrmanRodriguez commented 3 years ago

Yes I ran into the same issue, I'll need to check what happens, my theory is that there are some extra joints or links that don't need to be modified (before since the origins weren't modified we didn't notice).

I'll look into this with more care and give an update.

GrmanRodriguez commented 3 years ago

Found the error (with the help of @Nicogene):

Fixing these two problems allows for proper resizing of the torso

PR coming soon

Nicogene commented 3 years ago

Fixed by #5