I'm experimenting a bit with the multibody and Featherstone solver. Because it is not (afaik) possible yet to apply the btGeneric6DofSpring2Constraint to links, I was wondering if I could emulate spring dampers by simply applying the relevant torque at each timestep. The torque would be proportional to the angle between each pair of links times the spring constant, plus the change in angle between each pair of links times the damping constant.
Any idea if this approach would work?
Cheers!
simple hack for spring damper in btMultiBody
-
- Posts: 21
- Joined: Fri Oct 24, 2014 10:48 am
-
- Posts: 463
- Joined: Fri Nov 30, 2012 4:50 am
Re: simple hack for spring damper in btMultiBody
It will "work" in some cases, but be horribly unstable in others. Basically the spring will be an ideal spring each frame, no damping, even if the "damping torque" is there. It's basically the same as trying to apply friction to a moving body by approximating the friction as a force in the opposite direction to the current velocity, it can work in some cases, but definitely not all.
-
- Posts: 21
- Joined: Fri Oct 24, 2014 10:48 am
Re: simple hack for spring damper in btMultiBody
Hi Basroil,
Thanks for your reply. Could you elaborate a bit on the cases under which it might be unstable?
Cheers
Thanks for your reply. Could you elaborate a bit on the cases under which it might be unstable?
Cheers
-
- Posts: 350
- Joined: Sat Jul 04, 2015 10:33 am
- Location: Bern, Switzerland
Re: simple hack for spring damper in btMultiBody
@ratatouille:
I have a question regarding your experiments with the btMultiBody. Are you able to properly position control a 3DoF Spherical Joint using the apply torque methods? If so, can you show me how you do it? I have similar ideas as you do in that I intend to apply forces to simulate limits, but I can not properly control the joint yet.
I have a question regarding your experiments with the btMultiBody. Are you able to properly position control a 3DoF Spherical Joint using the apply torque methods? If so, can you show me how you do it? I have similar ideas as you do in that I intend to apply forces to simulate limits, but I can not properly control the joint yet.