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

OSCAR::PowerCubeInterface Class Reference
[Device]

This class, derived from PowerCubeBase class, implements the software interface to control mechanism/robot hardware assembled from PowerCube modules manufactured by Amtec Robotics (http://www.amtec-robotics.com/index.html) that is part of the Schunk group(http://www.schunk.com/). More...

#include <PowerCubeInterface.h>

Inheritance diagram for OSCAR::PowerCubeInterface:

Inheritance graph
[legend]
List of all members.

Public Methods

 PowerCubeInterface (const unsigned int _dof, const bool _hasGripper, const int idarray[], String _initString, const String &name=String(""), OSCARError &err=DUMMY_ERROR(noError))
virtual ~PowerCubeInterface ()
virtual bool PowerCubeInterface::Initialize ()
virtual bool PowerCubeInterface::Open ()
virtual bool PowerCubeInterface::Close ()
virtual bool GetNumModules (unsigned int &count)
virtual bool SetIDMap (const int n, const int idarray[])
virtual bool Home (unsigned int modNo)
virtual bool HomeQuiet (unsigned int modNo)
virtual bool HomeAll ()
virtual bool Halt ()
virtual bool Reset (int modNo)
virtual bool OpenGripper (double openPos)
virtual bool GetCurrent (VectorF &currentArray)
virtual bool GetControlParameters (unsigned int modNo, VectorI &controlParameters)
virtual bool SetControlParameters (unsigned int modNo, VectorI &controlParameters)
virtual bool ReleaseBrake ()
bool SetCurrentToZero (unsigned int modNo)
bool SetCurrentToZero (BoolArray bCurrentArray)
bool SetCurrent (const VectorF &jointCurrents)
bool SetCurrent (unsigned int moduleNo, const float jointCurrent)
virtual bool GetCurrentLimits (VectorF &currentLimits)
virtual bool SetCurrentLimits (const VectorF &currentLimits)
virtual bool GetStatusFlag (unsigned int modNo, unsigned long flag, bool &isSet)
virtual bool GetStatusString (int iModule, String &statString)
bool PowerCubeInterface::CheckErrorStatus (int modNo, bool &cubeOK)
bool GetHardwarePositionLimits (VectorF &_minPosLimits, VectorF &_maxPosLimits)
bool GetHardwareVelocityLimits (VectorF &_maxVelLimits)
bool GetHardwareCurrentLimits (VectorF &_maxCurLimits)
virtual bool Home (unsigned int modNo)
bool Home (BoolArray bHomeArray)
bool Home ()

Protected Methods

virtual bool getPosition (VectorF &jointValues)
virtual bool setPosition (const VectorF &jointValues)
virtual bool getVelocity (VectorF &jointVelocities)
virtual bool setVelocity (const VectorF &jointVelocities)
bool isSuccess (const int err_code, int *status)
bool isSuccess (const int err_code)
virtual bool getPositionLimits (VectorF &_minPosLimits, VectorF &_maxPosLimits)
virtual bool getPositionLimits (Matrix &_posLimits)
virtual bool setPositionLimits (const VectorF &_minPosLimits, const VectorF &_maxPosLimits)
virtual bool setPositionLimits (const Matrix &_posLimits)
virtual bool setPositionLimits (const String &_filename)
virtual bool getVelocityLimits (VectorF &_minVelLimits, VectorF &_maxVelLimits)
virtual bool setVelocityLimits (const VectorF &_minVelLimits, const VectorF &_maxPosLimits)

Private Types

enum  { PCWarning = -1, PCError = -10, PCOK = 0 }

Detailed Description

Author:
Initial Implementation: Ed Jung Enhancements/Documentation: Chetan Kapoor, Dinesh Rabindran, Amit Kulkarni, Aaron Hulse

Note: This implementation of the PowerCube hardware interface supports following functionality -Creating a module ID map -Homing (which in this class means the "zero" position -Resetting -Halting -Error-Checking -Servo control in position, velocity, and current modes -Accessing the module velocities

References: [1] "PowerCube – First Steps: Mechanical and Electrical Connection, Software Installation, PC Tools", Amtec Robotics Technical Documentation, Available: http://www.amtec-robotics.com/files/PowerCube%20First%20Steps.pdf [2] "Programmers guide for PowerCube Developing PC Programs for PowerCube Modules", Amtec Robotics Technical Programming Manual, Available: http://www.amtec-robotics.com/files/Programmers%20guide%20for%20PowerCube.pdf


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
PCWarning 
PCError 
PCOK 


Constructor & Destructor Documentation

OSCAR::PowerCubeInterface::PowerCubeInterface const unsigned int    _dof,
const bool    _hasGripper,
const int    idarray[],
String    _initString,
const String   name = String(""),
OSCARError   err = DUMMY_ERROR(noError)
 

Constructor for the PowerCubeInterface class. This class: -Maps the degrees of freedom with the module IDs -Assigns an object name to the robot(or mechanism) -Assigns values to base class private members.

Parameters:
const unsigned int _dof = Corresponds to the number of modules connected to the CAN bus const bool _hasGripper = true if a gripper is attached = false otherwise const int idarray[] = Ordered list of PowerCube modules in the sequence that they are serially connected. Example, if the robot is a 6-DOF one assembled using the modules with IDs 6, 2, 8, 7, 3, 4 in THAT sequence, then this parameter would be {6,2,8,7,3,4} String _initString = Specifies the powercube communication interface used, the port number, and the baud rate in kbps. The different interfaces supported by these modules currently are as follows:
  • RS232 (PC Internal Board, Supported OS: Windows XP/9x/NT,2K, Linux, QNX)
  • CAN (ESD PCI331 or USB-Mini,Supported OS: All above except QNX)
  • Profibus DP (Simatic CP5611,Supported OS: Only Windows XP/9x/NT,2K) Example, frequently used initstring at UTRRG is "ESD:0,250", which means that the communication interface used is ESD CAN device, 0 is the port number on the host computer, and 250 kbps is the baudrate const String& name = This is an object name to facilitate easy reference to the PowerCubeInterface object within the application OSCARError& err = An OSCAR error object that is used to handle errors generated.
Exceptions:
\sa SetIDMap(const int n, const int idarray[])
See also:
~PowerCubeInterface()

virtual OSCAR::PowerCubeInterface::~PowerCubeInterface   [virtual]
 

Destructor for the PowerCubeInterface class.

Parameters:
None 
Returns:
void
Exceptions:
\sa PowerCubeInterface(const unsigned int _dof, const bool _hasGripper, const int idarray[], String _initString, const String& name = String(" "),OSCARError& err= DUMMY_ERROR(noError))


Member Function Documentation

virtual bool OSCAR::PowerCubeInterface::GetControlParameters unsigned int    modNo,
VectorI   controlParameters
[virtual]
 

Gets the PID loop parameters for a given module (specified by its index in the idArray). These parameters determine the response characteristics of the module while trying to track a control variable (position/velocity/current).

Parameters:
unsigned int modNo = The index of the module (module no.) in the idArray (Range 0-(N-1), N = total no. of modules in robot) VectorI& controlParameters = The PID loop parameters are stored in this array. The size of this array is 3. The meanings of the array elements: controlParameters.at(0) = A0 (Range from 1-12) controlParameters.at(1) = C0 (Range from 12-64, even values only) controlParameters.at(2) = Damping (Range from 1-4)
Returns:
True or False. True if the control param are successfully retrieved, false otherwise.
Exceptions:
None. 
See also:
SetControlParameters(unsigned int modNo, VectorI& controlParameters)

virtual bool OSCAR::PowerCubeInterface::GetCurrent VectorF   currentArray [virtual]
 

Gets the actual current information for all the modules connected to the communication interface. The result is in Amperes.

Parameters:
VectorF& currentArray = The float array in which the current values are stored. Size of this array is equal to the number of modules attached. (Size = total no. of modules in robot)
Returns:
True or False. True if the current information is successfully retrieved, false otherwise.
Exceptions:
None. 
See also:
SetCurrentToZero(unsigned int modNo)

SetCurrent(const VectorF& jointCurrents)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

Reimplemented from OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::GetCurrentLimits VectorF   currentLimits [virtual]
 

Gets the current limits set for all the modules connected to the communication interface. The units are Amperes.

Parameters:
VectorF& currentLimits = The float array in which the current limits are stored. Size of this array is equal to the number of modules attached.
Returns:
True or False. True if the current limits are retrieved successfully, false otherwise.
Exceptions:
None. 
See also:
SetCurrentToZero(unsigned int modNo)

GetCurrent(VectorF& currentArray)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

SetCurrentLimits(const VectorF& currentLimits)

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeInterface::GetHardwareCurrentLimits VectorF   _maxCurLimits
 

Gets the default current limits burned into the firmware for all the modules connected to the communication interface. Units are amps.

Parameters:
VectorF& _maxCurLimits = The float array in which the maximum current limits are stored. Size of this array is equal to the number of modules attached.
Returns:
True or False. True if the hardware current limits are retrieved successfully, false otherwise.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
GetHardwarePositionLimits(VectorF& _minPosLimits, VectorF& _maxPosLimits)

GetHardwareVelocityLimits(VectorF& _maxVelLimits)

bool OSCAR::PowerCubeInterface::GetHardwarePositionLimits VectorF   _minPosLimits,
VectorF   _maxPosLimits
 

Gets the default position limits burned into the firmware for all the modules connected to the communication interface. Angle units are radians and distance units are meters.

Parameters:
VectorF& _minPosLimits = The float array in which the minimum position limits are stored. Size of this array is equal to the number of modules attached. VectorF& _maxPosLimits = The float array in which the maximum position limits are stored. Size of this array is equal to the number of modules attached.
Returns:
True or False. True if the hardware position limits are retrieved successfully, false otherwise.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
GetHardwareVelocityLimits(VectorF& _maxVelLimits)

GetHardwareCurrentLimits(VectorF& _maxCurLimits)

bool OSCAR::PowerCubeInterface::GetHardwareVelocityLimits VectorF   _maxVelLimits
 

Gets the default velocity limits burned into the firmware for all the modules connected to the communication interface. Rotational units are radians/sec and Translational units are meters/sec.

Parameters:
VectorF& _maxVelLimits = The float array in which the maximum velocity limits are stored. Size of this array is equal to the number of modules attached.
Returns:
True or False. True if the hardware velocity limits are retrieved successfully, false otherwise.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
GetHardwarePositionLimits(VectorF& _minPosLimits, VectorF& _maxPosLimits)

GetHardwareCurrentLimits(VectorF& _maxCurLimits)

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

Gets the number of modules attached to the robot. Note that it counts the gripper while getting the module count. Functionality is implemented in the derived class.

Parameters:
unsigned int &count: Stores the number of modules. If the manipulator degrees of freedom is N, and the powercube gripper is attached, then count = N+1. If the gripper is not attached, then count = N
Returns:
True or False. True if number of modules is successfully read, false otherwise.
Exceptions:
None 
See also:
PowerCubeInterface(const unsigned int _dof, const bool _hasGripper, const int idarray[], String _initString, const String& name = String(" "),OSCARError& err= DUMMY_ERROR(noError))

Implements OSCAR::PowerCubeBase.

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

Implements OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::getPositionLimits Matrix   _posLimits [protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

virtual bool OSCAR::PowerCubeInterface::getPositionLimits VectorF   _minPosLimits,
VectorF   _maxPosLimits
[protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

virtual bool OSCAR::PowerCubeInterface::GetStatusFlag unsigned int    modNo,
unsigned long    flag,
bool &    isSet
[virtual]
 

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

Parameters:
unsigned int modNo = index of the module of interest in the idArray (Range 0-(N-1), N = total no. of modules in robot) unsigned long flag = The status flag to be checked. These have been listed in the Amtec Documentation. bool& isSet = Returns true if the flag has been set, false otherwise. Example: If we have to check whether the third module in the robot has been homed succesfully we use the following; bool isSet = false; robot.GetStatusFlag(2, STATEID_MOD_HOME, isSet); if(isSet)//Module has succesfully homed// else //Module has failed to home//
Returns:
True or False. True if the method succeeds, false otherwise.
Exceptions:
parameterNotValid parameterNotValid
See also:
GetStatusString(int iModule, String& statString)

PowerCubeInterface::CheckErrorStatus(int modNo, bool& cubeOK)

Reimplemented from OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::GetStatusString int    iModule,
String   statString
[virtual]
 

Prints the current position, velocity, and acceleration of a module, as well as any status flags that are set to a string. This method is part of PowerCubeInterface only.

Parameters:
int iModule = index of the module of interest in the idArray (Range 0-(N-1), N = total no. of modules in robot) String& statString = String to which all the information is printed.
Returns:
True or False. True if the method succeeds, false otherwise.
Exceptions:
None 
See also:
GetStatusFlag(unsigned int modNo, unsigned long flag, bool& isSet)

PowerCubeInterface::CheckErrorStatus(int modNo, bool& cubeOK)

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

Implements OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::getVelocityLimits VectorF   _minVelLimits,
VectorF   _maxVelLimits
[protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

virtual bool OSCAR::PowerCubeInterface::Halt   [virtual]
 

Stops ALL the modules attached to a communication interface (simultaneously). After the modules have been halted, they have to be RESET to resume operation of the mechanism/robot. The halt command will be sent continously until successfully sent.

Parameters:
None. 
Returns:
True or False. True if ALL the modules are successfully halted, false otherwise.
Exceptions:
None. 
See also:
Reset()

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

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

Starts the homing procedure for a specified module. This function will drive the given module to a near-zero position (within the resolution of the sensor). Note that this home position need not be identically equal to zero. A call to one of the methods (Home() and HomeAll()) is *MANDATORY*.

Parameters:
unsigned int modNo = The index of the module in the module idArray. This parameter varies from 0 to (N-1) where N = the total number of modules connected to the communication interface. For example, to home the 3rd module in a 3DOF serial robot uses robot.Home(2);
Returns:
True or False. True if the specified module is successfully homed, false otherwise.
Exceptions:
powerCubeGeneralError powerCubeGeneralError. This error occurs in two situtations: 1) When the time required to home the module is greater than the timeout value. The timeout data member has been set to 10000 milliseconds. Hence, if the module takes more than 10 seconds to home, it will trigger this error. 2) When the error is unknown.
See also:
HomeAll()

Reimplemented from OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::HomeAll   [virtual]
 

Starts the homing procedure for ALL the modules attached to a communication interface (simultaneously). This function will drive the modules to a near-zero position (within the resolution of the sensor). Note that this home position need not be identically equal to zero. A call to one of the methods (HomeAll() and Home()) is *MANDATORY*. HomeAll() works only for a CAN-bus. Safety Advisory: Caution must be exercised while using this method for all robot configurations. It should be ensured that the modules do not run into each other during coordinated motion. It is always advisable to provide module-by-module homing and home-all capabilities in the application so that the user has the freedom to two choose between the two.

Parameters:
None. 
Returns:
True or False. True if ALL the modules are successfully homed, false otherwise.
Exceptions:
powerCubeGeneralError powerCubeGeneralError. This error occurs: 1) When the time required to home a module is greater than the timeout value. The timeout data member has been set to 10000 milliseconds. Hence, if a module takes more than 10 seconds to home, it will trigger this error.
See also:
Home()

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

Same as Home(int) but no interactive confirmation. Starts the homing procedure for a specified module. This function will drive the given module to a near-zero position (within the resolution of the sensor). Note that this home position need not be identically equal to zero. A call to one of the methods (Home() and HomeAll()) is *MANDATORY*.

Parameters:
unsigned int modNo = The index of the module in the module idArray. This parameter varies from 0 to (N-1) where N = the total number of modules connected to the communication interface. For example, to home the 3rd module in a 3DOF serial robot uses robot.Home(2);
Returns:
True or False. True if the specified module is successfully homed, false otherwise.
Exceptions:
powerCubeGeneralError powerCubeGeneralError. This error occurs in two situtations: 1) When the time required to home the module is greater than the timeout value. The timeout data member has been set to 10000 milliseconds. Hence, if the module takes more than 10 seconds to home, it will trigger this error. 2) When the error is unknown.
See also:
HomeAll()

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeInterface::isSuccess const int    err_code [protected]
 

