-
Notifications
You must be signed in to change notification settings - Fork 289
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
Unbounded velocity growth observed with hydrodynamics plugin #1923
Comments
Of note: when commanding the prop in reverse ( |
There was a behavior change introduced recently which has been documented in #1888. Can you see if that helps? |
Thanks @azeey. Appropriate naming of those parameters appears (in my test run of N=1) to prevent the runaway condition. Parameters used:
The mis-naming of the second-order (and in the case of the demo, the only non-zero) damping terms, appears to be at the heart of the issue. Seems like appropriate course of action is:
|
Submitted minimal PR as described above, don't have time at the moment to investigate other options I enumerated. |
/cc @arjo129 |
This was fixed in #1888. The said fix has not yet been forward ported to Garden. I like the idea of checking the values and warning users in the event values lead to unbounded velocity growth. |
We have experienced the same problem in our project simulation, even using the correct naming for the coefficients of the Damping matrix. After deep investigation, I discovered that numerical computation instability can exist if the condition I tested this criterion using an adapted world file used in the hydrodynamics plugins unit tests in the ign gazebo 6.14.0. Thus, if someone could reproduce the crash and this criterion must be satisfied, as the criterion is a simple element-wise comparison, my first suggestion is to put a warning or even a fatal error informing the user about the problem.
|
Hi @mateusmenezes95 yes that is correct, as added mass is expressed in terms of an added unit instead of a percentage in the fossen equations instablilities could arise when |
Very nice @arjo129. Thanks for the fast reply 😄! Another suggestion may be to use the compensation method (named Method 1) suggested by @joaobrittoneto in his thesis that guarantees stability even when the criterion is unsatisfied. However, as reported in the results, this method may degrade the simulation result when there are body rotations. An option is to turn this compensation on/off by a parameter. |
I don't have time to add the compensation method but PRs are welcome! |
Sure! I will try to submit a pull request with the suggestions. |
I agree with @mateusmenezes95. The fluid_added_mass present in the inertial (which leverages DART's ability to handle 6x6 spatial inertia tensors) should be favored. It leads to a simpler and more robust solution. The only downturn is the reliance on DART itself (it's not supported by other physics engines). The added mass effect of the hydrodynamics plugin, IMHO, could be deprecated. |
I agree with you too. We should deprecate the added mass added by the
hydrodynamics plugin and rely ont the physics engine based one.
…On Tue, Jul 23, 2024, 9:28 PM João Britto ***@***.***> wrote:
I think that #1592 <#1592> solves
this issue for Gazebo Harmonic. What do you think @azeey
<https://github.com/azeey>?
I agree with @mateusmenezes95 <https://github.com/mateusmenezes95>. The
fluid_added_mass
<http://sdformat.org/tutorials?tut=added_mass_proposal&cat=pose_semantics_docs>
present in the inertial (which leverages DART's
<https://github.com/dartsim/dart/blob/main/dart/dynamics/Inertia.hpp#L123>
ability to handle 6x6 spatial inertia tensors) should be favored. It leads
to a simpler and more robust solution. The only downturn is the reliance on
DART itself (it's not supported by other physics engines).
The added mass effect of the hydrodynamics plugin, IMHO, could be
deprecated.
The current implementation, as known, is brittle. Doing a[k] = -Mrb^-1 *
Ma * a[k-1]
<https://github.com/gazebosim/gz-sim/blob/206def391d6ba23259ce8596e7256c2d705a9e53/src/systems/hydrodynamics/Hydrodynamics.cc#L492>
leads to instability when Ma > Mrb.
Trying to use the compensated terms, as mentioned in the references here
<#1923 (comment)>,
leads to a convoluted solution, vide a custom gazebo_underwater plugin
<https://github.com/rock-gazebo/simulation-gazebo_underwater/blob/master/src/GazeboUnderwater.cpp>
I helped to create where those terms are used.
—
Reply to this email directly, view it on GitHub
<#1923 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEEMQH7FFRSP3Y27GAXPOTZN2HC3AVCNFSM6AAAAAAVVWXWP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBVHAZTAMJQG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Environment
There appears to be a bug, which I believe to be related to the hydrodynamics plugin, which results in a model world velocity run-away. I've experienced this with my personal model, and it is reproducible in the AUV example provided by
[auv_controls.sdf](https://github.com/gazebosim/gz-sim/blob/gz-sim7/examples/worlds/auv_controls.sdf#L139)
Description
In my own simulation, the problem is not exhibited when the added mass terms are 0, or significantly smaller than the vehicle mass. I have adjusted the sign of the added mass terms in my own model (non-example LRAUV system) and this does not change the outcome.
I haven't had time yet to check the implementation of Fossen's Eqns in HydrodynamicsPlugins.cc.
I believe M_A (added mass matrix) should be positive definite, symmetric. Yet the terms that exist in
[auv_controls.sdf](https://github.com/gazebosim/gz-sim/blob/206def391d6ba23259ce8596e7256c2d705a9e53/examples/worlds/auv_controls.sdf#L144)
result in a decidedly negative definite matrix.Steps to reproduce
gz sim auv_controls.sdf -v 4
gz topic -t /model/tethys/joint/propeller_joint/cmd_thrust -m gz.msgs.Double -p 'data: -31'
gz topic -t /model/tethys/joint/propeller_joint/cmd_thrust -m gz.msgs.Double -p 'data: -0'
Output
You can see a video of the problem manifesting here: https://youtube.com/shorts/zExnMM8K-L8
Notice the world velocity of the AUV growing unbounded even once the prop has been commanded to stop.
ogre2.log
The text was updated successfully, but these errors were encountered: