#include <PowerCubeInterface.h>
Inheritance diagram for OSCAR::PowerCubeInterface:

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 ¤tArray) |
| 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 ¤tLimits) |
| virtual bool | SetCurrentLimits (const VectorF ¤tLimits) |
| 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 } |
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
|
|
|
|
||||||||||||||||||||||||||||
|
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.
|
|
|
Destructor for the PowerCubeInterface class.
|
|
||||||||||||
|
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).
|
|
|
Gets the actual current information for all the modules connected to the communication interface. The result is in Amperes.
Reimplemented from OSCAR::PowerCubeBase. |
|
|
Gets the current limits set for all the modules connected to the communication interface. The units are Amperes.
Reimplemented from OSCAR::PowerCubeBase. |
|
|
Gets the default current limits burned into the firmware for all the modules connected to the communication interface. Units are amps.
|
|
||||||||||||
|
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.
|
|
|
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.
|
|
|
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.
Implements OSCAR::PowerCubeBase. |
|
|
Implements OSCAR::PowerCubeBase. |
|
|
Reimplemented from OSCAR::RobotServoInterface. |
|
||||||||||||
|
Reimplemented from OSCAR::RobotServoInterface. |
|
||||||||||||||||
|
Checks whether or not a status flag is set for a module.
Reimplemented from OSCAR::PowerCubeBase. |
|
||||||||||||
|
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.
|
|
|
Implements OSCAR::PowerCubeBase. |
|
||||||||||||
|
Reimplemented from OSCAR::RobotServoInterface. |
|
|
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.
Implements OSCAR::PowerCubeBase. |
|
|
-Sends all modules to the home position. -Functionality implemented in derived class.
|
|
|
-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.
|
|
|
-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.
|
|
|
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*.
Reimplemented from OSCAR::PowerCubeBase. |
|
|
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.
|
|
|
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*.
Reimplemented from OSCAR::PowerCubeBase. |
|
|
|
|
||||||||||||
|
|
|
|
Opens the gripper.
Reimplemented from OSCAR::PowerCubeBase. |
|
||||||||||||
|
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.
|
|
|
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.
|
|
|
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.
|
|
|
Opens an interface by specifying an initialization string. This is called by Initialize() and hence need not be explicitly called in the application.
|
|
|
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.
|
|
|
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).
|
|
||||||||||||
|
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).
|
|
||||||||||||
|
Sets the actual current information for a specified module connected to the communication interface. The units are Amperes.
|
|
|
Sets the actual current information for all the modules connected to the communication interface. The units are Amperes.
|
|
|
Sets the current limits for all the modules connected to the communication interface. The units are Amperes.
Reimplemented from OSCAR::PowerCubeBase. |
|
|
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).
|
|
|
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.
|
|
||||||||||||
|
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.
|
|
|
Implements OSCAR::PowerCubeBase. |
|
|
Reimplemented from OSCAR::RobotServoInterface. |
|
|
Reimplemented from OSCAR::RobotServoInterface. |
|
||||||||||||
|
Reimplemented from OSCAR::RobotServoInterface. |
|
|
Implements OSCAR::PowerCubeBase. |
|
||||||||||||
|
Reimplemented from OSCAR::PowerCubeBase. |
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |