$search

cSDHBase Class Reference

The base class to control the SCHUNK Dexterous Hand. More...

#include <sdhbase.h>

Inheritance diagram for cSDHBase:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { All = -1 }
 

Anonymous enum (instead of define like macros).

More...
enum  eControllerType {
  eCT_INVALID = -1, eCT_POSE = 0, eCT_VELOCITY, eCT_VELOCITY_ACCELERATION,
  eCT_DIMENSION
}
 

An enum for all possible SDH internal controller types (order must match that in the SDH firmware in inc/sdh2.h).

More...
enum  eErrorCode {
  eEC_SUCCESS = 0, eEC_NOT_AVAILABLE, eEC_NOT_INITIALIZED, eEC_ALREADY_RUNNING,
  eEC_FEATURE_NOT_SUPPORTED, eEC_INCONSISTENT_DATA, eEC_TIMEOUT, eEC_READ_ERROR,
  eEC_WRITE_ERROR, eEC_INSUFFICIENT_RESOURCES, eEC_CHECKSUM_ERROR, eEC_NOT_ENOUGH_PARAMS,
  eEC_NO_PARAMS_EXPECTED, eEC_CMD_UNKNOWN, eEC_CMD_FORMAT_ERROR, eEC_ACCESS_DENIED,
  eEC_ALREADY_OPEN, eEC_CMD_FAILED, eEC_CMD_ABORTED, eEC_INVALID_HANDLE,
  eEC_DEVICE_NOT_FOUND, eEC_DEVICE_NOT_OPENED, eEC_IO_ERROR, eEC_INVALID_PARAMETER,
  eEC_RANGE_ERROR, eEC_NO_DATAPIPE, eEC_INDEX_OUT_OF_BOUNDS, eEC_HOMING_ERROR,
  eEC_AXIS_DISABLED, eEC_OVER_TEMPERATURE, eEC_MAX_COMMANDS_EXCEEDED, eEC_INVALID_PASSWORD,
  eEC_MAX_COMMANDLINE_EXCEEDED, eEC_CRC_ERROR, eEC_NO_COMMAND, eEC_INTERNAL,
  eEC_UNKNOWN_ERROR, eEC_DIMENSION
}
enum  eGraspId {
  eGID_INVALID = -1, eGID_CENTRICAL = 0, eGID_PARALLEL = 1, eGID_CYLINDRICAL = 2,
  eGID_SPHERICAL = 3, eGID_DIMENSION
}
 

The enum values of the known grasps.

More...
enum  eVelocityProfile { eVP_INVALID = -1, eVP_SIN_SQUARE, eVP_RAMP, eVP_DIMENSION }
 

An enum for all possible SDH internal velocity profile types.

More...

Public Member Functions

void CheckIndex (int index, int maxindex, char const *name="") throw (cSDHErrorInvalidParameter*)
 Check if index is in [0 .. maxindex-1] or All. Throw a cSDHErrorInvalidParameter exception if not.
void CheckRange (double *values, double *minvalues, double *maxvalues, char const *name="") throw (cSDHErrorInvalidParameter*)
 Check if any value[i] in array values is in [minvalue[i] .. maxvalue[i]]. Throw a cSDHErrorInvalidParameter exception if not.
void CheckRange (double value, double minvalue, double maxvalue, char const *name="") throw (cSDHErrorInvalidParameter*)
 Check if value is in [minvalue .. maxvalue]. Throw a cSDHErrorInvalidParameter exception if not.
 cSDHBase (int debug_level)
double GetEps (void)
 Return the eps value.
cSimpleVector const & GetEpsVector (void)
 Return simple vector of number of axes epsilon values.
eErrorCode GetFirmwareState (void)
 Return the last known state of the SDH firmware.
int GetNumberOfAxes (void)
 Return the number of axes of the SDH.
int GetNumberOfFingers (void)
 Return the number of fingers of the SDH.
int GetNumberOfTemperatureSensors (void)
 Return the number of temperature sensors of the SDH.
virtual bool IsOpen (void)=0
 Return true if connection to SDH firmware/hardware is open.
virtual void SetDebugOutput (std::ostream *debuglog)
 change the stream to use for debug messages
virtual ~cSDHBase ()

Static Public Member Functions

static char const * GetStringFromControllerType (eControllerType controller_type)
 Return a ptr to a (static) string describing controller type controller_Type.
static char const * GetStringFromErrorCode (eErrorCode error_code)
 Return a ptr to a (static) string describing error code error_code.
static char const * GetStringFromGraspId (eGraspId grasp_id)
 Return a ptr to a (static) string describing grasp id grasp_id.

Protected Attributes

int all_axes_used
 Bit field with the bits for all axes set.
cDBG cdbg
 debug stream to print colored debug messages
int debug_level
 debug level of this object
