|
From: Markus R. <rol...@un...> - 2004-11-09 08:05:14
|
Hi,
Shaik Shadab Sayani wrote:
> Is there any frictional force acting on the objects in the soccer
> field.If so from where can I get this info(like friction co-efficient
> etc.,).
As I said before:
> Ode does models friction for contact surfaces only
[...]
> The default collisionhandler is a 'ContactJointHandler' that creates
> 'ode contact joints'
The ContactJointHandler creates so called ODE contact joints, see the
ODE manual [1] at section 7.3.7 [2]. The default contact surface
parameters used in the server (see contactjointhandler.cpp:34) are:
// set up default contact surface parameters
mSurfaceParameter.mode = dContactBounce;
mSurfaceParameter.mu = dInfinity;
mSurfaceParameter.bounce = 0.8f;
mSurfaceParameter.bounce_vel = 2.0f;
They are currently used as they are for the soccer simulation.
The second source of friction,
> a simple air drag is simulated with a so called 'DragController' (see
> rcssserver3d.rb:65 and lib/oxygen/physicsserver/dragcontroller.*)
This Dragcontroller appllies a linear force that is proportional to the
current velocity of a player (see dragcontroller.cpp:46):
Vector3f vel = mBody->GetVelocity() * mLinearDrag * -1;
mBody->AddForce(vel);
Additionaly an angular drag is applied to dampen the torque of an object
over time (see dragcontroller.cpp:53)
Vector3f vel = mBody->GetAngularVelocity() * mAngularDrag * -1;
mBody->AddTorque(vel);
The paramters used here are at a default value of 0.1 each) (see
DragController constructor) but are set to 12.0 each in the
rcssserver3d.rb (line 66)
Shaik Shadab Sayani wrote:
> Also does this frictional force produces a torqus on the
> object.
Concerning the actual mathematics behind ODE I can't tell give you that
much detail. However on the ODE page are some useful links that give
more background about Rigid Body Dynamics, please see [3]. Maybe you can
find out yourself ;)
cheers,
Markus
[1] http://ode.org/ode-latest-userguide.html
[2] http://ode.org/ode-latest-userguide.html#sec_7_3_7
[3] http://www.d6.com/users/checker/dynamics.htm
|