[ODE] Initial conditions problem
Bram Stolk
bram at sara.nl
Tue Dec 6 02:24:35 MST 2005
Thomas Paviot wrote:
> Hello,
>
> A human being throw a stone far away : i want to simulate the movement
> of the stone. When the stone leave the human's hand, the velocity vector
> is 1m/s with an angle of 45° with gravity vector.
>
> Before starting an ODE simulation, at initial time, all velocities are
> equal to 0.0. Is it possible to apply initial velocity to a joint (or a
> body) before starting simulation? It seems there is no builtin function
> to do that.
>From the manual, section 6.2:
void dBodySetLinearVel (dBodyID, dReal x, dReal y, dReal z);
These functions set and get the position, rotation, linear and angular velocity
of the body. After setting a group of bodies, the outcome of the simulation is
undefined if the new configuration is inconsistent with the joints/constraints
that are present.
I would try that one.
Also, look at the test_crash example, where a cannonball is fired
with initial speed.
A physically correct specification would probably be that you specify
a force, and a duration that this force acts upon the body.
Bram
>
> Anyway, do you have any tip to go around the problem?
>
> Thomas
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
--
Bram Stolk, VR Engineer SARA, Amsterdam. tel +31 20 592 3000
"Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit
operating system originally coded for a 4-bit microprocessor by a 2-bit
company that can't stand 1 bit of competition."
More information about the ODE
mailing list