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
Hinge2Joint Class Reference

#include <joint.h>

Inheritance diagram for Hinge2Joint:
Collaboration diagram for Hinge2Joint:

Public Member Functions

 Hinge2Joint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor, const Axis &axis1, const Axis &axis2)
 
virtual ~Hinge2Joint ()
 
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 ()
 should syncronise the Ode stuff and the OSG notes (if any) More...
 
virtual void addForce1 (double t1)
 adds torques to axis 1 and 2 More...
 
virtual void addForce2 (double t2)
 add torque to axis 1 More...
 
virtual double getPosition1 () const
 
virtual double getPosition2 () const
 
virtual double getPosition1Rate () const
 This is not supported by the joint! More...
 
virtual double getPosition2Rate () const
 
virtual void setParam (int parameter, double value)
 sets the ODE joint parameter (see ODE manual) More...
 
virtual double getParam (int parameter) const
 return the ODE joint parameter (see ODE manual) More...
 
- Public Member Functions inherited from TwoAxisJoint
 TwoAxisJoint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor, const Axis axis1, const Axis axis2)
 
virtual Axis getAxis (int n) const
 returns the n'th axis of the joint (starting with 0) More...
 
virtual Axis getAxis2 () const
 
void addForces (double force1, double force2)
 
virtual int getNumberAxes () const
 returns the number of Axes 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...
 
- Public Member Functions inherited from OneAxisJoint
 OneAxisJoint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor, const Axis axis1)
 
virtual Axis getAxis1 () const
 
- Public Member Functions inherited from Joint
 Joint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor)
 
virtual ~Joint ()
 
dJointID getJoint () const
 
const PrimitivegetPart1 () const
 
PrimitivegetPart1 ()
 
const PrimitivegetPart2 () const
 
PrimitivegetPart2 ()
 
const osg::Vec3 getAnchor () const
 
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...
 

Protected Attributes

OSGPrimitivevisual
 
- Protected Attributes inherited from TwoAxisJoint
Axis axis2
 
- Protected Attributes inherited from OneAxisJoint
Axis axis1
 
- Protected Attributes inherited from Joint
dJointID joint
 
Primitivepart1
 
Primitivepart2
 
osg::Vec3 anchor
 
dJointFeedback * feedback
 

Additional Inherited Members

- Static Public Member Functions inherited from Joint
static osg::Matrix anchorAxisPose (const osg::Vec3 &anchor, const Axis &axis)
 
- Public Attributes inherited from Joint
OdeHandle odeHandle
 

Constructor & Destructor Documentation

Hinge2Joint ( Primitive part1,
Primitive part2,
const osg::Vec3 anchor,
const Axis axis1,
const Axis axis2 
)
~Hinge2Joint ( )
virtual

Member Function Documentation

void addForce1 ( double  t1)
virtual

adds torques to axis 1 and 2

add torque to axis 1

Implements OneAxisJoint.

void addForce2 ( double  t2)
virtual

add torque to axis 1

Implements TwoAxisJoint.

double getParam ( int  parameter) const
virtual

return the ODE joint parameter (see ODE manual)

Implements Joint.

double getPosition1 ( ) const
virtual

Implements OneAxisJoint.

double getPosition1Rate ( ) const
virtual

This is not supported by the joint!

Implements OneAxisJoint.

double getPosition2 ( ) const
virtual

Implements TwoAxisJoint.

double getPosition2Rate ( ) const
virtual

Implements TwoAxisJoint.

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 axis2 of the joints is also drawn as a slim cylinder. visualSize is the length of the cylinder.

Reimplemented from Joint.

void setParam ( int  parameter,
double  value 
)
virtual

sets the ODE joint parameter (see ODE manual)

Implements Joint.

void update ( )
virtual

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

Implements Joint.

Member Data Documentation

OSGPrimitive* visual
protected

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