bool OSCAR::PowerCubeInterface::isSuccess const int    err_code,
int *    status
[protected]
 

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

Opens the gripper.

Parameters:
double openPos = Position to be commanded (in meters)
Returns:
True or False. True if the gripper reaches goal position succesfully, false otherwise.
Exceptions:
None. 

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeInterface::PowerCubeInterface::CheckErrorStatus int    modNo,
bool &    cubeOK
 

Checks all error flags and the halted flag. This method makes calls to GetStatusFlag and GetStatusString on all relevant flags. This method is part of PowerCubeInterface only.

Parameters:
int modNo = index of the module of interest in the idArray (Range 0-(N-1), N = total no. of modules in robot) bool& cubeOK = Returns true if no error flags are set and the cube is not halted.
Returns:
True or False. True if the method succeeds, false otherwise.
Exceptions:
None 
See also:
GetStatusFlag(unsigned int modNo, unsigned long flag, bool& isSet)

GetStatusString(int iModule, String& statString)

virtual bool OSCAR::PowerCubeInterface::PowerCubeInterface::Close   [virtual]
 

Closes a communication interface to which the powercube modules are connected. This method is called by the destructor, if not already called. However, it is advisable to explicitly call it in the application.

Parameters:
None 
Returns:
True or False. True if the interface is successfully closed, false otherwise. It checks this by calling isSuccess(bool).
Exceptions:
None 
See also:
Open()

