Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Joint Class Referenceabstract

#include <joint.h>

Inheritance diagram for Joint:
Collaboration diagram for Joint:

Public Member Functions

 Joint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor)
 
virtual ~Joint ()
 
virtual void init (const OdeHandle &odeHandle, const OsgHandle &osgHandle, bool withVisual=true, double visualSize=0.2, bool ignoreColl=true)
 initialises (and creates) the joint. More...
 
virtual void update ()=0
 should syncronise the Ode stuff and the OSG notes (if any) More...
 
virtual void setParam (int parameter, double value)=0
 sets the ODE joint parameter (see ODE manual) More...
 
virtual double getParam (int parameter) const =0
 return the ODE joint parameter (see ODE manual) More...
 
dJointID getJoint () const
 
const PrimitivegetPart1 () const
 
PrimitivegetPart1 ()
 
const PrimitivegetPart2 () const
 
PrimitivegetPart2 ()
 
const osg::Vec3 getAnchor () const
 
virtual int getNumberAxes () const =0
 returns the number of Axes More...
 
virtual Axis getAxis (int n) const
 returns the n'th axis of the joint (starting with 0) More...
 
virtual std::list< double > getPositions () const
 returns the positions of all Axes More...
 
virtual std::list< double > getPositionRates () const
 returns the position rates of all Axes More...
 
virtual int getPositions (double *sensorarray) const
 stores the positions of all Axes into sensorarray and returns the number of written entries More...
 
virtual int getPositionRates (double *sensorarray) const
 stores the position rates of all Axes into sensorarray and returns the number of written entries More...
 
virtual void setFeedBackMode (bool mode)
 enable or disable the feedback mode More...
 
virtual bool getTorqueFeedback (Pos &t1, Pos &t2) const
 torque applied to body 1 and body 2 More...
 
virtual bool getForceFeedback (Pos &f1, Pos &f2) const
 force applied to body 1 and body 2 More...
 

Static Public Member Functions

static osg::Matrix anchorAxisPose (const osg::Vec3 &anchor, const Axis &axis)
 

Public Attributes

OdeHandle odeHandle
 

Protected Attributes

dJointID joint
 
Primitivepart1
 
Primitivepart2
 
osg::Vec3 anchor
 
dJointFeedback * feedback
 

Constructor & Destructor Documentation

Joint ( Primitive part1,
Primitive part2,
const osg::Vec3 anchor 
)
inline
~Joint ( )
virtual

Member Function Documentation

Matrix anchorAxisPose ( const osg::Vec3 anchor,
const Axis axis 
)
static
const osg::Vec3 getAnchor ( ) const
inline
virtual Axis getAxis ( int  n) const
inlinevirtual

returns the n'th axis of the joint (starting with 0)

Reimplemented in TwoAxisJoint, and OneAxisJoint.

bool getForceFeedback ( Pos f1,
Pos f2 
) const
virtual

force applied to body 1 and body 2

dJointID getJoint ( ) const
inline
virtual int getNumberAxes ( ) const
pure virtual

returns the number of Axes

Implemented in BallJoint, FixedJoint, TwoAxisJoint, and OneAxisJoint.

virtual double getParam ( int  parameter) const
pure virtual

return the ODE joint parameter (see ODE manual)

Implemented in SliderJoint, BallJoint, UniversalJoint, Hinge2Joint, HingeJoint, and FixedJoint.

const Primitive* getPart1 ( ) const
inline
Primitive* getPart1 ( )
inline
const Primitive* getPart2 ( ) const
inline
Primitive* getPart2 ( )
inline
virtual std::list<double> getPositionRates ( ) const
inlinevirtual

returns the position rates of all Axes

Reimplemented in TwoAxisJoint, and OneAxisJoint.

virtual int getPositionRates ( double *  sensorarray) const
inlinevirtual

stores the position rates of all Axes into sensorarray and returns the number of written entries

Reimplemented in TwoAxisJoint, and OneAxisJoint.

virtual std::list<double> getPositions ( ) const
inlinevirtual

returns the positions of all Axes

Reimplemented in TwoAxisJoint, and OneAxisJoint.

virtual int getPositions ( double *  sensorarray) const
inlinevirtual

stores the positions of all Axes into sensorarray and returns the number of written entries

Reimplemented in TwoAxisJoint, and OneAxisJoint.

bool getTorqueFeedback ( Pos t1,
Pos t2 
) const
virtual

torque applied to body 1 and body 2

void init ( const OdeHandle odeHandle,
const OsgHandle osgHandle,
bool  withVisual = true,
double  visualSize = 0.2,
bool  ignoreColl = true 
)
virtual

initialises (and creates) the joint.

If visual is true then the joints is also drawn. visualSize is the size of the visual representation. If ignoreColl is true then the pair of connected parts is ignored at collision handling. The member variable odeHandle is set to the given handle. (To be overloaded, but this init should be called always from children!)

Reimplemented in SliderJoint, BallJoint, UniversalJoint, Hinge2Joint, HingeJoint, and FixedJoint.

void setFeedBackMode ( bool  mode)
virtual

enable or disable the feedback mode

virtual void setParam ( int  parameter,
double  value 
)
pure virtual

sets the ODE joint parameter (see ODE manual)

Implemented in SliderJoint, BallJoint, UniversalJoint, Hinge2Joint, HingeJoint, and FixedJoint.

virtual void update ( )
pure virtual

should syncronise the Ode stuff and the OSG notes (if any)

Implemented in SliderJoint, BallJoint, UniversalJoint, Hinge2Joint, HingeJoint, and FixedJoint.

Member Data Documentation

osg::Vec3 anchor
protected
dJointFeedback* feedback
protected
dJointID joint
protected
OdeHandle odeHandle
Primitive* part1
protected
Primitive* part2
protected

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