-
Notifications
You must be signed in to change notification settings - Fork 13
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
Refactor integrators
module and redefine JaxSimModel
class attributes
#252
Conversation
99878f7
to
3a1e965
Compare
3a1e965
to
81f6136
Compare
11527fa
to
104de71
Compare
@diegoferigo I modified the logic to be backward compatible, so it should still be compatible with parametric models |
9f2308f
to
853b6f4
Compare
d346b58
to
0d8d807
Compare
Change the name of the auxiliary dictionary to `metadata`, since `state` is misleading.
eabd74a
to
81807a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Early comments
Co-authored-by: Filippo Luca Ferretti <[email protected]>
81807a1
to
7234614
Compare
a597f85
to
7ceca8a
Compare
efec2ea
to
1f7eec4
Compare
integrator: Static[jaxsim.integrators.Integrator | None] = dataclasses.field( | ||
default=None, repr=False | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep an eye open on the hash of this attribute in the future if we face the usual problems on static elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Diego! Leaving unresolved
This pull request includes several changes to the integrators logic and API. The
JaxSimModel
class now incorporatesintegrator
anddt
as static attributes. In order to do this, it was necessary to refactor thejaxsim.integrators
module in order to simplify the logic by removing theinit
method.The integrators logic is simplified by avoiding the use of
integrator_state
to pass around variables and makingwrap_system_dynamics_for_integration
accept only the function describing the dynamics of the system, sincemodel
anddata
were required arguments for the integration anyway.📚 Documentation preview 📚: https://jaxsim--252.org.readthedocs.build//252/