Closed CarlottaSartore closed 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
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
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.
Found the error (with the help of @Nicogene):
calculate_origin_from_dimensions
had to be set to False)calculate_origin_from_dimensions
is false set the origin to 0, instead of leaving it with its original valueFixing these two problems allows for proper resizing of the torso
PR coming soon
Fixed by #5
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