iCub-main
Public Member Functions | List of all members
OdeLogicalJoint Class Reference

Convenience class for mapping from physical ODE joints in the model to control joints in the ICUB specification. More...

#include <OdeLogicalJoint.h>

+ Inheritance diagram for OdeLogicalJoint:

Public Member Functions

 OdeLogicalJoint ()
 Constructor. More...
 
virtual ~OdeLogicalJoint ()
 Destructor. More...
 
OdeLogicalJointnest (int len)
 Create an array of nested control units. More...
 
OdeLogicalJointat (int index)
 Access a nested control unit. More...
 
void init (const char *unit, const char *type, int index, int sign, RobotConfig &conf)
 Initialize a regular control unit. More...
 
void init (OdeLogicalJoint &left, OdeLogicalJoint &right, OdeLogicalJoint &peer, int sgn)
 Initialize a differential pair of control units. More...
 
double getAngle ()
 Get the angle of an associated joint, in ICUB units and sign. More...
 
double getVelocity ()
 Get the angular velocity of an associated joint, in ICUB units and sign. More...
 
double getAngleRaw ()
 Get the angle of an associated joint in unconverted units and sign. More...
 
double getVelocityRaw ()
 Get the velocity of an associated joint in unconverted units and sign. More...
 
double getSpeedSetpoint ()
 Get the current target velocity. More...
 
double getTorque ()
 this is just a fake torque interface for now More...
 
void setTorque (double target)
 Set the reference torque. More...
 
void setControlParameters (double vel, double acc)
 Set velocity and acceleration control parameters. More...
 
void setPosition (double target)
 Drive towards an angle setpoint (in ICUB units/sign). More...
 
void setVelocity (double target)
 Set velocity of joint (in ICUB units/sign). More...
 
void setVelocityRaw (double target)
 Set raw velocity of joint (in ODE units/sign). More...
 
virtual bool isValid ()
 
void controlModeChanged (int cm)
 
- Public Member Functions inherited from LogicalJoint
virtual ~LogicalJoint ()
 Destructor. More...
 

Detailed Description

Convenience class for mapping from physical ODE joints in the model to control joints in the ICUB specification.

Definition at line 40 of file OdeLogicalJoint.h.

Constructor & Destructor Documentation

◆ OdeLogicalJoint()

OdeLogicalJoint::OdeLogicalJoint ( )

Constructor.

Definition at line 30 of file OdeLogicalJoint.cpp.

◆ ~OdeLogicalJoint()

OdeLogicalJoint::~OdeLogicalJoint ( )
virtual

Destructor.

Definition at line 47 of file OdeLogicalJoint.cpp.

Member Function Documentation

◆ at()

OdeLogicalJoint * OdeLogicalJoint::at ( int  index)

Access a nested control unit.

Definition at line 64 of file OdeLogicalJoint.cpp.

◆ controlModeChanged()

void OdeLogicalJoint::controlModeChanged ( int  cm)
virtual

Implements LogicalJoint.

Definition at line 276 of file OdeLogicalJoint.cpp.

◆ getAngle()

double OdeLogicalJoint::getAngle ( )
inlinevirtual

Get the angle of an associated joint, in ICUB units and sign.

Implements LogicalJoint.

Definition at line 76 of file OdeLogicalJoint.h.

◆ getAngleRaw()

double OdeLogicalJoint::getAngleRaw ( )

Get the angle of an associated joint in unconverted units and sign.

Definition at line 186 of file OdeLogicalJoint.cpp.

◆ getSpeedSetpoint()

double OdeLogicalJoint::getSpeedSetpoint ( )
inline

Get the current target velocity.

Definition at line 100 of file OdeLogicalJoint.h.

◆ getTorque()

double OdeLogicalJoint::getTorque ( )
virtual

this is just a fake torque interface for now

Implements LogicalJoint.

Definition at line 175 of file OdeLogicalJoint.cpp.

◆ getVelocity()

double OdeLogicalJoint::getVelocity ( )
inlinevirtual

Get the angular velocity of an associated joint, in ICUB units and sign.

Implements LogicalJoint.

Definition at line 83 of file OdeLogicalJoint.h.

◆ getVelocityRaw()

double OdeLogicalJoint::getVelocityRaw ( )

Get the velocity of an associated joint in unconverted units and sign.

Definition at line 202 of file OdeLogicalJoint.cpp.

◆ init() [1/2]

void OdeLogicalJoint::init ( const char *  unit,
const char *  type,
int  index,
int  sign,
RobotConfig conf 
)

Initialize a regular control unit.

Definition at line 85 of file OdeLogicalJoint.cpp.

◆ init() [2/2]

void OdeLogicalJoint::init ( OdeLogicalJoint left,
OdeLogicalJoint right,
OdeLogicalJoint peer,
int  sgn 
)

Initialize a differential pair of control units.

Definition at line 71 of file OdeLogicalJoint.cpp.

◆ isValid()

virtual bool OdeLogicalJoint::isValid ( )
inlinevirtual

Implements LogicalJoint.

Definition at line 129 of file OdeLogicalJoint.h.

◆ nest()

OdeLogicalJoint * OdeLogicalJoint::nest ( int  len)

Create an array of nested control units.

The array will be destroyed when this object is destroyed.

Definition at line 54 of file OdeLogicalJoint.cpp.

◆ setControlParameters()

void OdeLogicalJoint::setControlParameters ( double  vel,
double  acc 
)
virtual

Set velocity and acceleration control parameters.

Implements LogicalJoint.

Definition at line 221 of file OdeLogicalJoint.cpp.

◆ setPosition()

void OdeLogicalJoint::setPosition ( double  target)
virtual

Drive towards an angle setpoint (in ICUB units/sign).

Implements LogicalJoint.

Definition at line 236 of file OdeLogicalJoint.cpp.

◆ setTorque()

void OdeLogicalJoint::setTorque ( double  target)
virtual

Set the reference torque.

Implements LogicalJoint.

Definition at line 182 of file OdeLogicalJoint.cpp.

◆ setVelocity()

void OdeLogicalJoint::setVelocity ( double  target)
virtual

Set velocity of joint (in ICUB units/sign).

Implements LogicalJoint.

Definition at line 247 of file OdeLogicalJoint.cpp.

◆ setVelocityRaw()

void OdeLogicalJoint::setVelocityRaw ( double  target)

Set raw velocity of joint (in ODE units/sign).

Definition at line 257 of file OdeLogicalJoint.cpp.


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