Re: what are advantages of dAMotorUser?

Krystian Ligenza <[email protected]> Thu, 18 Oct 2007 22:57:15 +0200
Newsgroups gmane.comp.lib.ode
Message-ID <[email protected]>
Still no answer, but ok. I have last question, and a movie so you don't
need to build a scene only watch (please!)

So I have done a rope, and added forming a shapes, but I also wanted to
add a litte muscle when rope are in free mode (not forced to form a
shape). I need it in my ragdoll simulation (as I said in my second
mail). So I have done a servo in the way manual says. Please watch a
movie:

http://www.kxl.com.pl/ODE/KxL_ODE_rope.avi

when Gain is on, rope is forming a shape (by using a AMotor limits and
ERP, CRM tuned), when Servo is on Im adding force using this function:

static void Servo()

{

int i;

dReal TruePosition;

dReal DesiredPosition = 0.0;

dReal Error;

dReal DesiredVelocity;

for (i=0; i<(NUM-1); i++) {

TruePosition = dJointGetAMotorAngle(motorJoint[i],0);

Error = TruePosition - DesiredPosition;

DesiredVelocity = -Error * 0.4;

dJointSetAMotorParam(motorJoint[i], dParamFMax, 30);

dJointSetAMotorParam(motorJoint[i], dParamVel,
DesiredVelocity);

//....same for other axes

}

}

I know that values are set to hight, but I wanted to show what is
happening. I have tuned them with hight and very low values and it
always end in breaking joints (difference was only how fast this break
occured).

My question is simple. I need to have limits a this litte muscle force
in free rope mode, so can I use two AMotors with no big harm on
performance? Or maybe some other ideas?

Thanks for reading,

Krystian

Krystian Ligenza pisze:

I was wrong about error in axis, becouse they are related to bodies,
and when they twist, they wont be perpendicular to each other. So it's
look like it works ok.

The things that remain are:

- forming a shapes

- removing a jitering when pining last element

- soft limits would be nice to add

how to achieve this?

Thanks

Krystian

Krystian Ligenza pisze:

I have made small update to show how bad joint and amotor works for me:

http://www.kxl.com.pl/ODE/Update/demo_chain1.c

it is easy to notice, that after a litte play with a rope, red and blue
axis stop to be perpendicular to each other. How can I improve this?

PS. I have add a switch between using universal and ball+amotor joint.
Use:

#define useUNIVERSAL

or

#define useBALL

Thanks,

Krystian

Krystian Ligenza pisze:

Hi again,

I see that topic of amotor joint is not the interesting one for you?
I need to tune some parts of my plugin, that uses physics. I have made a
test case, a rope builded from capsule joined by universal joint. Here
is a source code:

http://www.kxl.com.pl/ODE/demo_chain1.c

(it is based on demo_chain1 so to run it simply make a copy of oryginal
file,override it, and build)
Demo work ok, but what I really need (not for the rope simulation, but
in my plugin) is:
- to have that last third axis(twist axis) possible to use (so I need
ball joint?)
- I need to have limits on all axis, but for twist they can be lower
that Pi/2 (so I need also amotor, but use it in euler or user mode? Do
they have similar results?)
- to have possibility to form shapes from this rope (by adding a torque
or using dParamVel to joints? ), so I can make it to look like L,S or V
- make it close to stable

when I will finish, I can provide this as a demo for ODE, becouse I
think it could help more then only me.

Thanks
Krystian

Krystian Ligenza pisze:

Hi,

I must correct way my ragdoll behave. In most for bone-joints Im using
universal joint, but there are few that have ball and amotor joint. As
for now Im using dAMotorEuler and have strange jitering in a motion.
What are the advantages of using dAMotorUser?

Thank you!
Krystian
_______________________________________________
ODE mailing list
[email protected]
http://ode.org/mailman/listinfo/ode

_______________________________________________
ODE mailing list
[email protected]
http://ode.org/mailman/listinfo/ode

----------

_______________________________________________
ODE mailing list
[email protected]
http://ode.org/mailman/listinfo/ode

----------

_______________________________________________
ODE mailing list
[email protected]
http://ode.org/mailman/listinfo/ode

_______________________________________________
ODE mailing list
[email protected]
http://ode.org/mailman/listinfo/ode