[ODE] springs
Thompson, Randy AMRDEC/SAIC
randy.thompson5 at us.army.mil
Mon Jan 30 09:10:51 MST 2006
I replied to this last Friday but I never saw my reply appear. I'm sure
I did something wrong, so I will try again.
I use a Hinge2 for wheels on a vehicle. I set the suspension parameters
using the equations for ERP and CFM in the documentation along with a
bit of knowledge of mass-spring equations. The code looks something
like this.
K = spring constant
D = damping coefficient
H = ODE time step
R = 2.0 * D * sqrt(sprungMass * K)
ERP = (H * K) / (H * K + R)
CFM = 1.0 / (H * K + R)
This effectively decouples the spring and damping coefficients so they
can be set independently. Changing either ERP or CFM independently
affects both damping and the spring constant making it very difficult to
get the desired result.
I hope this is what you were looking for.
Randy
> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of
Floris
> van Breugel
> Sent: Thursday, January 26, 2006 3:31 PM
> To: ode at q12.org
> Subject: [ODE] springs
>
> Hi,
>
> How do you get a hinge joint to act like a torsion spring such that
> you can set the spring constant? I tried setting changing the CFM and
> ERP but don't see any differences in the system when I apply forces.
> I would like something where the joint will give some amount
> proportional to the force and spring constant like a real spring, not
> using hard constraints. Any tips would be great.
>
> Thanks,
>
> - Floris
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list