Initialize()

isSuccess(const int err_code, int *status)

isSuccess(const int err_code)

~PowerCubeInteface()

virtual bool OSCAR::PowerCubeInterface::PowerCubeInterface::Initialize   [virtual]
 

Initializes the CAN bus interface. This class: -Identifies the number of modules connected to the CAN bus -Calls the Open() method using the initstring. Consequently, Open() need not be called explicitly in the application. A call to this method is *MANDATORY* before any other method can be invoked.

Parameters:
None 
Returns:
True or False. True if the modules successfully initialize, false otherwise
Exceptions:
parameterNotValid parameterNotValid
notInitialized notInitialized
See also:
Open()

Close()

virtual bool OSCAR::PowerCubeInterface::PowerCubeInterface::Open   [virtual]
 

Opens an interface by specifying an initialization string. This is called by Initialize() and hence need not be explicitly called in the application.

Parameters:
None 
Returns:
True or False. True if the interface is successfully opened, false otherwise. It checks this by calling isSuccess(bool).
Exceptions:
None 
See also:
Close()

Initialize()

isSuccess(const int err_code, int *status)

isSuccess(const int err_code)

virtual bool OSCAR::PowerCubeInterface::ReleaseBrake   [virtual]
 

Releases the brake on ALL the modules connected to the communication interface. When brakes are released, the robot position is servoed even after it comes to rest. If the brakes on NOT released, then the brakes are engaged after the commanded position has been achieved. Engaging of brakes gives a clicking sound. This a way to tell whether the brakes are released or not.

