Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OSCAR::RepositoryList Class Reference
[PerformanceCriteria]

RepositoryList is a list which holds Repository objects. This list will be passed to criteria to give them a place to read and write data for criteria computations. More...

#include <RepositoryList.h>

Inheritance diagram for OSCAR::RepositoryList:

Inheritance graph
[legend]
List of all members.

Public Methods

 RepositoryList (unsigned int maxNoSolutions, unsigned int DOF, unsigned int noOutputs=6, const String &objectName=String(""))
 ~RepositoryList ()
RepositoryFind (const String &repoName)
RepositoryInsert (const String &repoName, Repository *repo)
bool SetJointOptions (VectorArray &solutions)
bool GetJointOptions (VectorArray &solutions) const
VectorArray GetJointOptions (void) const
bool GetJointOption (unsigned int solutionNum, Vector &solution) const
Vector GetJointOption (unsigned int solutionNum) const
bool SetEEFOptions (Array< HandPose > &eefSolutions)
bool GetEEFOptions (Array< HandPose > &eefSolutions) const
Array< HandPoseGetEEFOptions (void) const
bool GetEEFOption (unsigned int solutionNum, HandPose &solution) const
HandPose GetEEFOption (unsigned int solutionNum) const

Public Attributes

unsigned int maxNoSolutions
unsigned int DOF
unsigned int noOutputs

Protected Attributes

RepositoryMap repositoryList
RepositoryMap::iterator repositoryIterator
VectorRepositorysolutionsPtr
HandPoseRepositoryeefSolutionsPtr

Detailed Description

Author:
Mark Tisius and Chetan Kapoor


Constructor & Destructor Documentation

OSCAR::RepositoryList::RepositoryList unsigned int    maxNoSolutions,
unsigned int    DOF,
unsigned int    noOutputs = 6,
const String   objectName = String("")
 

Constructor for RepositoryList This constructor creates a dynamic list of Repository objects. A dynamic list is necessary so Repository objects can be read, set, or added as necessary during run-time. The only Repositories automatically inserted are VectorRepositories to hold the joint and EEF solutions which criteria will run on, all others are inserted by the criteria which require them.

Parameters:
maxNoSolutions The number of solutions which criteria will evaluate.
DOF The number of joints in the manipulator.
noOutputs The output space of the EEF. Only the jacobian criteria could currently handle an output space less than 6.
objectName String which specifies the name of the RepositoryList object.

OSCAR::RepositoryList::~RepositoryList  
 

Destructor for Repository It deletes all repositories which are members of the list.


Member Function Documentation

Repository* OSCAR::RepositoryList::Find const String   repoName
 

Method to find a Repository in the list This method finds the specified repository in the list and returns a pointer to that repository. It only returns a Repository pointer so in order to have access to the Get/Set methods in TypeRepository you must static cast the pointer to a TypeRepository or higher pointer.

Parameters:
repoName String name of the repository to be searched for.
Returns:
Repository* Pointer to the repository specified in the parameters. If it is not in the list a null pointer is returned. This pointer then must be static cast to a higher class to have access to internal data.

HandPose OSCAR::RepositoryList::GetEEFOption unsigned int    solutionNum const
 

Method to get an EEFOption This method returns the EEF option specified.

Parameters:
solutionNum The number of the solution to be returned.
Returns:
HandPose The EEF option specified by the user.
Exceptions:
outOfRange If the solutionNum is larger than the number of handPoses stored.

bool OSCAR::RepositoryList::GetEEFOption unsigned int    solutionNum,
HandPose   solution
const
 

Method to get an EEFOption This method gets the EEF option specified.

Parameters:
solutionNum The index of the solution to be returned.
solution HandPose which will hold the solution.
Exceptions:
outOfRange Error if the index is larger than the number of handPoses stored.
Returns:
bool True if successful, false otherwise.

Array<HandPose> OSCAR::RepositoryList::GetEEFOptions void    const
 

Method to get the EEFOptions This method returns the HandPose options for which criteria will or have been computed on.

Returns:
Array<HandPose> The EEF options used by the criteria.

