learn-multibody-dynamics icon indicating copy to clipboard operation
learn-multibody-dynamics copied to clipboard

Subs during vel and acc calcs

Open moorepants opened this issue 2 years ago • 3 comments

Something like B.ang_vel_in(N, subs=qd_repl) could be helpful instead of B.set_ang_vel(N, B.ang_vel_in(N).xreplace(qd_repl)).

moorepants avatar Jun 21 '22 13:06 moorepants

Not sure if this is behaviour we should want. The task of ang_vel_in is not to store the velocity, but to compute it. Personally I would keep this explicit, also because this would create loops in the angular velocity graph. Loops are allowed in the angular velocity (loops are only checked in _dcm). However if a user want to create a loop, which I do myself often enough, I would like to to it explicitly and not almost magically. This would also create a loop, while just requesting the angular velocity with the subs specified for ease.

tjstienstra avatar Jan 23 '23 10:01 tjstienstra

I see. ang_vel_in would be computing and setting if we included the subs kwarg...but doesn't it already compute and set?

moorepants avatar Jan 24 '23 05:01 moorepants

It would be an option to set it, when subs is specified. Currently it does not save it, see #23741. Personally, I do also have a bit of a preference to keeping it explicit. It is nice if you use it a lot, but it is an extra feature that can be confusing.

tjstienstra avatar Jan 24 '23 07:01 tjstienstra