Parameters:
None. 
Returns:
True or False. True if the brakes are released, false otherwise.
Exceptions:
None. 

virtual bool OSCAR::PowerCubeInterface::Reset int    modNo [virtual]
 

Resets a specified module. This function facilitates recovery from a halt or other error conditions. However, not all error conditions can be reset by this command; some require the power to be cycled (Refer Amtec documentation for a listing of such errors).

Parameters:
unsigned int modNo = The index of the module in the module idArray. This parameter varies from 0 to (N-1) where N = the total number of modules connected to the communication interface. For example, to reset the 3rd module in a 3DOF serial robot uses robot.Reset(2);
Returns:
True or False. True if the specified module is successfully reset, false otherwise.
Exceptions:
None. 
See also:
Halt()

virtual bool OSCAR::PowerCubeInterface::SetControlParameters unsigned int    modNo,
VectorI   controlParameters
[virtual]
 

Sets the PID loop parameters for a given module (specified by its index in the idArray). These parameters determine the response characteristics of the module while trying to track a control variable (position/velocity/current).

Parameters:
unsigned int modNo = The index of the module (module no.) in the idArray (Range 0-(N-1), N = total no. of modules in robot) VectorI& controlParameters = The PID loop parameters to be set are stored in this array. The size of this array is 3. The meanings of the array elements: controlParameters.at(0) = A0 (Range from 1-12) controlParameters.at(1) = C0 (Range from 12-64, even values only) controlParameters.at(2) = Damping (Range from 1-4)
Returns:
True or False. True if the control param are successfully set, false otherwise.
Exceptions:
None. 
See also:
GetControlParameters(unsigned int modNo, VectorI& controlParameters)

