In file /home/blah/darwin2k/src/d2k/d2kcore/configuration.h:

class configuration

Represents a robot composed of parameterized modules.

Public Fields

[more]int id
an identifier
[more]char* label
an identifying label for the configuration.
[more]module* base
the base module
[more]mechanism* mech
the mechanism for the configuration
[more]baseModule::baseMotionType baseType
the type of base motion
[more]ptrList dofToJoint
mapping from DOFs to joints
[more]ptrList joints
local list of joints, in case mechanisms are split or joined
[more]ptrList links
local list of links, in case mechanisms are split or joined
[more]int numDOFs
number of DOFs in the configuration's mechanism
[more]int endpointDOFs
number of DOFs of each of the robot's endpoints (typically 6)
[more]int outputDOFs
total number of DOFs of the robots endpoints (ie.
[more]matrix* J
the robot's jacobian matrix
[more]vector pos
the position of each of the robot's degrees of freedom.
[more]vector vel
the velocity of each of the robot's degrees of freedom.
[more]int computeLockedTorques
indicates whether joint torques should be computed for locked DOFs
[more]ptrList* modules
a list of the modules comprising the robot
[more]ptrList* taskParams
a list of the task parameters for the configuration
[more]ptrList* chains
a list of serial chains
[more]ptrList* prototypes
a list of the configuration's prototype modules
[more]ptrList* endPoints
a list of endPointRecs, one per tool module
[more]ptrList* blocks
a list of blockRecs, used for composing the jacobian
[more]ptrList* constrainingModules
a list of modules that have dynamic constraints
[more]ptrList* cfgComponents
a list of cfgComponents

Public Methods

[more] configuration(void)
constructor
[more] configuration(const configuration &cfg)
copy constructor
[more] ~configuration(void)
destructor
[more]int init(dynamicSystem* ds)
instantiates the robot.
[more]void setMotionMode(motionMode m)
sets the motion mode (base only, chains only, or all)
[more]inline motionMode getMotionMode(void) const
returns the current motion mode
[more]inline int baseIsMobile(void) const
returns 1 if the base is mobile, or 0 if not
[more] kinematics
[more] joint and state stuff
[more]int computeDeflections(double &linearDeflection, double &angularDeflection)
computes the sum of end effector deflections due to applied forces
[more] miscellaneous
[more]int updateComponents(int &violated)
calls update() for all cfgComponents
[more]inline void addCfgComponent(cfgComponent* cc)
adds a cfgComponent to a configuration
[more]inline int removeCfgComponent(cfgComponent* cc)
removes a cfgComponent from a configuration
[more]const configuration& cfg2 return(cfg1 == cfg2)
[more] convenience functions. const versions are also available.

Public Members

[more]enum motionMode
Sets the current motion mode for the robot.


Documentation

Represents a robot composed of parameterized modules. Configurations provide an abstract representation of a robot, allowing the synthesizer to combine portions of different robots and create new robots by adding and removing modules. At the same time, configurations provide a higher level of abstraction than a purely geometric or mechanical representation of the robot, providing functionality such as computation of Jacobian matrices and organization of links and joints into serial chains.

Representation Each configuration has two graphs describing the robot's modules: A directed, acyclic graph of prototype modules in which multiple connections to a module result indicate that the subgraph rooted at the module should be reproduced, and a tree that is instantiated from the subgraph by duplicating the subgraphs with multiple incoming attachments. The initial graph is composed of prototype modules, which do not have any associated geometry. The instantiation process generates the tree and also creates a mechanical representation of the robot, in the form of a 'mechanism' composed of 'link' and 'joint' objects (defined in dyno.h).

oenum motionMode
Sets the current motion mode for the robot.

oint id
an identifier

ochar* label
an identifying label for the configuration. If non-null, it will be deleted by the destructor, so the setter of the label must ensure that the string has been allocated with the new operator.

omodule* base
the base module

omechanism* mech
the mechanism for the configuration

obaseModule::baseMotionType baseType
the type of base motion

optrList dofToJoint
mapping from DOFs to joints

optrList joints
local list of joints, in case mechanisms are split or joined

optrList links
local list of links, in case mechanisms are split or joined

oint numDOFs
number of DOFs in the configuration's mechanism

oint endpointDOFs
number of DOFs of each of the robot's endpoints (typically 6)

oint outputDOFs
total number of DOFs of the robots endpoints (ie. # rows in jacobian)

omatrix* J
the robot's jacobian matrix

ovector pos
the position of each of the robot's degrees of freedom. this is copied from the mechanism state by updateStateFromMech().

ovector vel
the velocity of each of the robot's degrees of freedom. this is copied from the mechanism state by updateStateFromMech().

oint computeLockedTorques
indicates whether joint torques should be computed for locked DOFs

optrList* modules
a list of the modules comprising the robot

optrList* taskParams
a list of the task parameters for the configuration

optrList* chains
a list of serial chains

optrList* prototypes
a list of the configuration's prototype modules

optrList* endPoints
a list of endPointRecs, one per tool module

optrList* blocks
a list of blockRecs, used for composing the jacobian

optrList* constrainingModules
a list of modules that have dynamic constraints

optrList* cfgComponents
a list of cfgComponents

o configuration(void)
constructor

o configuration(const configuration &cfg)
copy constructor

o ~configuration(void)
destructor

oint init(dynamicSystem* ds)
instantiates the robot. this should before doing any simulation.

ovoid setMotionMode(motionMode m)
sets the motion mode (base only, chains only, or all)

oinline motionMode getMotionMode(void) const
returns the current motion mode

oinline int baseIsMobile(void) const
returns 1 if the base is mobile, or 0 if not

o kinematics

oint setPayload(int toolIndex, payload* pl)
rigidly attaches pl to the indicated end effector. Note that the current pose of pl relative to the end effector will be preserved; thus, callers should first call payload::alignConnectorToPose() to ensure that one of the payload's connectors is aligned with the tool's TCP

oint setPayload(endPointRec* pt, payload* pl)
rigidly attaches pl to the indicated end effector. Note that the current pose of pl relative to the end effector will be preserved; thus, callers should first call payload::alignConnectorToPose() to ensure that one of the payload's connectors is aligned with the tool's TCP

oint computeJacobian(void)
computes the jacobian for the configuration, storing it in J

oint computeJacobian(matrix &Jc, serialChain* c, link* l, const triple &xlink, int includeRotations)
computes the jacobian for the specified chain

ovoid setChainCost(double c)
sets the relative cost for moving serial chains. This can be used with jacobian control to cause serial chain DOFs to be moved in preference to base DOFs when kinematic redundancy exists.

ovoid setBaseCost(double c)
sets the relative cost for moving base DOFs. This can be used with jacobian control to cause base DOFs to be moved in preference to serial chain DOFs when kinematic redundancy exists.

ovoid getCostVector(vector &v) const
returns the cost for each DOF in v

ovoid getMaxVelocityVector(vector &v)
returns the maximum velocity for each DOF in v

oint setLockFromEndpoint(int endPt, int val, int recurse)
locks or unlocks all joints contributing to motion of an end effector. val determines whether joints should be locked (1) or unlocked (0). If recurse is 0, then only those joints in the serial chain containing the end effector are locked (or unlocked); if 1, then all joints in the mechanism that cause the end effector to move are locked (or unlocked)

oint setLockFromEndpoint(endPointRec* endPt, int val, int recurse)
locks or unlocks all joints contributing to motion of an end effector. val determines whether joints should be locked (1) or unlocked (0). If recurse is 0, then only those joints in the serial chain containing the end effector are locked (or unlocked); if 1, then all joints in the mechanism that cause the end effector to move are locked (or unlocked)

oint clearLock(void)
unlocks any joints in the mechanism that are currently locked

o joint and state stuff

odouble maxVel(joint* jt, int jdim) const
returns the maximum velocity for the specified DOF and joint

odouble power(joint* jt, int jdim) const
returns the power used by the indicated DOF, given current vel & torque

odouble maxTorque(joint* jt, int jdim, int isBraking) const
returns the magnitude of the maximum torque/force for the indicated DOF given current velocity. If isBraking is non-zero, then the magnitude of the maximum braking torque/force is returned.

odouble contTorque(joint* jt, int jdim) const
returns the continuous torque rating for the indicated DOF

oint isPassive(joint* jt, int jdim) const
returns 1 if the indicated joint is passive, or 0 if actuated

oint updateStateFromMech(void)
updates cfg->pos and cfg->vel from mechanism position & velocity

oint updateMechFromState(void)
updates mechanism position & velocity from cfg->pos and cfg->vel

oint updatePose(void)
calls mech->setPoseFromJoints and updates endpoint info

oint updatePose(const quaternion &q, const triple &t)
calls mech->setPoseFromJoints and updates endpoint info

oint computeDeflections(double &linearDeflection, double &angularDeflection)
computes the sum of end effector deflections due to applied forces

o miscellaneous

ovoid computeCG(double &m, triple &cg) const
computes the mass and center of gravity of the configuration

odouble computeMass(void) const
computes the mass of the configuration

odouble computeEnergyStability(const triple &gravity) const
computes the amount of energy required to tip over the robot

ovoid computeLimitGradient(vector &v) const
computes a gradient vector used for joint-limit avoidance

o cfgComponents

oint updateComponents(int &violated)
calls update() for all cfgComponents

oinline void addCfgComponent(cfgComponent* cc)
adds a cfgComponent to a configuration

oinline int removeCfgComponent(cfgComponent* cc)
removes a cfgComponent from a configuration

oconst configuration& cfg2 return(cfg1 == cfg2)

o convenience functions. const versions are also available.

oinline joint* getJointByDOF(int dof)
returns the joint associated with the indicated DOF, or NULL if the DOF is for the base

oinline int numJoints(void) const
returns the number of joints

oinline int numLinks(void) const
returns the number of links

oinline int numModules(void) const
returns the number of modules

oinline int numChains(void) const
returns the number of serial chains

oinline int numPrototypes(void) const
returns the number of prototype modules

oinline int numEndPoints(void) const
returns the number of end effectors

oinline int numBlocks(void) const
returns the number of blocks

oinline int numTaskParams(void) const
returns the number of task parameters

oinline int numComponents(void) const
returns the number of cfgComponents

oinline baseModule* getBase(void)
returns the root module typecast to a baseModule. NOTE: this does not check to see that the root module actually is a baseModule, so beware!

oinline module* getPrototype(int i)
returns the i'th prototype module

oinline module* getModule(int i)
returns the i'th module

oinline link* getLink(int i)
returns the i'th link

oinline joint* getJoint(int i)
returns the i'th joint

oinline serialChain* getChain(int i)
returns the i'th serial chain

oinline endPointRec* getEndPoint(int i)
returns the i'th endpoint record

oinline blockRec* getBlock(int i)
returns the i'th block

oinline param* getTaskParam(int i)
returns the i'th task parameter

oinline cfgComponent* getComponent(int i)
returns the i'th cfgComponent


This class has no child classes.
Friends:
module
int operator==(const configuration &cfg1, const configuration &cfg2)
int operator!=(const configuration &cfg1,

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.