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

OSCAR::PCRoboworksInterface Class Reference
[Device]

This class multiply inherits from RoboworksInterface and PowerCubeBase classes. This is an interface for PowerCube simulation (when simulation is done in Roboworks.). It has following functionality. -Object construction and initialization -Homing -Resetting -Halting -Getting and setting positions of modules and gripper(if any) Note: for giving position commands call SetServoValue() (See RobotServoInterface.h). The implementation is in SetPosition(). More...

#include <PCRoboWorksInterface.h>

Inheritance diagram for OSCAR::PCRoboworksInterface:

Inheritance graph
[legend]
List of all members.

Public Methods

 PCRoboworksInterface (const String &_roboworksFile, unsigned int _numberofTags, const char **_tagNames, unsigned int _dof, bool _hasGripper, const String &_ipAddress=SELF, OSCARError &_err=DUMMY_ERROR(noError))
 ~PCRoboworksInterface ()
virtual bool Initialize ()
bool Close ()
bool GetNumModules (unsigned int &count)
bool Home (unsigned int modNo)
bool HomeQuiet (unsigned int modNo)
bool Halt ()
virtual bool Reset (unsigned int modNo)
virtual bool GetCurrent (VectorF &_currentLimits)
bool OpenGripper (double openPos)
bool GetStatusFlag (unsigned int iModule, unsigned long flag, bool &isSet)
virtual const OSCARErrorGetError () const
virtual bool Home (unsigned int modNo)
bool Home (BoolArray bHomeArray)
bool Home ()
virtual bool Reset (unsigned int modNo)
bool Reset (const BoolArray &bResetArray)
bool Reset ()

Protected Methods

bool getPosition (VectorF &jointValues)
bool setPosition (const VectorF &jointValues)
bool getVelocity (VectorF &jointVelocities)
bool setVelocity (const VectorF &jointVelocities)
virtual bool setVelocityLimits (const VectorF &_minJointVel, const VectorF &_maxJointVel)

Protected Attributes

unsigned int dof
VectorF currentTagValues
VectorF tagValues
BoolArray isHomed
BoolArray isHalted

Detailed Description

Author:
Initial Implementation: Dinesh Rabindran, Chetn Kapoor


Constructor & Destructor Documentation

OSCAR::PCRoboworksInterface::PCRoboworksInterface const String   _roboworksFile,
unsigned int    _numberofTags,
const char **    _tagNames,
unsigned int    _dof,
bool    _hasGripper,
const String   _ipAddress = SELF,
OSCARError   _err = DUMMY_ERROR(noError)
 

Constructor. intializes thru' the parent class constructors const String& _roboworksFile = Roboworks FileName unsigned int _numberofTags = Number of Tags const char** _tagNames = array of Tagnames unsigned int _dof = degrees of freedom bool _hasGripper = true if system has PowerCube gripper const String& _ipAddress = ipAddress of the controller machine OscarError _err = OSCAR error object used to handle errors generated.

See also:
~PCRoboworksInterface()

OSCAR::PCRoboworksInterface::~PCRoboworksInterface  
 

destructor, does Nothing

See also:
PCRoboworksInterface()


Member Function Documentation

bool OSCAR::PCRoboworksInterface::Close   [virtual]
 

Disconnects from Roboworks.

Returns:
bool = true if successfully disconnected, false otherwise
Parameters:
void 

Reimplemented from OSCAR::RoboworksInterface.

virtual bool OSCAR::PCRoboworksInterface::GetCurrent VectorF   _currentLimits [virtual]
 

gets current. Curently this methd is not supported. All it does is sets the error stating method is not supported. This method overrides the base class method.

Returns:
bool: Always returns false
Parameters:
VectorF& _currentLimits = vector to return current

Reimplemented from OSCAR::PowerCubeBase.

virtual const OSCARError& OSCAR::PCRoboworksInterface::GetError   const [virtual]
 

Returns an error value which is set by certain operation, e.g. object creation or member function call,etc. This method is inherited from Base and is redefined over here because PCRoboWorks interface is multiply inherited. This multiple inheritance leads to ambiguity. As such this method is redifned to call the PowerCubeBase::GetError -Everytime there is a failure to creat an object or call function , This function is used to get the failure reason (error value).

Returns:
error value corresponding to some specific failure. There will be a file to setup the error value and its description.
Parameters:
void 

Reimplemented from OSCAR::Base.

bool OSCAR::PCRoboworksInterface::GetNumModules unsigned int &    count [virtual]
 

pure virtual: Gets the number of modules attached to the robot.

Parameters:
unsigned int& count = number of modules
Returns:
bool = true if the number of modules is successfully read, false if not

Implements OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::getPosition VectorF   jointValues [protected, virtual]
 

Implements OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::GetStatusFlag unsigned int    iModule,
unsigned long    flag,
bool &    isSet
[virtual]
 

Checks whether or not a status flag is set for a joint.

Returns:
bool = true if the command is successful
Parameters:
unsigned int iModule = the joint number of the module unsigned long flag = the status flag to check. These are described in the Amtec documentation. bool& isSet = returns true if the flag is set, false if not.

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::getVelocity VectorF   jointVelocities [protected, virtual]
 

Implements OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::Halt   [virtual]
 

pure virtual: Stops all modules immediately.Modules cannot be moved until they are reset.

Returns:
bool = true if no error

Implements OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeBase::Home  
 

-Sends all modules to the home position. -Functionality implemented in derived class.