bool OSCAR::PowerCubeInterface::SetCurrent unsigned int    moduleNo,
const float    jointCurrent
 

Sets the actual current information for a specified module connected to the communication interface. The units are Amperes.

Parameters:
unsigned int moduleNo = index of the module of interest in the idArray (Range 0-(N-1), N = total no. of modules in robot) const float jointCurrent = Current value in amps.
Returns:
True or False. True if the current is successfully set, false otherwise.
Exceptions:
None. 
See also:
SetCurrentToZero(unsigned int modNo)

GetCurrent(VectorF& currentArray)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(const VectorF& jointCurrents)

bool OSCAR::PowerCubeInterface::SetCurrent const VectorF   jointCurrents
 

Sets the actual current information for all the modules connected to the communication interface. The units are Amperes.

Parameters:
VectorF& currentArray = The float array in which the current values are stored. Size of this array is equal to the number of modules attached. (Size = total no. of modules in robot)
Returns:
True or False. True if the current is successfully set, false otherwise.
Exceptions:
None. 
See also:
SetCurrentToZero(unsigned int modNo)

GetCurrent(VectorF& currentArray)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

virtual bool OSCAR::PowerCubeInterface::SetCurrentLimits const VectorF   currentLimits [virtual]
 

Sets the current limits for all the modules connected to the communication interface. The units are Amperes.

