-
Notifications
You must be signed in to change notification settings - Fork 35
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
[model-generation] Numerical instability due to low articulated body inertia in the iCub shoulder #121
Comments
Can you be a little clearer on the theory note? |
In the 2D case : http://mathb.in/45652 . The 3D case is similar . |
Got it. I agree on the 3D case. |
I think this can be also fixed by just enabling the implicit damping in Gazebo, see robotology/icub-models-generator#24 . This needs to be investigated. |
@traversaro , regarding the theory note, I noticed some typos. Could you check this review: Regarding the implicit damping, I've just tried it on the iCubGenova04 model generated from CAD and it didn't work. I still had to edit the inertial matrices. I've pushed the updated model to my fork of |
: ( . |
I think we need to try to fix this sooner or later. By the way, I never noticed at the time I increased the iCub inertias (around October/November 2013 to get Gazebo stability that a similar modification was performed also in the Atlas model for the VRC a few months before: I found this link in this paper, that is interesting and related to this issues:
Another interesting related pull request in
In particular, there are a few interesting options related to Gazebo-specific modifications that are worth checking out. The only problem is those options seems to be global to all the ode simulation, and this would mean that a iCub model spawned in a default Gazebo run would be unstable, that is clearly undesirable. |
Replying to https://github.com/robotology/icub-gazebo/issues/22#issuecomment-311278364 by @traversaro :
The modified links are
I didn't apply your "stretch" rule for now, just the quick solution setting the diagonal matrix inertia you've used on the |
Great, the number of links affected is limited! |
Moving the issue to icub-model-generator, as it seems to me that is more a model-generation related issue. |
Hi Traversaro from 2017, you never this this apparently. Better to move it! |
The mechanical department of iCub Facility recently extracted a URDF/SDF of the iCub v2.5 (with backpack and battery) from the CAD model of the robot, using the process described in https://www.icub.org/wiki/Creo_Mechanism_to_URDF .
That model was committed in robotology-legacy/icub-gazebo-legacy@0e631bd .
Tests performed with Gazebo 6 (i.e. ODE Physics Engine with Semi Explicit Euler integration with a fixed timestsamp of 1ms) and with a fixed base robot show that when the
*_shoulder_pitch
and*_shoulder_yaw
are close to be coincident (for example in the-90 90 0
configuration of the shoulder) then the simulation explodes.The reason why is apparently that given the relatively small dimensions of the
_shoulder_1
and_shoulder_2
links the associated apparent inertias seen by the*_shoulder_pitch
is low (~ 10^-4 Kg m^2 ) and that, coupled with a stiff position control by the low level PID, results in a system that is numerically difficult to integrate.Consistently with this theory, reducing the fixed timestamp to 0.1 ms solves the problem on ODE.
Anyway it is desirable to be able to provide a model that works flawless on the stock version of Gazebo. A possible way is to increase artificially the inertia matrices of
_shoulder_1
and_shoulder_2
given that most (all?) users will not concerned by such a negligible mismatch between reality and simulation (other differences, such as the fact that the transmission chain is not modeled, are orders of magnitude more relevant) .Theory note: multiplying an inertia matrix at the com by
K
without changing neither the mass nor the COM position is equivalent to stretch the mass distribution of the rigid body around the COM by a factor ofsqrt(k)
.With a quick check it seems that a multiplication of the inertia matrices of
_shoulder_1
and_shoulder_2
by 10 (i.e. a stretch of ~ 3.1623 ) is solving the issue.The text was updated successfully, but these errors were encountered: