Need help in, controlling the JointAngles and Pos on my Articulated character

I am using the JmePhysics2, for my Thesis. I need to generate animation of the character by controlling the joint angles and their positions write the CentreOfmass of the DynamicNodes this joint is connected to. I am using a “Rotational Axis”, so that I can only rotate my character at all the joints. I have been trying to figure if I can manually set the desired angle to each joint. I could not find any method to controll the joint configurations directly. Also I read the http://www.jmonkeyengine.com/jmeforum/index.php?topic=3724.0



Basically I am using JMephysics2 for establishing Joints ,constraints and collision with the floor.

- How can I set the angle to a desired angle, still using the “Rotational Axis”. {axis.setPosition() is not available  :(}



My Character, has 4 rigid bodies[DynamicPhysicsNode] connected with 3 joints [Luxolamp]. All 4 DPN’s are connected to a Root {Jme.Node}. Since I cannot connect them to one more DynamicPhysicsNode, I dint have a Dynamic Common Root.

  • How can I apply force, or Velocity on the characters as a whole? as I dont have a Parent DynamicNode, Do I have to apply Force,Velocity,Angular velocity for each part of by character body?





    Thanks… in advance…

I think I figuared a way to hack, the Joint to the require angle by setting the Max and Min, of the axis to the desired angle in every frame…



So basically, I will be saving the actula Max, and Min somewhere else and check if the angle I am setting is crossing these boundaries in every frame, before I appy these to the character. Not sure if I will survive with this Hack…





Any inputs on this will be a great help…  :smiley:

chitima123 said:

- How can I set the angle to a desired angle, still using the "Rotational Axis". {axis.setPosition() is not available  :(}

hmm, why do you use physics if you want to set angles manually? using stops kind of works, yes, but probably not at extreme angle differences...

Usually one would use "powered" joints (setDesiredVelocity etc.) but I assume that's not what you want here.

chitima123 said:

- How can I apply force, or Velocity on the characters as a whole? as I dont have a Parent DynamicNode, Do I have to apply Force,Velocity,Angular velocity for each part of by character body?

Yes. But be aware that it's quite complicated to move a ragdoll properly by applying forces (it's not enough to apply the same force to all parts).

In conclusion: maybe you (or your supervisor?) should think over the assignment / solution method :|

Thanks for the inputs…



I have some more questions though… :?



Yes, I am aware that animating a Ragdoll is becoming too complicated here…But thats the whole idea…


  • How can I make my character's root Node(jme.Node), follow a parabolic path, from point A to point B? while maintaining the same orientation for all the attached DynamicPhysicNodes?
  • How can I stop, physics from controlling every thing, except for what I want. Like I just want Joint and their DOF's and collision with the floor working…?



    I know I am trying to look for a solution which might be very complicated to implement, or cannot be acheived by my design. Any kind of ideas of controlling the RagDoll's motion would be really helpfull… :roll:


at first you should deactivate affectedbyGrafity. ANd if you dont want your node collide with something, makle its material on Ghost.

there is a "rest" Button in the DynamicNode, but I didnt saw an effect :lol:



For the PathFollowing you can make a BezierCurve, and call its getPoint() Method.



When you want to move an Object to a Point, you can try this

But this must be calculadet often, not in every Physicsstep but more than once an second


Vector3f value = pos.subtract(part.getLocalTranslation));
float l = value.length();
if (l < toleranz) {
part.setLinearVelocity(Vector3f.Zero);
} else {
value.multLocal(GRAVITY/2f);
part.setLinearVelocity(value);
}


(GRAVITY/2f) you should test which values you need, because I have made an acceleration behind that, an the Objects dont move to fast, when Gravity is disabled, perhabs you dont need that value
chitima123 said:

- How can I stop, physics from controlling every thing, except for what I want. Like I just want Joint and their DOF's and collision with the floor working...?

Simple answer: you can't (at least with ODE implementation).

Long answer: ODE joints are just constraints for solver used in the stepping algorithm. What you actually want is to skip the stepping but keep the joints -> that cannot work. You should implement an own algorithm for handling the joints. You can use jME Physics 2 as model (use the classes/object for holding your setup data). But all the current implementations won't allow your use case properly, so do not use the update method of ODE- (or PhysX-, etc.) PhysicsSpace. You'll be better off by implementing a 'rotate' or 'setPosition' yourself and don't use the rest of the physics simulation.

btw did you see that topic? It seems to do what you want.

Hmm,

Its a very intresting application. I think this is exactly what I was trying to implement, but my goal was to make a smooth transition from one pose to the other when you click the animate button, using the character physics properties like characters linear and angular momentum to controll the transition, not a linear or bezier intertpolation between the angles.



I have to make my character jump from one pose to the other pose, and the jump should look physically realistic :)… like bending and gaining energy before takeoff and bending the knees [luxo's lower joint] beofore landing. Right now have access to linear and angular velocity of the DynamicNodes. I need to controll linear and aggular momentum which should eventually controll the charcters pose [Joints Degree] as per "NioMechanical Research…"



I don't have to achieve all this, exactly as I mentioned.


  • But is there a way I can controll the characters Linear and angular Monmentum around the "Centre Of mass- COM" of the whole body.
  • Right now I am able to track the COM of the entire body calcualted form the weighted average of all the connected DynamicNodes of the Body?
  • Is there a way I can make the COM, of the body follow a specified path, and make the DynamicNodes allign to it automatically ???



    Hoooo I think thats a too big requirement to expect from JME, but I need some ideas, so that I can some how hack or achieve it. Thats the whole idea of my Thesis  :smiley: