Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIGEL_Robot::SIG_Robot Class Reference

SIG_Robot is the root class of the robot model. More...

#include <SIG_Robot.h>

List of all members.

Public Methods

 SIG_Robot (void)
 Standard constructor. More...

 SIG_Robot (QTextStream & tx)
 File or network constructor. More...

 SIG_Robot (const SIG_Robot & rob)
 copy constructor. More...

 ~SIG_Robot (void)
 Destructor. More...

void clear (void)
 Makes this a fresh and empty robot object. More...

void addBody (SIG_Body *b)
 Adds the geometry information. More...

void addMaterial (SIG_Material *m)
 Adds a SIG_Material object. More...

void addLink (SIG_Link *l, bool islink = false)
 Adds a SIG_Link object. More...

void addJoint (SIG_Joint *j)
 Adds a SIG_Joint object (or one of its descendants). More...

void addDrive (SIG_Drive *d)
 Adds a SIG_Drive object. More...

void addSensor (SIG_Sensor *s)
 Adds a SIG_Sensor object (or one of its descendants). More...

void setLangParam (SIG_LanguageParameters *lp, int delprev = 1)
 Sets a new language parameters object. More...

SIG_LanguageParametersgetLangParam (void) const
 Returns the language parameter object. More...

SIG_BodylookupBody (QString n) const
 Returns a SIG_Body object. More...

SIG_MateriallookupMaterial (QString n) const
 Returns a SIG_Material object. More...

SIG_LinklookupLink (QString n) const
 Returns a SIG_Link object. More...

SIG_JointlookupJoint (QString n) const
 Returns a SIG_Joint object. More...

SIG_DrivelookupDrive (QString n) const
 Returns a SIG_Drive object. More...

SIG_SensorlookupSensor (QString n) const
 Returns a SIG_Sensor object. More...

QDictIterator<SIG_BodygetBodyIter (void) const
 Returns an iterator over all SIG_Body objects. More...

QDictIterator<SIG_MaterialgetMaterialIter (void) const
 Returns an iterator over all SIG_Material objects. More...

QDictIterator<SIG_LinkgetLinkIter (void) const
 Returns an iterator over all SIG_Link objects. More...

QDictIterator<SIG_JointgetJointIter (void) const
 Returns an iterator over all SIG_Joint objects. More...

QDictIterator<SIG_DrivegetDriveIter (void) const
 Returns an iterator over all SIG_Drive objects. More...

QDictIterator<SIG_SensorgetSensorIter (void) const
 Returns an iterator over all SIG_Sensor objects. More...

SIG_Link const* getRootLink (void) const
 Returns the root link. More...

int getNrOfPoints (void) const
 Returns the number of points that are annotated to links by the user. More...

void setRootLink (SIG_Link *l)
 Marks a link as the root link. More...

void initiate (void)
 initiate calculates the initial positions and orientations of the links. More...

void loadGeometries (void)
 Makes all body objects load its geometr descriptions from file. More...

void instantiateGeometries (void)
 Duplicates the geometry descriptions loaded within a previous step. More...

void prepareDynaMo (void)
 Transforms the links' coordinate system to a form which is suitable for simulation with DynaMo. More...

void prepareDynaMechs (void)
 Transforms the links' coordinate system to a form which is suitable for simulation with DynaMechs. More...

void writeToFileTransfer (QTextStream & tx) const
 Robot to text stream transformation. More...

void readFromFileTransfer (QTextStream & tx)
 Helper functions for ill-built programs. More...


Public Attributes

DL_vector initialLocation
DL_matrix initialOrientation

Static Public Methods

void vectorToStream (QTextStream & tx, DL_vector vec)
 INTERNAL. More...

DL_vector streamToVector (QTextStream & tx)
 INTERNAL. More...

void matrixToStream (QTextStream & tx, DL_matrix mat)
 INTERNAL. More...

DL_matrix streamToMatrix (QTextStream & tx)
 INTERNAL. More...


Private Attributes

SIG_LanguageParameterslanguage
SIG_Linkrootlink
QDict<SIG_Bodybodies
QDict<SIG_Materialmaterials
QDict<SIG_Linklinks
QDict<SIG_Jointjoints
QDict<SIG_Drivedrives
QDict<SIG_Sensorsensors


Detailed Description

SIG_Robot is the root class of the robot model.

Having access to the SIG_Robot object one is able to obtain any information necessary to work with the robot model.

Note that this is a static model. No values will changed during the simulation. Therefore, a copy consisting of Dynamo lib objects, the dynamic model, has to be made.

Definition at line 34 of file SIG_Robot.h.


Constructor & Destructor Documentation

SIGEL_Robot::SIG_Robot::SIG_Robot ( void )
 

Standard constructor.

The standard constructor creates an empty robot model with no links and joints.

Definition at line 12 of file SIG_Robot.cpp.

SIGEL_Robot::SIG_Robot::SIG_Robot ( QTextStream & tx )
 

File or network constructor.

This constructor reads the whole robot from a stream, which may e.g. be linked to a file or to a network device. The information stored to and read from the stream includes the surface description.

Parameters:
tx   The stream with the position set immediately in front of the robot information. Should not be write-only.

Definition at line 20 of file SIG_Robot.cpp.

SIGEL_Robot::SIG_Robot::SIG_Robot ( const SIG_Robot & rob )
 

copy constructor.

internally, it works via text streams.

Definition at line 29 of file SIG_Robot.cpp.

SIGEL_Robot::SIG_Robot::~SIG_Robot ( void )
 

Destructor.

Definition at line 42 of file SIG_Robot.cpp.


Member Function Documentation

void SIGEL_Robot::SIG_Robot::addBody ( SIG_Body * b )
 

Adds the geometry information.

This adds a geometry information object of class SIG_Body. It is stored with the DXF Filename as its key.

Definition at line 79 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::addDrive ( SIG_Drive * d )
 

Adds a SIG_Drive object.

Definition at line 103 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::addJoint ( SIG_Joint * j )
 

Adds a SIG_Joint object (or one of its descendants).

Definition at line 98 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::addLink ( SIG_Link * l,
bool isroot = false )
 

Adds a SIG_Link object.

Parameters:
islink   This is deprecated. Use setRootLink instead.

Definition at line 89 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::addMaterial ( SIG_Material * m )
 

Adds a SIG_Material object.

Definition at line 84 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::addSensor ( SIG_Sensor * s )
 

Adds a SIG_Sensor object (or one of its descendants).

Definition at line 108 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::clear ( void )
 

Makes this a fresh and empty robot object.

Definition at line 48 of file SIG_Robot.cpp.

QDictIterator< SIG_Body > SIGEL_Robot::SIG_Robot::getBodyIter ( void ) const
 

Returns an iterator over all SIG_Body objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 155 of file SIG_Robot.cpp.

QDictIterator< SIG_Drive > SIGEL_Robot::SIG_Robot::getDriveIter ( void ) const
 

Returns an iterator over all SIG_Drive objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 175 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_DynaMechsSimulationData::SIG_DynaMechsSimulationData(), and SIGEL_Simulation::SIG_DynaMoSimulationData::SIG_DynaMoSimulationData().

QDictIterator< SIG_Joint > SIGEL_Robot::SIG_Robot::getJointIter ( void ) const
 

Returns an iterator over all SIG_Joint objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 170 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_DynaMoSimulationData::SIG_DynaMoSimulationData().

SIG_LanguageParameters * SIGEL_Robot::SIG_Robot::getLangParam ( void ) const
 

Returns the language parameter object.

Definition at line 120 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_Simulation::SIG_Simulation().

QDictIterator< SIG_Link > SIGEL_Robot::SIG_Robot::getLinkIter ( void ) const
 

Returns an iterator over all SIG_Link objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 165 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_DynaMoSimulationData::SIG_DynaMoSimulationData(), SIGEL_Visualisation::SIG_SimulationVisualisation::SIG_SimulationVisualisation(), SIGEL_Visualisation::SIG_SimulationVisualisation::updateRobotLinks(), and SIGEL_Visualisation::SIG_SimulationVisualisation::updateRobotPoints().

