In file /home/blah/darwin2k/src/d2k/d2kcore/payload.h:A class for single-rigid-body payloads.
Inheritance:
Public Fields
-
link* l
- the link representing the payload
-
mechanism* m
- the mechanism representing the payload
-
dynoContactor* dc
- the dynoContactor
-
ptrList* connectors
- a list of connectors for the payload
-
triple xrel
- payload position relative to TCP
-
quaternion qrel
- payload orientation relative to TCP
-
triple originPos
- initial position of origin
-
quaternion initialQ
- initial orientation
-
int addToDS
- indicates whether the payload should be added to the dynamicSystem.
Public Methods
-
payload(void)
- constructor
-
~payload(void)
- destructor
-
virtual int readParams(paramParser* parser)
- reads payload variables from a p-file.
-
virtual int setVariables(const ptrList* taskParams)
- sets variables from any task parameters associated with the payload.
-
virtual int readFromFile(void)
- indicates whether the class should read payload geometry from a file.
-
int initFromFile(const char* filename)
- reads a payload's geometry from a file.
-
void computeToolCoords(triple &xtool, quaternion &qtool)
- given current pose and tool pose (xtool, qtool), compute pose relative to tool
-
void updatePose(triple &xtool, quaternion &qtool)
- update x and q given (xrel, qrel) and (xtool, qtool).
-
int alignConnectorToPose(triple &xtool, quaternion &qtool, int cnId)
- set (x, q) to align connector c (id = cnId) with (xtool, qtool)
-
inline int numConnectors(void)
- returns the number of connectors
-
inline connector* getConnector(int n)
- returns the i'th connector
-
connector* getConnectorById(int id)
- returns the connector with the specified id (if any match)
Public Fields
-
d2kSimulator* sim
-
configuration* cfg
-
const char* label
-
int active
Public Methods
-
virtual int minCfgs(void) const
-
virtual int maxCfgs(void) const
-
virtual const char* getCfgName(int i)
-
virtual int simInit(d2kSimulator* Sim)
-
virtual int init(ptrList* Cfgs)
-
virtual int forceCfgResolution(void)
-
virtual int cleanup(void)
-
virtual int update(int &violated)
-
virtual const cfgLabelRecord* getLabelRec(int i) const
Public Fields
-
static int staticClassID
-
int objectID
-
int verboseLevel
Public Methods
-
virtual const char* className(void) const
-
virtual synObject* copy(void) const
-
virtual int isOfType(int typeNum, int derivedOk)
-
static int setStaticClassID(void)
-
virtual int classID(void) const
Documentation
A class for single-rigid-body payloads.
The payload class represents payloads that can be attached to
a robot's end effector. Each payload is a single rigid body
(though possibly composed of multiple polyhedra) with one or more
coordinate frames defining grasp or connector locations. The
initFromFile() method can be used to read payload geometry (mpolys
and connector frames), while the alignConnectorToPose() method
sets the payloads current world-space position so that one of the
payload's connectors is aligned with the provided tool control point.
The payload can then be rigidly attached to the robot's end effector
by using configuration::setPayload().
- link* l
- the link representing the payload
- mechanism* m
- the mechanism representing the payload
- dynoContactor* dc
- the dynoContactor
- ptrList* connectors
- a list of connectors for the payload
- triple xrel
- payload position relative to TCP
- quaternion qrel
- payload orientation relative to TCP
- triple originPos
- initial position of origin
- quaternion initialQ
- initial orientation
- int addToDS
- indicates whether the payload should be added to the dynamicSystem.
This isn't necessary unless accurate physical simulation of the payload
is desired, and dynamic simulation is being used.
- payload(void)
- constructor
- ~payload(void)
- destructor
- virtual int readParams(paramParser* parser)
- reads payload variables from a p-file.
The variables read are:
- int verboseLevel - desired level of output
- char geometryFilename[] - file describing payload geometry
- triple originPos - initial location of the payload's origin
- quaternion initialQ - initial payload orientation
- virtual int setVariables(const ptrList* taskParams)
- sets variables from any task parameters associated with the
payload. The variables that are used by the payload class are:
- originX, originY, originZ - initial location of the payload's
origin
- initialR, initialI, initialJ, initialK - initial payload
orientation.
- virtual int readFromFile(void)
- indicates whether the class should read payload geometry
from a file. This returns 1 for the payload base class;
derived classes can override this to return 0 if geometry should
not be read from a file in the readParams() method.
- int initFromFile(const char* filename)
- reads a payload's geometry from a file.
The file is stored as text and is in the following format:
- number of connectors
- 16 floats specifying a 4x4 matrix for each connector
- number of mpolys
- description for each mpoly; see readMPoly() for details
- void computeToolCoords(triple &xtool, quaternion &qtool)
- given current pose and tool pose (xtool, qtool), compute
pose relative to tool
- void updatePose(triple &xtool, quaternion &qtool)
- update x and q given (xrel, qrel) and (xtool, qtool). also
compute I from Ibody.
- int alignConnectorToPose(triple &xtool, quaternion &qtool, int cnId)
- set (x, q) to align connector c (id = cnId) with (xtool, qtool)
- inline int numConnectors(void)
- returns the number of connectors
- inline connector* getConnector(int n)
- returns the i'th connector
- connector* getConnectorById(int id)
- returns the connector with the specified id (if any match)
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.