SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
taoJointSpherical Class Reference

Spherical joint class for articulated bodyThis provides a spherical joint for articulated body dynamics. More...

#include <taoJoint.h>

Inheritance diagram for taoJointSpherical:
Inheritance graph
[legend]
Collaboration diagram for taoJointSpherical:
Collaboration graph
[legend]

Public Member Functions

virtual deInt getDOF ()
 
virtual void reset ()
 
virtual taoVarSphericalgetVarSpherical ()
 
virtual taoVarSpherical const * getVarSpherical () const
 
virtual void setABJoint (taoABJoint *joint)
 
virtual taoABJointgetABJoint ()
 
virtual taoABJoint const * getABJoint () const
 
virtual void addQdelta ()
 
virtual void addDQdelta ()
 
virtual void zeroTau ()
 
virtual void zeroDDQ ()
 
virtual void zeroDQ ()
 
virtual void zeroQ ()
 
virtual void setTau (const deFloat *v)
 
virtual void setDDQ (const deFloat *v)
 
virtual void setDQ (const deFloat *v)
 
virtual void setQ (const deFloat *v)
 
virtual void getTau (deFloat *v) const
 
virtual void getDDQ (deFloat *v) const
 
virtual void getDQ (deFloat *v) const
 
virtual void getQ (deFloat *v) const
 
virtual void clampDQ ()
 
virtual void integrate (const deFloat dt)
 
virtual void updateFrameLocal (deFrame *local)
 
virtual deMatrix3getJg ()
 
virtual void getJgColumns (deVector6 *Jg_columns) const
 
virtual void setDVar (taoDVar *var)
 
virtual taoDVargetDVar ()
 
virtual taoDVar const * getDVar () const
 
void setType (scl::EJointType t)
 
scl::EJointType getType () const
 
void setDQclamp (deInt b)
 
deInt getDQclamp ()
 
void setNext (taoJoint *joint)
 
taoJointgetNext ()
 
virtual void setDQmax (deFloat dq)
 
virtual deFloat getDQmax ()
 
virtual void setDamping (deFloat d)
 
virtual deFloat getDamping ()
 
virtual void setInertia (deFloat i)
 
virtual deFloat getInertia ()
 

Public Attributes

std::string name_
 

Protected Attributes

taoABJointSpherical_abJoint
 

Detailed Description

Spherical joint class for articulated body

This provides a spherical joint for articulated body dynamics.

See Also
taoJoint

Member Function Documentation

void taoJointSpherical::addQdelta ( )
virtual

Another example of obfuscated code. The one above code probably does the same thing.

Implements taoDJoint.

virtual void taoJointSpherical::getDDQ ( deFloat *  v) const
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::getDQ ( deFloat *  v) const
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

deMatrix3 * taoJointSpherical::getJg ( )
virtual

The "documentation" used to say this (whatever that means exactly): "notice that in spherical joints the position components of the Jacobian are zero therefore, to build a 6x3 matrix the upper 3x3 needs to be set to zero and the lower needs to be set the return of this function".

One thing the documentation did not say is that the returned pointer is an array with two elements. getJg()[0] contains something like (I'm still figuring it out from the code...) the contribution of the joint to the translational velocity, and getJg()[0] contains the rotational part, both dependent on whatever frame got passed to taoABJointSpherical::compute_Jg() previously. taoABJointSpherical::compute_Jg() gets called by taoABNodeNOJ1::globalJacobian() or taoABNodeNOJn::globalJacobian(), which get called by taoABDynamics::globalJacobianOut() and taoABDynamics::compute_Jg_Omega_H(), both of which pass taoDNode::frameGlobal() into it (it can get expressed in successively retracted frames though during the iteration over all the joints of a node). taoDynamics::globalJacobian() seems to be the top-level entry point for that chain of calls, so whatever node (and its global frame) you pass to it will be used throughout the recursion.

Note
This method is retained mainly for backwards compatibility, you should use getJgColumns() instead, which does the necessary operations to inject the positional components. Looking at the taoJointDOF1 version, by analogy this method probably returns the Jacobian contribution of this joint, expressed in the global frame. Someone chose to return it as a 3x3 matrix because they thought it was neat from the point of view of this class, but it actually makes it hard to polymorphically mix joint types, making it completely pointless to declare this method virtual.
void taoJointSpherical::getJgColumns ( deVector6 Jg_columns) const
virtual

You need to pass in an array of three deVector6 instances, because spherical joints have three degrees of (velocity) freedom. Note that getDOF() returns three, so you can use the polymorphic form.

Implements taoJoint.

virtual void taoJointSpherical::getQ ( deFloat *  v) const
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::getTau ( deFloat *  v) const
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::setDDQ ( const deFloat *  v)
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::setDQ ( const deFloat *  v)
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::setQ ( const deFloat *  v)
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.

virtual void taoJointSpherical::setTau ( const deFloat *  v)
inlinevirtual
Note
pointer semantics to support more than one DOF

Implements taoJoint.


The documentation for this class was generated from the following files: