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

class module

An object representing part of a robot.

Inheritance:


Public Fields

[more]static int currentID
a counter used to give each module a unique identifier
[more]static const tmatrix connectionRotation
the rotation applied to a connector when connecting two modules
[more]configuration* cfg
pointer to configuration
[more]int ref
index of module in cfg's module list
[more]char* name
(optional) name to distinguish it within a configuration
[more]bool isPrototype
true if used for instantiating only
[more]handedness whichSide
indicates left/right for some modules
[more]module* parent
parent module; only set if !isPrototype
[more]assembly* as
assembly of module's parts
[more]ptrList* params
list of parameters
[more]ptrList* attachments
list of attachments
[more]cptrList* components
list of components
[more]const componentContext* context
components for parameters

Public Methods

[more] Virtual methods.
[more] convenience functions
[more]inline const ptrList* getDependencies(int whichParam)
returns a list of dependencies (if any) for the indicated parameter.

Public Members

[more]enum subType
Indicates the general type of module:
  • BASE - the module is specialized to represent a fixed or mobile robot base.
    [more]enum handedness
    Indicates the handedness of a module.

Protected Methods

[more]void assignConnectorIDs(void)


Inherited from synObject:

Public Fields

ostatic int staticClassID
oint objectID
oint verboseLevel

Public Methods

ovirtual const char* className(void) const
ovirtual synObject* copy(void) const
ovirtual int isOfType(int typeNum, int derivedOk)
ostatic int setStaticClassID(void)
ovirtual int classID(void) const


Documentation

An object representing part of a robot. Overview A module represents part of a robot. A module might represent a robot link, tool, base, or joint of varying complexity: one module class may represent a simple, hollow tube serving as part of a manipulator link, while another may be an entire mobile robot with multiple manipulators. Each module may have one or more parameters which determine the module's properties, such as geometric dimensions or the selection of a motor and gearbox from a list of components. Modules provide an easy way for users and the synthesizer to construct robots.

Module types There are four general types of modules: links, tools, joints, and bases. Links are the least 'special' of modules; they have no special methods. Tools have methods for locating an end-effector's tool control point (TCP), while joints and bases can have active or passive degrees of freedom to allow the robot to move. Tools, joints, and bases all define their own methods, which may be overridden by derived classes. All of the basic module types are abstract base classes; actual modules must be created from derived classes which provide specific methods.

Connecting modules Modules are connected to each other by attachments to form a robot, called a 'configuration'. The attachments are made between connectors on different modules. The configuration's module graph is directed and acyclic, and each module's 'ref' member indicates the index of the module in the configuration's list of modules. A module that has an outgoing attachment is called the parent module of the modules on the other end of the attachment. To force the configuration graph to be directed, every child module must have a higher value of 'ref' than its parent. Each module's list of attachments only includes attachments to children (modules with a higher ref). The the attachment list is sorted by connector ID. Functions which modify configurations & modules should preserve this property.

oenum subType
Indicates the general type of module:

oenum handedness
Indicates the handedness of a module. Handedness is defined in a class-specific manner: some modules may not use handedness at all, while others will reflect module geometry about an axis depending on the handedness.

ostatic int currentID
a counter used to give each module a unique identifier

ostatic const tmatrix connectionRotation
the rotation applied to a connector when connecting two modules

oconfiguration* cfg
pointer to configuration

oint ref
index of module in cfg's module list

ochar* name
(optional) name to distinguish it within a configuration

obool isPrototype
true if used for instantiating only

ohandedness whichSide
indicates left/right for some modules

omodule* parent
parent module; only set if !isPrototype

oassembly* as
assembly of module's parts

optrList* params
list of parameters

optrList* attachments
list of attachments

ocptrList* components
list of components

oconst componentContext* context
components for parameters

o Virtual methods.
These methods encapsulate the class-specific properties and capabilities of modules. Many of these methods are pure virtual to force derived classes to override them.

ovirtual int createGeometry(handedness which) = 0
creates the parts and joints composing the module's geometry

ovirtual subType type(void) const = 0
indicates the general type (link, tool, base, or joint) of the module

oinline virtual int isBase(void) const
convenience function; returns 1 if the module is a base, 0 otherwise

ovirtual int numParams(void) const = 0
returns the number of parameters

ovirtual paramSpec* getParamSpec(void) const
(optionally) returns a specification for module parameters

ovirtual int numConnectors(void) const = 0
returns the number of connectors

ovirtual connectorSpec* getConnectorSpec(void) const
(optionally) returns a specification for module parameters

ovirtual int requiresContext(void) const = 0
indicates whether the module uses a component context to select components

ovirtual const ptrList* compDepTable(void) const
returns a pointer to the component dependency table, if one exists

ovirtual int addAdditionalIgnoredCDPairs(void)
any links that should be allowed to have collisions (possibly due to the use of a simplified collision detection model should be dealt with here. See the collisionDetector class for more information

ovirtual int postInstantiationInit(void)
a method called by configuration::init after all modules and the resulting mechanism have been instantiated. Actions such as setting the initial angles of a module's joints can be done in this function.

ovirtual int hasDynamicConstraints(void)
indicates whether the module has dynamic constraints.

ovirtual int addDynamicConstraints(void)
creates the module's dynamic constraints (if any)

ovirtual int enforceConstraints(void)
kinematically enforces the module's constraints

ovirtual int updateConstraintDynamicValues(void)
allows variables to be updated before evaluting the constraint dynamic equations.

ovirtual int computeDeflections(ownerSegment* ms, linkForceContext* lf, triple &trans, quaternion &rot)
computes the deflections of a module's links

ovirtual double checkInternalForces(void)
checks link forces to ensure that breaking strengths aren't exceeded. returns safety factor, or a negative number on error. By default, module::checkInternalForces() returns 10.

o component-related functions

o convenience functions

oinline int numAttachments(void) const
returns the number of attachments to child modules

oinline connector* getConnector(int i)
returns the i'th connector

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

oinline attachment* getAttachment(int i)
returns the i'th attachment

oinline int numChildren(void) const
returns the number of children (== number of attachments)

oinline const ptrList* getDependencies(int whichParam)
returns a list of dependencies (if any) for the indicated parameter. see src/d2k/db/componentDB.cxx and src/d2k/modules/components.cxx for more information on components.

ovoid assignConnectorIDs(void)


Direct child classes:
toolModule
linkModule
dofModule
Friends:
configuration
int operator==(const module &m1, const module &m2)
int operator != (const module &m1, const module &m2)

Alphabetic index HTML hierarchy of classes or Java



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