double eps
 epsilon value (max absolute deviation of reported values from actual hardware values) (needed since SDH firmware limits number of digits reported)
cSimpleVector eps_v
 simple vector of 7 epsilon values
eErrorCode firmware_state
 the last known state of the SDH firmware
cSimpleVector max_angle_v
 Maximum allowed axis angles (in internal units (degrees)).
cSimpleVector min_angle_v
 simple vector of 7 0 values ???
int NUMBER_OF_AXES
 The number of axes.
int NUMBER_OF_FINGERS
 The number of fingers.
int NUMBER_OF_TEMPERATURE_SENSORS
 The number of temperature sensors.

Static Protected Attributes

static char const * controller_type_name []
 A mapping from eControllerType controller type enums to strings with human readable controller type names.
static char const * firmware_error_codes []
 A mapping from eErrorCode error code enums to strings with human readable error messages.
static char const * grasp_id_name []
 A mapping from eGraspId grasp id enums to strings with human readable grasp id names.

Detailed Description

The base class to control the SCHUNK Dexterous Hand.

End-Users should NOT use this class directly, as it only provides some common settings and no function interface. End users should use the class cSDH instead, as it provides the end-user functions to control the SDH.


Definition at line 97 of file sdhbase.h.


Member Enumeration Documentation

anonymous enum

Anonymous enum (instead of define like macros).

Enumerator:
All 

A meta-value that means "access all possible values".

Definition at line 102 of file sdhbase.h.

An enum for all possible SDH internal controller types (order must match that in the SDH firmware in inc/sdh2.h).

Enumerator:
eCT_INVALID 

invalid controller_type (needed for cSDHSerial::con() to indicate "read current controller type")

eCT_POSE 

coordinated position controller (position per axis => "pose controller"), all axes start and stop moving at the same time

eCT_VELOCITY 

velocity controller, velocities of axes are controlled independently (not implemented in SDH firmwares up to and including 0.0.2.5)

eCT_VELOCITY_ACCELERATION 

velocity controller with acceleration ramp, velocities and accelerations of axes are controlled independently (not implemented in SDH firmwares up to and including 0.0.2.5)

eCT_DIMENSION 

Endmarker and dimension.

Definition at line 176 of file sdhbase.h.

The error codes of the SDH firmware

Enumerator:
eEC_SUCCESS 
eEC_NOT_AVAILABLE 
eEC_NOT_INITIALIZED 
eEC_ALREADY_RUNNING 
eEC_FEATURE_NOT_SUPPORTED 
eEC_INCONSISTENT_DATA 
eEC_TIMEOUT 
eEC_READ_ERROR 
eEC_WRITE_ERROR 
eEC_INSUFFICIENT_RESOURCES 
eEC_CHECKSUM_ERROR 
eEC_NOT_ENOUGH_PARAMS 
eEC_NO_PARAMS_EXPECTED 
eEC_CMD_UNKNOWN 
eEC_CMD_FORMAT_ERROR 
eEC_ACCESS_DENIED 
eEC_ALREADY_OPEN 
eEC_CMD_FAILED 
eEC_CMD_ABORTED 
eEC_INVALID_HANDLE 
eEC_DEVICE_NOT_FOUND 
eEC_DEVICE_NOT_OPENED 
eEC_IO_ERROR 
eEC_INVALID_PARAMETER 
eEC_RANGE_ERROR 
eEC_NO_DATAPIPE 
eEC_INDEX_OUT_OF_BOUNDS 
eEC_HOMING_ERROR 
eEC_AXIS_DISABLED 
eEC_OVER_TEMPERATURE 
eEC_MAX_COMMANDS_EXCEEDED 
eEC_INVALID_PASSWORD 
eEC_MAX_COMMANDLINE_EXCEEDED 
eEC_CRC_ERROR 
eEC_NO_COMMAND 
eEC_INTERNAL 
eEC_UNKNOWN_ERROR 
eEC_DIMENSION 

Endmarker and dimension.

Definition at line 112 of file sdhbase.h.

The enum values of the known grasps.

Enumerator:
eGID_INVALID 

invalid grasp id

eGID_CENTRICAL 

centrical grasp: ???

eGID_PARALLEL 

parallel grasp: ???

eGID_CYLINDRICAL 

cylindrical grasp: ???

eGID_SPHERICAL 

spherecial grasp: ???

eGID_DIMENSION 

Endmarker and dimension.

Definition at line 162 of file sdhbase.h.

An enum for all possible SDH internal velocity profile types.

Enumerator:
eVP_INVALID 

not a valid velocity profile, used to make SDH::cSDHSerial::vp() read the velocity profile from the SDH firmware

eVP_SIN_SQUARE 

sin square velocity profile

eVP_RAMP 

ramp velocity profile

eVP_DIMENSION 

endmarker and dimension

Definition at line 191 of file sdhbase.h.


Constructor & Destructor Documentation

cSDHBase::cSDHBase ( int  debug_level  ) 

Constructor of cSDHBase class, initilize internal variables and settings

Parameters:
debug_level : debug level of the created object. If the debug_level of an object is > 0 then it will output debug messages.

virtual cSDHBase::~cSDHBase (  )  [inline, virtual]

virtual destructor to make compiler happy

Definition at line 217 of file sdhbase.h.


Member Function Documentation

void cSDHBase::CheckIndex ( int  index,
int  maxindex,
char const *  name = "" 
) throw (cSDHErrorInvalidParameter*)

Check if index is in [0 .. maxindex-1] or All. Throw a cSDHErrorInvalidParameter exception if not.

void cSDHBase::CheckRange ( double *  values,
double *  minvalues,
double *  maxvalues,
char const *  name = "" 
) throw (cSDHErrorInvalidParameter*)

Check if any value[i] in array values is in [minvalue[i] .. maxvalue[i]]. Throw a cSDHErrorInvalidParameter exception if not.

void cSDHBase::CheckRange ( double  value,
double  minvalue,
double  maxvalue,
char const *  name = "" 
) throw (cSDHErrorInvalidParameter*)

Check if value is in [minvalue .. maxvalue]. Throw a cSDHErrorInvalidParameter exception if not.

double cSDHBase::GetEps ( void   ) 

Return the eps value.

cSimpleVector const& cSDHBase::GetEpsVector ( void   ) 

Return simple vector of number of axes epsilon values.

eErrorCode cSDHBase::GetFirmwareState ( void   ) 

Return the last known state of the SDH firmware.

int cSDHBase::GetNumberOfAxes ( void   ) 

Return the number of axes of the SDH.

int cSDHBase::GetNumberOfFingers ( void   ) 

Return the number of fingers of the SDH.

int cSDHBase::GetNumberOfTemperatureSensors ( void   ) 

Return the number of temperature sensors of the SDH.

static char const* cSDHBase::GetStringFromControllerType ( eControllerType  controller_type  )  [static]

Return a ptr to a (static) string describing controller type controller_Type.

static char const* cSDHBase::GetStringFromErrorCode ( eErrorCode  error_code  )  [static]

Return a ptr to a (static) string describing error code error_code.

static char const* cSDHBase::GetStringFromGraspId ( eGraspId  grasp_id  )  [static]

Return a ptr to a (static) string describing grasp id grasp_id.

virtual bool cSDHBase::IsOpen ( void   )  [pure virtual]

Return true if connection to SDH firmware/hardware is open.

Implemented in cSDH, and cSDHSerial.

virtual void cSDHBase::SetDebugOutput ( std::ostream *  debuglog  )  [inline, virtual]

change the stream to use for debug messages

Reimplemented in cSDH.

Definition at line 276 of file sdhbase.h.


Member Data Documentation

int cSDHBase::all_axes_used [protected]

Bit field with the bits for all axes set.

Definition at line 309 of file sdhbase.h.

cDBG cSDHBase::cdbg [protected]

debug stream to print colored debug messages

Definition at line 282 of file sdhbase.h.

char const* cSDHBase::controller_type_name[] [static, protected]

A mapping from eControllerType controller type enums to strings with human readable controller type names.

Definition at line 296 of file sdhbase.h.

int cSDHBase::debug_level [protected]

debug level of this object

Definition at line 285 of file sdhbase.h.

double cSDHBase::eps [protected]

epsilon value (max absolute deviation of reported values from actual hardware values) (needed since SDH firmware limits number of digits reported)

Definition at line 318 of file sdhbase.h.

simple vector of 7 epsilon values

Definition at line 321 of file sdhbase.h.

char const* cSDHBase::firmware_error_codes[] [static, protected]

A mapping from eErrorCode error code enums to strings with human readable error messages.

Definition at line 288 of file sdhbase.h.

the last known state of the SDH firmware

Definition at line 312 of file sdhbase.h.

char const* cSDHBase::grasp_id_name[] [static, protected]

A mapping from eGraspId grasp id enums to strings with human readable grasp id names.

Definition at line 292 of file sdhbase.h.

Maximum allowed axis angles (in internal units (degrees)).

Definition at line 333 of file sdhbase.h.

simple vector of 7 0 values ???

simple vector of 7 1 values ??? Minimum allowed axis angles (in internal units (degrees))

Definition at line 330 of file sdhbase.h.

int cSDHBase::NUMBER_OF_AXES [protected]

The number of axes.

Definition at line 300 of file sdhbase.h.

int cSDHBase::NUMBER_OF_FINGERS [protected]

The number of fingers.

Definition at line 303 of file sdhbase.h.

The number of temperature sensors.

Definition at line 306 of file sdhbase.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


schunk_sdh
Author(s): Florian Weisshardt
autogenerated on Sat Mar 2 13:36:44 2013