bool OSCAR::RepositoryList::GetEEFOptions Array< HandPose > &    eefSolutions const
 

Method to get the EEFOptions This method gets the HandPose options for which criteria will or have been computed on.

Parameters:
eefSolutions Array which the solutions will be written to.
Exceptions:
arraySizeMismatch Error if the Array is not of size maxNoSolutions.
Returns:
bool True if successful, false otherwise.

Vector OSCAR::RepositoryList::GetJointOption unsigned int    solutionNum const
 

Method to get a JointOption This method returns the joint option specified.

Parameters:
solutionNum The number of the solution to be returned.
Returns:
Vector The joint option specified by the user.
Exceptions:
outOfRange If the solutionNum is larger than the number of solutions stored.

bool OSCAR::RepositoryList::GetJointOption unsigned int    solutionNum,
Vector   solution
const
 

Method to get a JointOption This method gets the joint option specified.

Parameters:
solutionNum The index of the solution to be returned.
solution Vector which will hold the solution.
Exceptions:
outOfRange Error if the index is larger than the number of solutions stored.
vectorSizeMismatch Error if the vectors in VectorArray are not of size DOF.
Returns:
bool True if successful, false otherwise.

VectorArray OSCAR::RepositoryList::GetJointOptions void    const
 

Method to get the JointOptions This method returns the joint options for which criteria will or have been computed on.

Returns:
VectorArray The joint options used by the criteria.

bool OSCAR::RepositoryList::GetJointOptions VectorArray   solutions const
 

Method to get the JointOptions This method gets the joint options for which criteria will or have been computed on.

Parameters:
solutions VectorArray which the solutions will be written to.
Exceptions:
arraySizeMismatch Error if the VectorArray does not contain maxNoSolutions vectors
vectorSizeMismatch Error if the vectors in VectorArray are not of size DOF.
Returns:
bool True if successful, false otherwise.

Repository* OSCAR::RepositoryList::Insert const String   repoName,
Repository   repo
 

Method to insert a Repository in the list. This method inserts a pointer to the specified repository and stores it under the string name specified. If a repository is already in the list under the specified name an error will be given and a null pointer returned.

Parameters:
repoName Name the repository pointer will be stored under.
repo Pointer to the repository to be inserted in the list.
Returns:
Repository* Pointer to the repository inserted into the list.
Exceptions:
repositoryAlreadyExists Error given if a repository of the same name is already in the list.

bool OSCAR::RepositoryList::SetEEFOptions Array< HandPose > &    eefSolutions
 

Method to set the EEFOptions This method sets the HandPose options so criteria can compute the EEF criteria values.

Parameters:
eefSolutions Array containing the possible HandPose options to choose from.
Returns:
bool True if successful, false otherwise.
Exceptions:
arraySizeMismatch Error if the Array is not of size maxNoSolutions.

bool OSCAR::RepositoryList::SetJointOptions VectorArray   solutions
 

Method to set the JointOptions This method sets the joint options so criteria can compute the criteria values. Note::This resets all the repository updated flags to false.

Parameters:
solutions VectorArray containing the possible joint solutions to choose from.
Returns:
bool True if successful, false otherwise.
Exceptions:
arraySizeMismatch Error if the VectorArray does not contain maxNoSolutions vectors
vectorSizeMicmatch Error if the vectors in VectorArray are not of size DOF.

Todo:
Later this could be placed inside the GenerateOptions object so everytime solutions are generated by IK they are automatically set in the List.


Member Data Documentation

unsigned int OSCAR::RepositoryList::DOF
 

HandPoseRepository* OSCAR::RepositoryList::eefSolutionsPtr [protected]
 

unsigned int OSCAR::RepositoryList::maxNoSolutions
 

unsigned int OSCAR::RepositoryList::noOutputs
 

RepositoryMap::iterator OSCAR::RepositoryList::repositoryIterator [protected]
 

RepositoryMap OSCAR::RepositoryList::repositoryList [protected]
 

VectorRepository* OSCAR::RepositoryList::solutionsPtr [protected]
 


The documentation for this class was generated from the following file:
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations