Torque

what about torque?

If i want to simulate a motor or a muscle attached to limb with a joint what should I use?

I've already seen setDesiredVelocity but to me it doesn't seem the right way to go.

Using a rotational joint and setMaxTourque (iirc) plus setDesiredVelocity is the best way to go. You can also apply tourques directly, but I wouldn't recommend that.

when I apply a torque to an object what joint axis is used?

how setDesiredVelocityDoWork?

I must develop various kind of robot controller so it can be useful to know the differences…

where can I find them?



and one other thing… what about a visual editor, i could import a human mesh there and start working

thanks

ilredeldomani said:

when I apply a torque to an object what joint axis is used?

No koint axis, but the axis through the objects local origin.


how setDesiredVelocityDoWork?

Have a look into the ODE docs.


and one other thing.. what about a visual editor, i could import a human mesh there and start working

Outrunner started a visual editor, but it's in a very early stage. Loading a mesh of a robot or even a human and start working is certainly not possible.

I've read this…

Open Dynamics Engine

and this kind of control must be implemented by my logic…

the simulator is not for a videogame… my motor can't look a step in the future… I must calculate by myself what is the force the muscle, or motor must apply…

Joint motors solve all these problems: they bring the body up to speed in one time step, provided that does not take more force than is allowed. Joint motors need no extra parameters because they are actually implemented as constraints. They can effectively see one time step into the future to work out the correct force. This makes joint motors more computationally expensive than computing the forces yourself, but they are much more robust and stable, and far less time consuming to design with. This is especially true with larger rigid body systems.

A robot can't, or at least it is my work, know what will happen at next time step..

So I'm going to use torque and forces directly..
If you have any advise about that I'd like to know that..
However Your advise was useful because perhaps I'll leave some space for control by desired velocity.. if I can suppose that the underlying level can handle that

I'm thinking about writing binding btw jmephysics and newton..
What's your opinion?
ilredeldomani said:

I'm thinking about writing binding btw jmephysics and newton..
What's your opinion?

Sure, would be cool. Also I remember someone told to be making a Ageia PhysX binding... not sure if someone ever started, though.

Ok, i'd like to start with the bindings… but can you give me some kind of schema (UML) where you show what are the classes to be implemented to build another implementation of jmephysics? and what kind of constraint must be satisfied?

You can view the Classes with a UML tool if you like (e.g. Omondo).



Most important thing is to implement PhysicsSpace, DynamicPhysicsNode and StaticPhysicsNode. As well as some geometries (PhysicsBox, PhysicsSphere, etc.). Then register the new implementation by providing a factory and add the name of it to PhysicsSpace.knownImplementations (alter the existing code). Finally you will want to implement joints. Have a look at the ODE implementation on how to do things (e.g. choose type of joint).