Robotics Library
0.7.0
|
Weiss Robotics Universal Gripper WSG 50. More...
#include <WeissWsg50.h>
Public Types | |
enum | GraspingState { GRASPING_STATE_IDLE = 0, GRASPING_STATE_GRIPPING = 1, GRASPING_STATE_NO_PART_FOUND = 2, GRASPING_STATE_PART_LOST = 3, GRASPING_STATE_HOLDING = 4, GRASPING_STATE_RELEASING = 5, GRASPING_STATE_POSITIONING = 6, GRASPING_STATE_ERROR = 7 } |
enum | SystemState { SYSTEM_STATE_SCRIPT_FAILURE = 1048576, SYSTEM_STATE_SCRIPT_RUNNING = 524288, SYSTEM_STATE_COMMAND_FAILURE = 262144, SYSTEM_STATE_FINGER_FAULT = 131072, SYSTEM_STATE_CURRENT_FAULT = 65536, SYSTEM_STATE_POWER_FAULT = 32768, SYSTEM_STATE_TEMPERATURE_FAULT = 16384, SYSTEM_STATE_TEMPERATURE_WARNING = 8192, SYSTEM_STATE_FAST_STOP = 4096, SYSTEM_STATE_FORCE_CONTROL_MODE = 512, SYSTEM_STATE_OVERDRIVE_MODE = 256, SYSTEM_STATE_TARGET_POSITION_REACHED = 128, SYSTEM_STATE_AXIS_STOPPED = 64, SYSTEM_STATE_SOFT_LIMIT_PLUS = 32, SYSTEM_STATE_SOFT_LIMIT_MINUS = 16, SYSTEM_STATE_AXIS_BLOCKED_PLUS = 8, SYSTEM_STATE_AXIS_BLOCKED_MINUS = 4, SYSTEM_STATE_MOVING = 2, SYSTEM_STATE_REFERENCED = 1 } |
Public Member Functions | |
WeissWsg50 (const ::std::string &address="192.168.1.20", const unsigned short int &port=1000, const float &acceleration=3.0f, const float &forceLimit=40.0f, const unsigned int &period=10) | |
virtual | ~WeissWsg50 () |
void | acknowledgeFaults () |
void | close () |
void | doAcknowledgeFaults () |
void | doFastStop () |
void | doGetAcceleration () |
void | doClearSoftLimits () |
void | doGetForce (const bool &doAutomaticUpdate, const bool &doUpdateOnChange, const unsigned int &period=0) |
void | doGetForceLimit () |
void | doGetGraspingState (const bool &doAutomaticUpdate, const bool &doUpdateOnChange, const unsigned int &period=0) |
void | doGetGraspingStatistics (const bool &doReset, int &numberGraspsTotal, int &numberGraspsNoPart, int &numberGraspsLostPart) |
void | doGetOpeningWidth (const bool &doAutomaticUpdate, const bool &doUpdateOnChange, const unsigned int &period=0) |
void | doGetSoftLimits () |
void | doGetSpeed (const bool &doAutomaticUpdate, const bool &doUpdateOnChange, const unsigned int &period=0) |
void | doGetSystemInformation (bool &isWsg50, int &hardwareRevision, int &firmwareRevision, int &serialNumber) |
void | doGetSystemLimits () |
void | doGetSystemState (const bool &doAutomaticUpdate, const bool &doUpdateOnChange, const unsigned int &period=0) |
float | doGetTemperature () |
void | doGraspPart (const float &width, const float &speed) |
void | doHomingMotion (const unsigned int &direction=0) |
Perform necessary homing motion for calibration. More... | |
void | doOverdriveMode (const bool &doOverdriveMode) |
void | doPrePositionFingers (const float &width, const float &speed, const bool &doRelativeMovement=false, const bool &doStopOnBlock=false) |
void | doReleasePart (const float &width, const float &speed) |
void | doSetAcceleration (const float &acceleration) |
void | doSetForceLimit (const float &force) |
void | doSetSoftLimits (const float &limitMinus, const float &limitPlus) |
void | doStop () |
void | doTareForceSensor () |
float | getAcceleration () const |
float | getForce () const |
float | getForceLimit () const |
GraspingState | getGraspingState () const |
float | getOpeningWidth () const |
float | getSpeed () const |
SystemState | getSystemState () const |
void | halt () |
void | open () |
void | release () |
void | shut () |
void | start () |
void | step () |
void | stop () |
Public Member Functions inherited from rl::hal::CyclicDevice | |
CyclicDevice (const ::std::chrono::nanoseconds &updateRate) | |
virtual | ~CyclicDevice () |
virtual ::std::chrono::nanoseconds | getUpdateRate () const |
Public Member Functions inherited from rl::hal::Device | |
Device () | |
virtual | ~Device () |
bool | isConnected () const |
bool | isRunning () const |
Public Member Functions inherited from rl::hal::Gripper | |
Gripper () | |
virtual | ~Gripper () |
Private Member Functions | |
::std::uint16_t | crc (const ::std::uint8_t *buf, const ::std::size_t &len) const |
void | doDisconnectAnnouncement () |
::std::size_t | recv (::std::uint8_t *buf) |
::std::size_t | recv (::std::uint8_t *buf, const ::std::size_t &len, const ::std::uint8_t &command) |
void | send (::std::uint8_t *buf, const ::std::size_t &len) |
Private Attributes | |
float | acceleration |
float | accelerationMaximum |
float | accelerationMinimum |
float | force |
float | forceLimit |
float | forceMinimum |
float | forceNominal |
float | forceOverdrive |
GraspingState | graspingState |
float | limitMinus |
float | limitPlus |
float | openingWidth |
unsigned int | period |
Socket | socket |
float | speed |
float | speedMaximum |
float | speedMinimum |
float | stroke |
SystemState | systemState |
Static Private Attributes | |
static const ::std::size_t | HEADER_SIZE = 6 |
Additional Inherited Members | |
Protected Member Functions inherited from rl::hal::Device | |
void | setConnected (const bool &connected) |
void | setRunning (const bool &running) |
Weiss Robotics Universal Gripper WSG 50.
See "WSG Series of Intelligent Servo-Electric Grippers: Command Set Reference Manual": http://www.weiss-robotics.de/en/download.html?cid=1&fid=37&id=314
Important: Before use, you usually need to set "Part Width Tolerance" and "Default Clamping Travel" to maximum in the web interface. Otherwise, the gripper will not grasp if object width is different from the given value.
rl::hal::WeissWsg50::WeissWsg50 | ( | const ::std::string & | address = "192.168.1.20" , |
const unsigned short int & | port = 1000 , |
||
const float & | acceleration = 3.0f , |
||
const float & | forceLimit = 40.0f , |
||
const unsigned int & | period = 10 |
||
) |
[in] | address | TCP hostname |
[in] | port | TCP port |
[in] | acceleration | [0.1,..,5] [m/s^2] |
[in] | forceLimit | [5,..,80] [N] |
[in] | period | Default automatic update period [ms] |
|
virtual |
void rl::hal::WeissWsg50::acknowledgeFaults | ( | ) |
|
virtual |
Implements rl::hal::Device.
|
private |
void rl::hal::WeissWsg50::doAcknowledgeFaults | ( | ) |
void rl::hal::WeissWsg50::doClearSoftLimits | ( | ) |
|
private |
void rl::hal::WeissWsg50::doFastStop | ( | ) |
void rl::hal::WeissWsg50::doGetAcceleration | ( | ) |
void rl::hal::WeissWsg50::doGetForce | ( | const bool & | doAutomaticUpdate, |
const bool & | doUpdateOnChange, | ||
const unsigned int & | period = 0 |
||
) |
void rl::hal::WeissWsg50::doGetForceLimit | ( | ) |
void rl::hal::WeissWsg50::doGetGraspingState | ( | const bool & | doAutomaticUpdate, |
const bool & | doUpdateOnChange, | ||
const unsigned int & | period = 0 |
||
) |
void rl::hal::WeissWsg50::doGetGraspingStatistics | ( | const bool & | doReset, |
int & | numberGraspsTotal, | ||
int & | numberGraspsNoPart, | ||
int & | numberGraspsLostPart | ||
) |
void rl::hal::WeissWsg50::doGetOpeningWidth | ( | const bool & | doAutomaticUpdate, |
const bool & | doUpdateOnChange, | ||
const unsigned int & | period = 0 |
||
) |
void rl::hal::WeissWsg50::doGetSoftLimits | ( | ) |
void rl::hal::WeissWsg50::doGetSpeed | ( | const bool & | doAutomaticUpdate, |
const bool & | doUpdateOnChange, | ||
const unsigned int & | period = 0 |
||
) |
void rl::hal::WeissWsg50::doGetSystemInformation | ( | bool & | isWsg50, |
int & | hardwareRevision, | ||
int & | firmwareRevision, | ||
int & | serialNumber | ||
) |
void rl::hal::WeissWsg50::doGetSystemLimits | ( | ) |
void rl::hal::WeissWsg50::doGetSystemState | ( | const bool & | doAutomaticUpdate, |
const bool & | doUpdateOnChange, | ||
const unsigned int & | period = 0 |
||
) |
float rl::hal::WeissWsg50::doGetTemperature | ( | ) |
void rl::hal::WeissWsg50::doGraspPart | ( | const float & | width, |
const float & | speed | ||
) |
[in] | width[in] | [0,..,0.11] [m] |
[in] | speed[in] | [0,..,0.4] [m/s] |
void rl::hal::WeissWsg50::doHomingMotion | ( | const unsigned int & | direction = 0 | ) |
Perform necessary homing motion for calibration.
This function call is blocking until the calibration is complete.
[in] | direction | 0 = default from system configuration, 1 = positive movement, 2 = negative movement |
void rl::hal::WeissWsg50::doOverdriveMode | ( | const bool & | doOverdriveMode | ) |
void rl::hal::WeissWsg50::doPrePositionFingers | ( | const float & | width, |
const float & | speed, | ||
const bool & | doRelativeMovement = false , |
||
const bool & | doStopOnBlock = false |
||
) |
[in] | width | [0,..,0.11] [m] |
[in] | speed | [0,..,0.4] [m/s] |
void rl::hal::WeissWsg50::doReleasePart | ( | const float & | width, |
const float & | speed | ||
) |
[in] | width | [0,..,0.11] [m] |
[in] | speed | [0.005,..,0.4] [m/s] |
void rl::hal::WeissWsg50::doSetAcceleration | ( | const float & | acceleration | ) |
[in] | acceleration | [0.1,..,5] [m/s^2] |
void rl::hal::WeissWsg50::doSetForceLimit | ( | const float & | force | ) |
[in] | force | [5,..,80] [N] |
void rl::hal::WeissWsg50::doSetSoftLimits | ( | const float & | limitMinus, |
const float & | limitPlus | ||
) |
[in] | limitMinus | [m] |
[in] | limitPlus | [m] |
void rl::hal::WeissWsg50::doStop | ( | ) |
void rl::hal::WeissWsg50::doTareForceSensor | ( | ) |
float rl::hal::WeissWsg50::getAcceleration | ( | ) | const |
float rl::hal::WeissWsg50::getForce | ( | ) | const |
float rl::hal::WeissWsg50::getForceLimit | ( | ) | const |
WeissWsg50::GraspingState rl::hal::WeissWsg50::getGraspingState | ( | ) | const |
float rl::hal::WeissWsg50::getOpeningWidth | ( | ) | const |
float rl::hal::WeissWsg50::getSpeed | ( | ) | const |
WeissWsg50::SystemState rl::hal::WeissWsg50::getSystemState | ( | ) | const |
|
virtual |
Implements rl::hal::Gripper.
|
virtual |
Implements rl::hal::Device.
|
private |
|
private |
|
virtual |
Implements rl::hal::Gripper.
|
private |
|
virtual |
Implements rl::hal::Gripper.
|
virtual |
Implements rl::hal::Device.
|
virtual |
Implements rl::hal::CyclicDevice.
|
virtual |
Implements rl::hal::Device.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |