Go to the documentation of this file.
38 # pragma warning(disable : 4996)
104 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::allocator<int>;
105 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::vector<int,std::allocator<int> >;
107 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::allocator<std::vector<int> >;
108 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::vector<std::vector<int>,std::allocator<std::vector<int> > >;
110 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::allocator<double>;
111 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::vector<double,std::allocator<double> >;
113 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::allocator<std::vector<double> >;
114 VCC_EXPORT_TEMPLATE
template class VCC_EXPORT std::vector<std::vector<double>,std::allocator<std::vector<double> > >;
355 std::vector<std::vector<double> >
offset;
431 std::vector<double> SetAxisValueVector( std::vector<int>
const& axes,
432 std::vector<double>
const& values,
436 std::vector<double>
const& min_values,
437 std::vector<double>
const& max_values,
462 std::vector<double> GetAxisValueVector( std::vector<int>
const& axes,
483 std::vector<int> ToIndexVector(
int index, std::vector<int>& all_replacement,
int maxindex,
char const* name );
492 pSetFunction GetMotorCurrentModeFunction( eMotorCurrentMode mode );
499 std::vector<double> _GetFingerXYZ(
int fi, std::vector<double> r_angles );
516 std::vector<int> all_axes;
674 cSDH(
bool _use_radians=
false,
bool _use_fahrenheit=
false,
int _debug_level=0 );
698 bool IsVirtualAxis(
int iAxis );
718 void UseRadians(
void );
741 void UseDegrees(
void );
764 int GetFingerNumberOfAxes(
int iFinger );
791 int GetFingerAxisIndex(
int iFinger,
int iFingerAxis );
809 static char const* GetLibraryRelease(
void );
827 static char const* GetLibraryName(
void );
848 char const* GetFirmwareRelease(
void );
866 static char const* GetFirmwareReleaseRecommended(
void );
898 bool CheckFirmwareRelease(
void );
929 char const* GetInfo(
char const* what );
984 std::vector<double> GetTemperature( std::vector<int>
const& sensors );
992 double GetTemperature(
int iSensor );
1043 void OpenRS232(
int _port=0,
unsigned long _baudrate = 115200,
double _timeout=-1,
char const* _device_format_string=
"/dev/ttyS%d" );
1073 void OpenCAN_ESD(
int _net=0,
unsigned long _baudrate=1000000,
double _timeout=0.0,
Int32 _id_read=43,
Int32 _id_write=42 );
1134 void OpenCAN_PEAK(
unsigned long _baudrate=1000000,
double _timeout=0.0,
Int32 _id_read=43,
Int32 _id_write=42,
const char *_device=
"/dev/pcanusb0" );
1186 void OpenTCP(
char const* _tcp_adr=
"192.168.1.1",
int _tcp_port=23,
double _timeout=0.0 );
1219 void Close(
bool leave_enabled=
false );
1225 virtual bool IsOpen(
void )
1264 void EmergencyStop(
void );
1514 void SetAxisMotorCurrent( std::vector<int>
const& axes, std::vector<double>
const& motor_currents,
eMotorCurrentMode mode=eMCM_MOVE );
1524 void SetAxisMotorCurrent(
int iAxis,
double motor_current,
eMotorCurrentMode mode=eMCM_MOVE );
1579 std::vector<double> GetAxisMotorCurrent( std::vector<int>
const& axes,
eMotorCurrentMode mode=eMCM_MOVE );
1653 void SetAxisEnable( std::vector<int>
const& axes, std::vector<double>
const& states );
1663 void SetAxisEnable(
int iAxis=All,
double state=1.0 );
1671 void SetAxisEnable( std::vector<int>
const& axes, std::vector<bool>
const& states );
1681 void SetAxisEnable(
int iAxis=All,
bool state=
true );
1733 std::vector<double> GetAxisEnable( std::vector<int>
const& axes );
1741 double GetAxisEnable(
int iAxis );
1790 std::vector<eAxisState> GetAxisActualState( std::vector<int>
const& axes );
1924 void WaitAxis( std::vector<int>
const& axes,
double timeout = -1.0 );
1935 void WaitAxis(
int iAxis,
double timeout = -1.0 );
2012 void SetAxisTargetAngle( std::vector<int>
const& axes, std::vector<double>
const& angles );
2022 void SetAxisTargetAngle(
int iAxis,
double angle );
2090 std::vector<double> SetAxisTargetGetAxisActualAngle( std::vector<int>
const& axes, std::vector<double>
const& angles );
2142 std::vector<double> GetAxisTargetAngle( std::vector<int>
const& axes );
2151 double GetAxisTargetAngle(
int iAxis );
2203 std::vector<double> GetAxisActualAngle( std::vector<int>
const& axes );
2212 double GetAxisActualAngle(
int iAxis );
2304 void SetAxisTargetVelocity( std::vector<int>
const& axes, std::vector<double>
const& velocities );
2312 void SetAxisTargetVelocity(
int iAxis,
double velocity );
2394 std::vector<double> SetAxisTargetGetAxisActualVelocity( std::vector<int>
const& axes, std::vector<double>
const& velocities );
2446 std::vector<double> GetAxisTargetVelocity( std::vector<int>
const& axes );
2455 double GetAxisTargetVelocity(
int iAxis );
2507 std::vector<double> GetAxisLimitVelocity( std::vector<int>
const& axes );
2516 double GetAxisLimitVelocity(
int iAxis );
2568 std::vector<double> GetAxisLimitAcceleration( std::vector<int>
const& axes );
2577 double GetAxisLimitAcceleration(
int iAxis );
2625 std::vector<double> GetAxisActualVelocity( std::vector<int>
const& axes );
2634 double GetAxisActualVelocity(
int iAxis );
2694 std::vector<double> GetAxisReferenceVelocity( std::vector<int>
const& axes );
2703 double GetAxisReferenceVelocity(
int iAxis );
2788 void SetAxisTargetAcceleration( std::vector<int>
const& axes, std::vector<double>
const& accelerations );
2796 void SetAxisTargetAcceleration(
int iAxis,
double acceleration );
2848 std::vector<double> GetAxisTargetAcceleration( std::vector<int>
const& axes );
2857 double GetAxisTargetAcceleration(
int iAxis );
2915 std::vector<double> GetAxisMinAngle( std::vector<int>
const& axes );
2924 double GetAxisMinAngle(
int iAxis );
2982 std::vector<double> GetAxisMaxAngle( std::vector<int>
const& axes );
2991 double GetAxisMaxAngle(
int iAxis );
3054 std::vector<double> GetAxisMaxVelocity( std::vector<int>
const& axes );
3063 double GetAxisMaxVelocity(
int iAxis );
3121 std::vector<double> GetAxisMaxAcceleration( std::vector<int>
const& axes );
3130 double GetAxisMaxAcceleration(
int iAxis );
3244 double MoveAxis( std::vector<int>
const& axes,
bool sequ=
true );
3252 double MoveAxis(
int iAxis,
bool sequ=
true );
3335 void SetFingerEnable( std::vector<int>
const& fingers, std::vector<double>
const& states );
3344 void SetFingerEnable(
int iFinger,
double state=1.0 );
3353 void SetFingerEnable( std::vector<int>
const& fingers, std::vector<bool>
const& states );
3362 void SetFingerEnable(
int iFinger,
bool state );
3415 std::vector<double> GetFingerEnable( std::vector<int>
const& fingers );
3424 double GetFingerEnable(
int iFinger );
3487 void SetFingerTargetAngle(
int iFinger, std::vector<double>
const& angles );
3495 void SetFingerTargetAngle(
int iFinger,
double a0,
double a1,
double a2 );
3537 std::vector<double> GetFingerTargetAngle(
int iFinger );
3545 void GetFingerTargetAngle(
int iFinger,
double& a0,
double& a1,
double& a2 );
3587 std::vector<double> GetFingerActualAngle(
int iFinger );
3595 void GetFingerActualAngle(
int iFinger,
double& a0,
double& a1,
double& a2 );
3646 std::vector<double> GetFingerMinAngle(
int iFinger );
3655 void GetFingerMinAngle(
int iFinger,
double& a0,
double& a1,
double& a2 );
3706 std::vector<double> GetFingerMaxAngle(
int iFinger );
3715 void GetFingerMaxAngle(
int iFinger,
double& a0,
double& a1,
double& a2 );
3776 std::vector<double> GetFingerXYZ(
int iFinger, std::vector<double>
const& angles );
3784 std::vector<double> GetFingerXYZ(
int iFinger,
double a0,
double a1,
double a2 );
3885 double MoveFinger( std::vector<int>
const& fingers,
bool sequ=
true );
3893 double MoveFinger(
int iFinger,
bool sequ=
true );
3914 double MoveHand(
bool sequ=
true );
3957 double GetGripMaxVelocity(
void );
4030 double GripHand(
eGraspId grip,
double close,
double velocity,
bool sequ=
true );
4046 void UpdateSettingsFromSDH();
std::vector< double > f_zeros_v
Vector of 3 epsilon values.
Interface of class #SDH::cSerialBase, a virtal base class to access serial communication channels lik...
virtual void SetDebugOutput(std::ostream *debuglog)
change the stream to use for debug messages
static const cUnitConverter uc_motor_current_ampere
Default converter for motor current (internal unit == external unit): Ampere.
std::vector< double > f_min_angle_v
Minimum allowed axis angles (in internal units (degrees)), including the virtual axis.
@ eAS_CCW_BLOCKED
axis is blocked is blocked in against counterwise direction
static const cUnitConverter uc_temperature_fahrenheit
Converter for temperatures: external unit = degrees fahrenheit.
std::vector< std::vector< int > > finger_axis_index
Mapping of finger index, finger axis index to axis index:
std::vector< double > f_min_velocity_v
Minimum allowed axis velocity (in internal units (degrees/second)), including the virtual axis.
std::vector< int > all_real_axes
A vector with indices of all real axes (in natural order), excluding the virtual axis.
static const cUnitConverter uc_angular_velocity_radians_per_second
Converter for angular velocieties: external unit = radians/second.
cSDHSerial comm_interface
The object to interface with the SDH attached via serial RS232 or CAN or TCP.
@ eAS_POSITIONING
the goal position has not been reached yet
#define NAMESPACE_SDH_END
std::vector< double > f_max_acceleration_v
Maximum allowed axis acceleration (in internal units (degrees/(second * second))),...
Low-level communication class to access a serial port.
const cUnitConverter * uc_angular_velocity
unit convert for (axis) angular velocities: default = #SDH::cSDH::uc_angular_velocity_degrees_per_sec...
The class to communicate with a SDH via RS232.
static const cUnitConverter uc_position_meter
Converter for position: external unit = meter.
static const cUnitConverter uc_angular_acceleration_radians_per_second_squared
Converter for angular velocieties: external unit = radians/second.
static const cUnitConverter uc_time_seconds
Default converter for times (internal unit == external unit): seconds.
int NUMBER_OF_AXES_PER_FINGER
The number of axis per finger (for finger 1 this includes the "virtual" base axis)
eControllerType controller_type
cached value of the axis controller type
const cUnitConverter * uc_motor_current
unit converter for motor curent: default = #SDH::cSDH::uc_motor_current_ampere
std::vector< int > all_fingers
A vector with indices of all fingers (in natural order)
std::vector< double > f_max_angle_v
Maximum allowed axis angles (in internal units (degrees)), including the virtual axis.
@ eAS_DISABLED
axis is disabled
eControllerType
An enum for all possible SDH internal controller types (order must match that in the SDH firmware in ...
static const cUnitConverter uc_position_millimeter
Default converter for position (internal unit == external unit): millimeter.
static const cUnitConverter uc_temperature_celsius
Default converter for temparatures (internal unit == external unit): degrees celsius.
double grip_max_velocity
Maximum allowed grip velocity (in internal units (degrees/second))
cSimpleVector(cSDHSerial::* pGetFunction)(int, double *)
Type of a pointer to a "get-axis-values" function like cSDHSerial::p, cSDHSerial::pos,...
@ eAS_CW_BLOCKED
axis is blocked in counterwise direction
Interface of class #SDH::cSDHSerial.
virtual void SetDebugOutput(std::ostream *debuglog)
change the stream to use for debug messages
eVelocityProfile
An enum for all possible SDH internal velocity profile types.
std::vector< double > ones_v
Vector of nb_all_axes 1.0 values.
Interface of class #SDH::cUnitConverter.
static const cUnitConverter uc_time_milliseconds
Converter for times: external unit = milliseconds.
std::string release_firmware
string containing the SDH firmware release of the attaced SDH (something like "0.0....
std::vector< double > f_min_motor_current_v
Minimum allowed motor currents (in internal units (Ampere)), including the virtual axis.
std::vector< double > f_ones_v
Vector of 3 1.0 values.
std::vector< std::vector< double > > offset
NAMESPACE_SDH_START typedef void * tDeviceHandle
generic device handle for CAN devices
int32_t Int32
signed integer, size 4 Byte (32 Bit)
The base class to control the SCHUNK Dexterous Hand.
const cUnitConverter * uc_temperature
unit convert for temperatures: default = #SDH::cSDH::uc_temperature_celsius
int nb_all_axes
The number of all axes including virtual axes.
virtual bool IsOpen(void)=0
Return true if connection to SDH firmware/hardware is open.
#SDH::cSDH is the end user interface class to control a SDH (SCHUNK Dexterous Hand).
@ eAS_LIMITS_REACHED
position limits reached and axis stopped
std::vector< double > zeros_v
Vector of nb_all_axes 0.0 values.
#define NAMESPACE_SDH_START
eAxisState
The state of an axis (see TPOSCON_STATE in global.h of the SDH firmware)
std::vector< int > all_temperature_sensors
A vector with indices of all temperature sensors.
std::vector< double > f_max_motor_current_v
Maximum allowed motor currents (in internal units (Ampere)), including the virtual axis.
This file contains some basic definitions (defines, macros, datatypes)
const cUnitConverter * uc_angular_acceleration
unit convert for (axis) angular accelerations: default = #SDH::cSDH::uc_angular_acceleration_degrees_...
cSimpleVector(cSDHSerial::* pSetFunction)(int, double *)
Type of a pointer to a "set-axis-values" function like cSDHSerial::p, cSDHSerial::pos,...
std::vector< int > finger_number_of_axes
Mapping of finger index to number of real axes of fingers:
static const cUnitConverter uc_angular_velocity_degrees_per_second
Default converter for angular velocities (internal unit == external unit): degrees / second.
static const cUnitConverter uc_angular_acceleration_degrees_per_second_squared
Default converter for angular accelerations (internal unit == external unit): degrees / second.
std::vector< double > f_min_acceleration_v
Minimum allowed axis acceleration (in internal units (degrees/(second * second))),...
This file contains settings to make the SDHLibrary compile on differen systems:
const cUnitConverter * uc_time
unit convert for times: default = uc_time_seconds
const cUnitConverter * uc_position
unit converter for position: default = #SDH::cSDH::uc_position_millimeter
int NUMBER_OF_VIRTUAL_AXES
The number of virtual axes.
static const cUnitConverter uc_motor_current_milliampere
Converter for motor current: external unit = milli Ampere.
static const cUnitConverter uc_angle_radians
Converter for angles: external unit = radians.
Interface of class #SDH::cSDHBase.
Unit conversion class to convert values between physical unit systems.
eMotorCurrentMode
the motor current can be set specifically for these modes:
eGraspId
The enum values of the known grasps.
std::vector< double > f_max_velocity_v
Maximum allowed axis velocity (in internal units (degrees/second)), including the virtual axis.
double l2
length of limb 2 (distal joint to fingertip) in mm
@ eAS_SPEED_MODE
axis is in speed mode
@ eAS_NOT_INITIALIZED
axis is not initialized or doesn't exist
sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Wed Mar 2 2022 01:00:58