Returns:
bool = true if no error

bool OSCAR::PowerCubeBase::Home BoolArray    bHomeArray
 

-Sends modules to the home position. -Functionality implemented in derived class. -example: For a 3DOF robot BoolArray bInitArray(3, {true, false, true}); robot.Home(bInitArray); This call would send modules 1 and 3 home.

Parameters:
BoolArray bHomeArray = Boolean array of modules to initialize
Returns:
bool = true if modules are homed successfully

virtual bool OSCAR::PowerCubeBase::Home unsigned int    modNo
 

-Sends a single module to the zero position. -Functionality implemented in derived class. example: For a 3DOF robot, robot.Home(2); This command would home module 3 -This method must be overriden. The method only performs input data checking, so in the derived class method, the base class method must be called first.

Parameters:
unsigned int modNo = Module number. Indexing starts at 0, so the first module would be 0, the second module would be 1, etc...
Returns:
bool = true if module homed successfully

bool OSCAR::PCRoboworksInterface::Home unsigned int    modNo [virtual]
 

-Sends a single module to the zero position. -Functionality implemented in derived class. example: For a 3DOF robot, robot.Home(2); This command would home module 3 -This method must be overriden. The method only performs input data checking, so in the derived class method, the base class method must be called first.

Parameters:
unsigned int modNo = Module number. Indexing starts at 0, so the first module would be 0, the second module would be 1, etc...
Returns:
bool = true if module homed successfully

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::HomeQuiet unsigned int    modNo [virtual]
 

-Sends a single module to the zero position, without interactive confirmation -Functionality implemented in derived class. example: For a 3DOF robot, robot.Home(2); This command would home module 3 -This method must be overriden. The method only performs range check on supplied model number. There is no interactive confirmation. So in the derived class method, the base class method must be called first.

Parameters:
unsigned int modNo = Module number. Indexing starts at 0, so the first module would be 0, the second module would be 1, etc...
Returns:
bool = true if module homed successfully

Reimplemented from OSCAR::PowerCubeBase.

virtual bool OSCAR::PCRoboworksInterface::Initialize   [virtual]
 

Connects to Roboworks using RoboTalk.

Returns:
bool = true if connection is successful, false otherwise
Parameters:
void 

Reimplemented from OSCAR::RoboworksInterface.

bool OSCAR::PCRoboworksInterface::OpenGripper double    openPos [virtual]
 

Opens gripper to the given position using a linear interpolator Error-Checking implemented by the PowerCubeBase class. Simulation specific code is within this method.

Returns:
bool = true if the command is sent successfully
Parameters:
double openPos = position to send gripper to.

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeBase::Reset  
 

Resets all modules to recover from an error or halt condition. -After an error or halt command which causes the module to stop running this command must be sent to reset all the modules from the error condition. This command cannot be used to recover from certain error conditions. See Amtec docs.

Returns:
bool = true if the reset command is sent successfully

bool OSCAR::PowerCubeBase::Reset const BoolArray   bResetArray
 

Resets modules to recover from an error or halt condition. -example: for a 3DOF robot; BoolArray bResetArray(3, {true, false, true}); robot.reset(bResetArray); -After an error or halt command which causes the module to stop running this command must be sent to reset all the modules from the error condition. This command cannot be used to recover from certain error conditions. See Amtec docs.

Parameters:
BoolArray& bResetArray = Boolean array of modules to reset
Returns:
bool

virtual bool OSCAR::PowerCubeBase::Reset unsigned int    modNo
 

Resets modules to recover from an error or halt condition. -example: robot.reset(2); This call would reset module 3. -After an error or halt command which causes the module to stop running this command must be sent to reset all the modules from the error condition. This command cannot be used to recover from certain error conditions. See Amtec docs. -This method must be overriden. The method only performs input data checking, so in the derived class method, the base class method must be called first.

Parameters:
unsigned int modNo = the module number to be reseted handle.
Returns:
bool

virtual bool OSCAR::PCRoboworksInterface::Reset unsigned int    modNo [virtual]
 

Resets modules to recover from an error or halt condition. -example: robot.reset(2); This call would reset module 3. -After an error or halt command which causes the module to stop running this command must be sent to reset all the modules from the error condition. This command cannot be used to recover from certain error conditions. See Amtec docs. -This method must be overriden. The method only performs input data checking, so in the derived class method, the base class method must be called first.

Parameters:
unsigned int modNo = the module number to be reseted handle.
Returns:
bool

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::setPosition const VectorF   jointValues [protected, virtual]
 

Implements OSCAR::PowerCubeBase.

bool OSCAR::PCRoboworksInterface::setVelocity const VectorF   jointVelocities [protected, virtual]
 

Implements OSCAR::PowerCubeBase.

virtual bool OSCAR::PCRoboworksInterface::setVelocityLimits const VectorF   _minJointVel,
const VectorF   _maxJointVel
[protected, virtual]
 

Reimplemented from OSCAR::PowerCubeBase.


Member Data Documentation

VectorF OSCAR::PCRoboworksInterface::currentTagValues [protected]
 

unsigned int OSCAR::PCRoboworksInterface::dof [protected]
 

Reimplemented from OSCAR::RobotServoInterface.

BoolArray OSCAR::PCRoboworksInterface::isHalted [protected]
 

BoolArray OSCAR::PCRoboworksInterface::isHomed [protected]
 

VectorF OSCAR::PCRoboworksInterface::tagValues [protected]
 


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