[ODE] More Newbie Questions
Jon Watte
hplus-ode at mindcontrol.org
Tue Jun 29 12:05:59 MST 2004
The way to have static objects is to create Geoms for them,
but connect the geoms to the "0" body (static environment).
You don't need to create a body at all for the fixed parts.
This makes the simulation more efficient, to boot.
For key-framed objects, you must decide on some maximum
force and maximum slop time that you allow. Say, 1000 force
units and 0.1 slop time. Then, when playing back the animation,
you look at where the animation wants you to be in 0.1 seconds,
look at where you are now, calculate what velocity (linear and
angular) you'd need to get where you want to go in the time
indicated, subtract the current velocity, multiply with your
force constant, divide by time step, and out comes the linear
force and angular torque you should apply to the object.
If you try to just position the object using "full kinematics"
then your simulation is likely to be poorly behaved and blow
up quickly.
Cheers,
/ h+
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
danielkramer at gmail.com
Sent: Tuesday, June 29, 2004 11:22 AM
To: ODE
Subject: [ODE] More Newbie Questions
Hello,
I am writing a simulator where some objects are fully dynamic and
others I want locked in space but still allow dynamic objects to
collide with them. I found if I attach a fixed joint to each object
I want static then it works as I expect. Is this the correct way to
approach this? I tried also explicitly setting the velocities to 0 at
each iteration.. but when objects hit them they still get "nudged" a
bit which is cool.. but not what I was looking for.
The next step is to have some objects that I control directly with
keyframes (I'll read in a raw channel file for position each frame).
I would want dynamic objects to interact with this keyframed object.
For example, having a shovel that gets it's motion from a channel file
and a pile of dynamic blocks that it picks up. What's the best way
to control the shovel? setting positions or setting velocities? I'm
worried if I set velocities then collisions will push me off course
thanks for any advice
daniel
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list