iCub-main
|
Convenience class for mapping from physical ODE joints in the model to control joints in the ICUB specification. More...
#include <OdeLogicalJoint.h>
Public Member Functions | |
OdeLogicalJoint () | |
Constructor. More... | |
virtual | ~OdeLogicalJoint () |
Destructor. More... | |
OdeLogicalJoint * | nest (int len) |
Create an array of nested control units. More... | |
OdeLogicalJoint * | at (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) |
![]() | |
virtual | ~LogicalJoint () |
Destructor. More... | |
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.
OdeLogicalJoint::OdeLogicalJoint | ( | ) |
Constructor.
Definition at line 30 of file OdeLogicalJoint.cpp.
|
virtual |
Destructor.
Definition at line 47 of file OdeLogicalJoint.cpp.
OdeLogicalJoint * OdeLogicalJoint::at | ( | int | index | ) |
Access a nested control unit.
Definition at line 64 of file OdeLogicalJoint.cpp.
|
virtual |
Implements LogicalJoint.
Definition at line 276 of file OdeLogicalJoint.cpp.
|
inlinevirtual |
Get the angle of an associated joint, in ICUB units and sign.
Implements LogicalJoint.
Definition at line 76 of file OdeLogicalJoint.h.
double OdeLogicalJoint::getAngleRaw | ( | ) |
Get the angle of an associated joint in unconverted units and sign.
Definition at line 186 of file OdeLogicalJoint.cpp.
|
inline |
Get the current target velocity.
Definition at line 100 of file OdeLogicalJoint.h.
|
virtual |
this is just a fake torque interface for now
Implements LogicalJoint.
Definition at line 175 of file OdeLogicalJoint.cpp.
|
inlinevirtual |
Get the angular velocity of an associated joint, in ICUB units and sign.
Implements LogicalJoint.
Definition at line 83 of file OdeLogicalJoint.h.
double OdeLogicalJoint::getVelocityRaw | ( | ) |
Get the velocity of an associated joint in unconverted units and sign.
Definition at line 202 of file OdeLogicalJoint.cpp.
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.
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.
|
inlinevirtual |
Implements LogicalJoint.
Definition at line 129 of file OdeLogicalJoint.h.
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.
|
virtual |
Set velocity and acceleration control parameters.
Implements LogicalJoint.
Definition at line 221 of file OdeLogicalJoint.cpp.
|
virtual |
Drive towards an angle setpoint (in ICUB units/sign).
Implements LogicalJoint.
Definition at line 236 of file OdeLogicalJoint.cpp.
|
virtual |
Set the reference torque.
Implements LogicalJoint.
Definition at line 182 of file OdeLogicalJoint.cpp.
|
virtual |
Set velocity of joint (in ICUB units/sign).
Implements LogicalJoint.
Definition at line 247 of file OdeLogicalJoint.cpp.
void OdeLogicalJoint::setVelocityRaw | ( | double | target | ) |
Set raw velocity of joint (in ODE units/sign).
Definition at line 257 of file OdeLogicalJoint.cpp.