-
Notifications
You must be signed in to change notification settings - Fork 59
inertia box fluid model #191
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
inertia box fluid model #191
Conversation
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 - some comments, mostly about wp.static usage.
mujoco_warp/_src/passive.py
Outdated
lvel_torque = rotT @ torque | ||
lvel_force = rotT @ force | ||
|
||
if m.opt.wind[0] or m.opt.wind[1] or m.opt.wind[2]: |
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.
not sure if there is a big benefit to this, but could be wp.max(m.opt.wind) > 0.0.
Or I guess this information is even statically available, so maybe wrap in wp.static? actually, you're not running that code right now anyway if all of them are zero, are you going to reuse this function in a different kernel?
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.
wrapped in wp.static
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.
the functionality from _inertia_box_fluid_model
is moved into box_fluid
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.
This is lovely code and nicely written, just a few nits
adds inertia box fluid model
https://mujoco.readthedocs.io/en/latest/computation/fluid.html#inertia-model
https://github.com/google-deepmind/mujoco/blob/d3bc0544d39c0933067e493f4c1c7ebfd15ae9f3/src/engine/engine_passive.c#L527