I can’t really answer all these questions for you since the question of how you apply DART to your specific application goes way beyond just basic help on how the DART API works. I’ll just summarize proper DART usage like this:
BodyNode objects) are connected by joints (
Joint objects). The
Joint class is an abstract base class which is implemented by a variety of specific joint types. The specific joint type that you use to connect two bodies determines how those bodies are able to move relative to each other and what kind of forces they can exert on each other.
You can set joint commands using the
Joint::setCommand(std::size_t, double) function. Each joint can take in a number of commands equal to the number of degrees of freedom that the joint allows. Joints also have an actuator mode which determines how the joint responds to the command that you give.
Joint force commands and/or joint velocity commands will determine how the bodies that are connected by that joint will move relative to each other. If you need to actuate some joint mechanism in your robot, like an elbow, to produce an internal force then you probably want to use a joint command.
For example, if you use the
FORCE control actuator type with a command of zero, then the joint will be totally passive and freely move about its axis as external forces get applied to either of the bodies attached to it. If you use the
SERVO control actuator type with a command of zero, then the joint will try to maintain its velocity at zero, and will remain stiff as external forces get applied to either of the bodies attached to it.
If there are supposed to be external forces acting on your robot, like fluid pressure forces, you can apply those to the bodies in your simulated robot using the
The third question, how could i know each dof means for each different joint Type?
By best suggestion right now is to look at the header for whatever joint type you’re interested in.