QDictIterator< SIG_Material > SIGEL_Robot::SIG_Robot::getMaterialIter ( void ) const
 

Returns an iterator over all SIG_Material objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 160 of file SIG_Robot.cpp.

int SIGEL_Robot::SIG_Robot::getNrOfPoints ( void ) const
 

Returns the number of points that are annotated to links by the user.

Definition at line 190 of file SIG_Robot.cpp.

Referenced by SIGEL_Visualisation::SIG_SimulationVisualisation::SIG_SimulationVisualisation().

SIG_Link const * SIGEL_Robot::SIG_Robot::getRootLink ( void ) const
 

Returns the root link.

The root link is also contained within the dictionary of links.

Definition at line 185 of file SIG_Robot.cpp.

QDictIterator< SIG_Sensor > SIGEL_Robot::SIG_Robot::getSensorIter ( void ) const
 

Returns an iterator over all SIG_Sensor objects.

This is a QDictIterator. Please read the Qt Library documentation to get informed about the usage of the iterator.

Definition at line 180 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_DynaMechsSimulationData::SIG_DynaMechsSimulationData(), and SIGEL_Simulation::SIG_DynaMoSimulationData::SIG_DynaMoSimulationData().

void SIGEL_Robot::SIG_Robot::initiate ( void )
 

initiate calculates the initial positions and orientations of the links.

Afterwards, all constraints that will be used in Dynamo are solved in advance.

WARNING! If there is a link loop within the robot, there may be constraints that are not solved. This depends on the soundness of the values the user entered.

CORRECTION! If the conditions that are described in the warning above are true, an exception will be thrown.

Definition at line 207 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::instantiateGeometries ( void )
 

Duplicates the geometry descriptions loaded within a previous step.

Afterwards, different links do not share a common geometry object.

Definition at line 227 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::loadGeometries ( void )
 

Makes all body objects load its geometr descriptions from file.

Definition at line 218 of file SIG_Robot.cpp.

SIG_Body * SIGEL_Robot::SIG_Robot::lookupBody ( QString n ) const
 

Returns a SIG_Body object.

Parameters:
n   This is DXF FILENAME of the body that is to be returned.

Definition at line 125 of file SIG_Robot.cpp.

SIG_Drive * SIGEL_Robot::SIG_Robot::lookupDrive ( QString n ) const
 

Returns a SIG_Drive object.

Parameters:
n   This is SYMBOLIC NAME of the drive that is to be returned.

Definition at line 145 of file SIG_Robot.cpp.

SIG_Joint * SIGEL_Robot::SIG_Robot::lookupJoint ( QString n ) const
 

Returns a SIG_Joint object.

Parameters:
n   This is SYMBOLIC NAME of the joint that is to be returned.

Definition at line 140 of file SIG_Robot.cpp.

SIG_Link * SIGEL_Robot::SIG_Robot::lookupLink ( QString n ) const
 

Returns a SIG_Link object.

Parameters:
n   This is SYMBOLIC NAME of the link that is to be returned.

Definition at line 135 of file SIG_Robot.cpp.

SIG_Material * SIGEL_Robot::SIG_Robot::lookupMaterial ( QString n ) const
 

Returns a SIG_Material object.

Parameters:
n   This is SYMBOLIC NAME of the material that is to be returned.

Definition at line 130 of file SIG_Robot.cpp.

Referenced by SIGEL_Simulation::SIG_DynaMoSimulationData::SIG_DynaMoSimulationData().

SIG_Sensor * SIGEL_Robot::SIG_Robot::lookupSensor ( QString n ) const
 

Returns a SIG_Sensor object.

Parameters:
n   This is SYMBOLIC NAME of the sensor that is to be returned.

Definition at line 150 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::matrixToStream ( QTextStream & tx,
DL_matrix mat ) [static]
 

INTERNAL.

Writes a matrix to a stream. This is a convenience function.

Definition at line 390 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::prepareDynaMechs ( void )
 

Transforms the links' coordinate system to a form which is suitable for simulation with DynaMechs.

Also performs calculation of initial positions and modified Denavit-Hartenberg parameters.

Definition at line 249 of file SIG_Robot.cpp.