Parameters:
VectorF& currentLimits = The float array containing the current limits. Size of this array is equal to the number of modules attached.
Returns:
True or False. True if the current limits are set successfully, false otherwise.
Exceptions:
None. 
See also:
SetCurrentToZero(unsigned int modNo)

GetCurrent(VectorF& currentArray)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

GetCurrentLimits(VectorF& currentLimits)

Reimplemented from OSCAR::PowerCubeBase.

bool OSCAR::PowerCubeInterface::SetCurrentToZero BoolArray    bCurrentArray
 

Sets the currents on a set of flagged modules to zero. This is identical to setting the actuator torques to zero. Under this condition, no active forces are acting on them. They become backdriveable. However, the drive friction is still acting. This command calls SetCurrentToZero(unsigned int modNo).

Parameters:
BoolArray bCurrentArray = Boolean array with flags for modules whose currents should be driven to zero. Example, if the currents of the 1st, 2nd, 5th modules in a manipulator with 7 modules have to be driven to zero then; bCurrentFlags = {true, true, false, false, true, false, false}; robot.SetCurrentTo Zero(bCurrentFlags);
Returns:
True or False. True if the currents of the flagged modules are set to zero, false otherwise.
Exceptions:
vectorSizeMismatch vectorSizeMismatch
See also:
GetCurrent(VectorF& currentArray)

SetCurrent(const VectorF& jointCurrents)

SetCurrentToZero(unsigned int modNo)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

bool OSCAR::PowerCubeInterface::SetCurrentToZero unsigned int    modNo
 

Sets the current on a specified module to zero. This is identical to setting the actuator torque to zero. Under this condition, no active forces are acting on it. It becomes backdriveable. However, the drive friction is still acting on it.

Parameters:
unsigned int modNo = index of the module of interest in the idArray (Range 0-(N-1), N = total no. of modules in robot)
Returns:
True or False. True if the current is set to zero, false otherwise.
Exceptions:
None. 
See also:
GetCurrent(VectorF& currentArray)

SetCurrent(const VectorF& jointCurrents)

SetCurrentToZero(BoolArray bCurrentArray)

SetCurrent(unsigned int moduleNo, const float jointCurrent)

virtual bool OSCAR::PowerCubeInterface::SetIDMap const int    n,
const int    idarray[]
[virtual]
 

Maps the module ids with the indices (or position) of the modules in the mechanism's assembly. The constructor calls this method by default. Consequently, an explicit call to it need not be made.

Parameters:
const int n = The number of modules connected to the communication interface. const int idarray[] = An array of module ids in the order that they are connected in the mechanical assembly. Example, if the robot is a 6-DOF one assembled using the modules with IDs 6, 2, 8, 7, 3, 4 in THAT sequence, then this parameter would be {6,2,8,7,3,4}
Returns:
True or False. True if modules are successfully mapped, false otherwise.
Exceptions:
None 
See also:
PowerCubeInterface(const unsigned int _dof, const bool _hasGripper, const int idarray[], String _initString, const String& name = String(" "),OSCARError& err= DUMMY_ERROR(noError))

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

Implements OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::setPositionLimits const String   _filename [protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

virtual bool OSCAR::PowerCubeInterface::setPositionLimits const Matrix   _posLimits [protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

virtual bool OSCAR::PowerCubeInterface::setPositionLimits const VectorF   _minPosLimits,
const VectorF   _maxPosLimits
[protected, virtual]
 

Reimplemented from OSCAR::RobotServoInterface.

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

Implements OSCAR::PowerCubeBase.

virtual bool OSCAR::PowerCubeInterface::setVelocityLimits const VectorF   _minVelLimits,
const VectorF   _maxPosLimits
[protected, virtual]
 

Reimplemented from OSCAR::PowerCubeBase.


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