[odejava]Jointstops are not working ?

I’m trying to attach a JointAMotor to a jointball. Problem is, histop/lostop doesnt work it appears (im prop doing it wrong)…
I can start the motor but the joints never stops to rotate. Heres the code. Any suggestions ?

JointBall j = new JointBall(name,world);
JointAMotor m = new JointAMotor(“m:”+name,world);
m.setNumAxes(3);
m.setAxis(0,0,1,0,0);
m.setAxis(1,0,0,1,0);
m.setAxis(2,0,0,0,1);
m.setAngle(0,0);
m.setAngle(1,0);
m.setAngle(2,0);
float a = 0.1f;
//stop angles
m.setParam(org.odejava.ode.OdeConstants.dParamHiStop,a);
m.setParam(org.odejava.ode.OdeConstants.dParamLoStop,-a);
m.setParam(org.odejava.ode.OdeConstants.dParamHiStop2,a);
m.setParam(org.odejava.ode.OdeConstants.dParamLoStop2,-a);
m.setParam(org.odejava.ode.OdeConstants.dParamHiStop3,a);
m.setParam(org.odejava.ode.OdeConstants.dParamLoStop3,-a);
//forces,vel
float v = 0.1;
float f = 0.1f;
m.setParam(org.odejava.ode.OdeConstants.dParamVel,v);
m.setParam(org.odejava.ode.OdeConstants.dParamVel2,v);
m.setParam(org.odejava.ode.OdeConstants.dParamVel3,v);
m.setParam(org.odejava.ode.OdeConstants.dParamFMax,f);
m.setParam(org.odejava.ode.OdeConstants.dParamFMax2,f);
m.setParam(org.odejava.ode.OdeConstants.dParamFMax3,f);
m.attach(j.getBody1(),j.getBody2());

Just found out, it’ doesnt matter if I give them a force of 1 or one million, there wont be more “force” in the joints anyway.
I’m making a ragdoll which joints are controlled by A motors.
He can stand with a gravity of 0.0001, but crumples on 0.001 because of to little power in the joints.
Im using setParamter(dParamFMax,1000000). he should be superstrong ! Any ideas ?

Thanks, Newbton

Ball joints dont have a Max and a Min stop…

Use UniversalJoint instead…

DP

do you have an explanation to the missing power in the jointamotors ? Anyway I’m able to fine-control the jointball (along 3 axises ) using motors. Isnt it somehow not logical that I can’t set stops along the axises ? (on the motor, not the ball joints which, as I can see, are not even aware they have axises).

This is take from the ODE docs. It says it’s possible to set stops on ballijoint if you use motors.

http://ode.org/ode-latest-userguide.html#sec_7_3_8

“An angular motor (AMotor) allows the relative angular velocities of two bodies to be controlled. The angular velocity can be controlled on up to three axes, allowing torque motors and stops to be set for rotation about those axes (see the ``Stops and motor parameters’’ section below). This is mainly useful in conjunction will ball joints (which do not constrain the angular degrees of freedom at all), but it can be used in any situation where angular control is needed. To use an AMotor with a ball joint, simply attach it to the same two bodies that the ball joint is attached to.”

i tested balljoints and angular motor a few days ago with the odeed editor (odeed.org) and didnt get the desired effects.
the hi and lo-stops affected the speed.
maybe u cant set those stops at all or i didnt set the axis properly.

[quote]i tested balljoints and angular motor a few days ago with the odeed editor (odeed.org) and didnt get the desired effects.
the hi and lo-stops affected the speed.
maybe u cant set those stops at all or i didnt set the axis properly.
[/quote]
I’ve got it to work now. Only God knows how. I played around with ERP , CFM , world step and a whole lot of other things. Suddenly it worked. Still I get alot of errors when I apply forces to the motors. It starts with error messages then my guy starts to act funny, sometimes he explodes with the joints and bodies flying in all directions.

[quote]I’m making a ragdoll which joints are controlled by A motors.
[/quote]
Have you thought about using three hinge joints in place of one ball joint?
If you do use three hinge joints (in serial), you may have to create a small gap between each joint.

EDIT: Probably best to use a universal joint attached to the torso, and a hinge joint which gives rotation about the primary axis of the limb, attached to the limb.

Hard to control and not very entuitive. I prefer one joint per human joint. But the balljoints with motors are working now. Dont know how I did it though