Referenced by SIGEL_GP::SIG_GPFitnessTrainer::SIG_GPFitnessTrainer(), and SIGEL_MasterGUI::SIG_AllIndividualsView::slotVisualize().

void SIGEL_Robot::SIG_Robot::prepareDynaMo ( void )
 

Transforms the links' coordinate system to a form which is suitable for simulation with DynaMo.

Also calculates initial positions.

Definition at line 236 of file SIG_Robot.cpp.

Referenced by SIGEL_GP::SIG_GPFitnessTrainer::SIG_GPFitnessTrainer(), and SIGEL_MasterGUI::SIG_AllIndividualsView::slotVisualize().

void SIGEL_Robot::SIG_Robot::readFromFileTransfer ( QTextStream & tx )
 

Helper functions for ill-built programs.

Definition at line 326 of file SIG_Robot.cpp.

Referenced by SIGEL_GP::SIG_GPExperiment::loadExperiment().

void SIGEL_Robot::SIG_Robot::setLangParam ( SIG_LanguageParameters * lp,
int delprev = 1 )
 

Sets a new language parameters object.

If delprev is set to zero, the previous one will not be deleted.

Definition at line 113 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::setRootLink ( SIG_Link * l )
 

Marks a link as the root link.

The root link has to be within the dictionary of links already.

Definition at line 202 of file SIG_Robot.cpp.

DL_matrix SIGEL_Robot::SIG_Robot::streamToMatrix ( QTextStream & tx ) [static]
 

INTERNAL.

Reads a matrix from a stream. This is a convenience function.

Definition at line 397 of file SIG_Robot.cpp.

DL_vector SIGEL_Robot::SIG_Robot::streamToVector ( QTextStream & tx ) [static]
 

INTERNAL.

Reads a vector from a stream. This is a convenience function.

Definition at line 383 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::vectorToStream ( QTextStream & tx,
DL_vector vec ) [static]
 

INTERNAL.

Writes a vector to a stream. This is a convenience function.

Definition at line 376 of file SIG_Robot.cpp.

void SIGEL_Robot::SIG_Robot::writeToFileTransfer ( QTextStream & tx ) const
 

Robot to text stream transformation.

This method writes the whole robot including the surface information into a stream. When it is connected to a file, the robot can be saved to disk. When it is connected to a network socket, the robot can be propagated through a network.

Definition at line 269 of file SIG_Robot.cpp.

Referenced by SIGEL_GP::SIG_GPExperiment::saveExperiment(), and SIGEL_GP::SIG_GPPVMData::savePVMDataTransfer().


Member Data Documentation

QDict< SIG_Body > SIGEL_Robot::SIG_Robot::bodies [private]
 

Definition at line 38 of file SIG_Robot.h.

QDict< SIG_Drive > SIGEL_Robot::SIG_Robot::drives [private]
 

Definition at line 42 of file SIG_Robot.h.

DL_vector SIGEL_Robot::SIG_Robot::initialLocation
 

Definition at line 74 of file SIG_Robot.h.

DL_matrix SIGEL_Robot::SIG_Robot::initialOrientation
 

Definition at line 75 of file SIG_Robot.h.

QDict< SIG_Joint > SIGEL_Robot::SIG_Robot::joints [private]
 

Definition at line 41 of file SIG_Robot.h.

SIG_LanguageParameters * SIGEL_Robot::SIG_Robot::language [private]
 

Definition at line 36 of file SIG_Robot.h.

QDict< SIG_Link > SIGEL_Robot::SIG_Robot::links [private]
 

Definition at line 40 of file SIG_Robot.h.

QDict< SIG_Material > SIGEL_Robot::SIG_Robot::materials [private]
 

Definition at line 39 of file SIG_Robot.h.

SIG_Link * SIGEL_Robot::SIG_Robot::rootlink [private]
 

Definition at line 37 of file SIG_Robot.h.

QDict< SIG_Sensor > SIGEL_Robot::SIG_Robot::sensors [private]
 

Definition at line 43 of file SIG_Robot.h.


The documentation for this class was generated from the following files:
Generated at Mon Sep 3 01:32:55 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000