05Robot 3.0

- Main Page
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Slots | Signals | Public Member Functions | Properties | List of all members
UR3Workspace Class Reference
Universal Robot Module

Wraper over UR3Intermediator class. Represents a robot working space. Enables robot connection and robot interface. UR3Workspace contains robot calibration information and definition of environment, such as home position and binDescriptor etc. More...

`#include <UR3Workspace.h>`

Inheritance diagram for UR3Workspace:

## Public Slots
void | connectToRobot ()
| opens a TCP/IP connection to robot using robotIP and robotPort properties More...
void | disconnectFromRobot ()
| closes a TCP/IP connection from robot More...
void | moveToWorkspaceHome ()
| evokes a MoveJ command movement to home point set by setHomePosition More...
void | moveOverBoard ()
| evokes a MoveJ command movement to point set by setBoardPosition More...
void | moveOverBin ()
| evokes a MoveJ command movement to point set by setOverBinPosition More...
void | pickObject (QVector3D pointInMeters, float objectHeightInMeters, float angle, int bin)
| pickObject evokes a procedure of object picking Home -> OverBoard -> OverObject -> PickObjest -> OverObject -> OverBoard -> Home -> Bin -> Home More...

## Signals
void | newPose (QVector< double > data, char type)
| emitted when new configuration/position data from robot was received More...
void | commandStarted ()
| emitted when new command has been send to a robot to execute More...
void | commandExecuted ()
| emitted when acknowledgment of full command execution was received on port ackServerPort More...
void | connectedToRobot (bool connected)
| emitted after robot connection attempt More...
void | disconnectedFromRobot ()
| emitted when robot connection closed More...
void | robotEmergencyStopped ()
| emitted when robot is in emergency or protective stop More...

## Public Member Functions
| UR3Workspace ()
| default constructor. Sets initial workspace values. More...
| ~UR3Workspace ()
QMap< int, BinDescriptor > | getBinDescriptors ()
| UR3CalibWidget interface. More...
QVector< double > | getArrayStartPosition ()
| UR3CalibWidget interface. More...
QVector< double > | getArrayEndPosition ()
| UR3CalibWidget interface. More...
QVector< double > | getHomePosition ()
| UR3CalibWidget interface. More...
QVector< double > | getBoardPosition ()
| UR3CalibWidget interface. More...
QVector< double > | getOverBinPosition ()
| UR3CalibWidget interface. More...
QMap< int, QVector< double > > | getCalibrationPoints ()
| UR3CalibWidget interface. More...
bool | getEnableBinArrayMode ()
| UR3CalibWidget interface. More...
int | getBinArraySize ()
| UR3CalibWidget interface. More...
void | setBinPosition (int key, QVector< double > cartesianData)
| sets one bin descriptor More...
void | setArrayStartPosition (QVector< double > cartesianData)
| sets array starting position More...
void | setArrayEndPosition (QVector< double > cartesianData)
| sets array end position More...
void | setHomePosition (QVector< double > jointData)
| sets robot starting position More...
void | setOverBinPosition (QVector< double > jointData)
| sets robot over bin position More...
void | setBoardPosition (QVector< double > jointData)
| sets robot middle position between home and working space More...
void | setCalibrationPoint (int key, QVector< double > cartesianData)
| sets one calibration point More...
void | recalculateCalibration ()
| recaltulates transformation matrix between camera and robot coordinate systems based on calibration points stored in UR3Workspace More...
void | recalculateBinArray ()
| recaltulates bin set for array calibration mode More...
void | setCalibrationTCP ()
| sets robot Tool Center Point to calibration configuration as described in XML More...
void | setWorkingTCP ()
| sets robot Tool Center Point to working configuration as described in XML More...
virtual void | writeXml (QXmlStreamWriter &stream)
| writes to XML file UR3Workspace meta properties and description of robot enviroment like bins, home position, working and calibration TCP, etc. More...
virtual void | readXml (QXmlStreamReader &stream)
| reads XML file UR3Workspace meta properties and description of robot enviroment like bins, home position, working and calibration TCP, etc. More...
int | getRobotPort () const
| Gets robotPort property value. More...
void | setRobotPort (const int &port)
| Sets robotPort property value. More...
QString | getRobotIP () const
| Gets robotIP property value. More...
void | setRobotIP (const QString &IP)
| Sets robotIP property value. More...
int | getAckServerPort () const
| Gets ackServerPort property value. More...
void | setAckServerPort (const int &port)
| Sets ackServerPort property value. More...
void | SetenableBinArrayMode_ (bool _arg_enableBinArrayMode_)
| Sets enableBinArrayMode_ property value. More...
bool | enableBinArrayMode_ () const
| Gets enableBinArrayMode_ property value. More...
void | SetbinArraySize_ (int _arg_binArraySize_)
| Sets binArraySize_ property value. More...
int | binArraySize_ () const
| Gets binArraySize_ property value. More...
void | SetpickingObjectOffsetInMM_ (int _arg_pickingObjectOffsetInMM_)
| Sets pickingObjectOffsetInMM_ property value. More...
int | pickingObjectOffsetInMM_ () const
| Gets pickingObjectOffsetInMM_ property value. More...
void | SetputtingObjectOffsetInMM_ (int _arg_puttingObjectOffsetInMM_)
| Sets puttingObjectOffsetInMM_ property value. More...
int | puttingObjectOffsetInMM_ () const
| Gets puttingObjectOffsetInMM_ property value. More...
void | SetapproachOffsetInMM_ (int _arg_approachOffsetInMM_)
| Sets approachOffsetInMM_ property value. More...
int | approachOffsetInMM_ () const
| Gets approachOffsetInMM_ property value. More...
void | SetjMoveAcceleration_ (double _arg_jMoveAcceleration_)
| Sets jMoveAcceleration_ property value. More...
double | jMoveAcceleration_ () const
| Gets jMoveAcceleration_ property value. More...
void | SetjMoveSpeed_ (double _arg_jMoveSpeed_)
| Sets jMoveSpeed_ property value. More...
double | jMoveSpeed_ () const
| Gets jMoveSpeed_ property value. More...
void | SetlMoveToolAcceleration_ (double _arg_lMoveToolAcceleration_)
| Sets lMoveToolAcceleration_ property value. More...
double | lMoveToolAcceleration_ () const
| Gets lMoveToolAcceleration_ property value. More...
void | SetlMoveToolSpeed_ (double _arg_lMoveToolSpeed_)
| Sets lMoveToolSpeed_ property value. More...
double | lMoveToolSpeed_ () const
| Gets lMoveToolSpeed_ property value. More...
Public Member Functions inherited from cXmlIO
| cXmlIO (int _xmlID=0, QObject *parent=nullptr)
virtual QString | sXmlKey ()
| Generates key of XML entry (as name of the serialised class is) More...
virtual void | findInXML (QString &fileName, bool compareXmlID=true)
| serches th file for XML key corr to class name and fill class properties according to entries found More...
virtual void | writeCsvData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | writeCsvVector (QXmlStreamWriter &stream, QString key, const QVector< double > &s)
virtual void | readCsvData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
virtual void | readCsvVector (QXmlStreamReader &stream, QVector< double > &s)
virtual void | write64BaseData (QXmlStreamWriter &stream, QString key, const QVector< QVector< double > > &s)
virtual void | read64BaseData (QXmlStreamReader &stream, QVector< QVector< double > > &s)
template<typename T >
void | writeData (QXmlStreamWriter &stream, QString key, const T &data)
template<typename T >
void | readData (QXmlStreamReader &stream, T &data)
int | getXmlID () const
void | setXmlID (int value)

## Properties
int | robotPort
| Robot TCP/IP interface port. Default 30002. More...
QString | robotIP
| Robot TCP/IP interface IP. More...
int | ackServerPort
| Port for acknowledgment messages of command execution. More...
bool | enableBinArrayMode_
| enables array style calibration mode, default false More...
int | binArraySize_
| defines bin count in array calibration mode, default 5 More...
int | pickingObjectOffsetInMM_
| distance between robot TCP and final picking point (safety distance), default 0 More...
int | puttingObjectOffsetInMM_
| additional offset for putting object into bin, default 5 More...
int | approachOffsetInMM_
| distance of final approach to picking point, when motion is switched to linear, default 10 More...
double | jMoveAcceleration_
| robot joint acceleration, default 1 More...
double | jMoveSpeed_
| robot joint speed, default 1 More...
double | lMoveToolAcceleration_
| robot TCP linear acceleration, default 0.6 More...
double | lMoveToolSpeed_
| robot TCP linear speed, default 0.1 More...
Properties inherited from cXmlIO
int | xmlID
| Defines uniqe identifier for object in XML file. More...

## Additional Inherited Members
Static Public Member Functions inherited from cXmlIO
static void | metaCopy (QObject *dest, QObject *src)
Protected Member Functions inherited from cXmlIO
void | metaDataXmlReader (QXmlStreamReader &stream, QObject &obj, bool isUser=true)
void | metaDataXmlWriter (QXmlStreamWriter &stream, const QObject &obj, bool isUser=true)

## Detailed Description

Wraper over UR3Intermediator class. Represents a robot working space. Enables robot connection and robot interface. UR3Workspace contains robot calibration information and definition of environment, such as home position and binDescriptor etc.

## Constructor & Destructor Documentation

UR3Workspace | ( |  | ) |

default constructor. Sets initial workspace values.

~UR3Workspace | ( |  | ) |

## Member Function Documentation

int approachOffsetInMM_ | ( |  | ) | const

Gets approachOffsetInMM_ property value.

int binArraySize_ | ( |  | ) | const

Gets binArraySize_ property value.

void commandExecuted | ( |  | ) |
| signal

emitted when acknowledgment of full command execution was received on port ackServerPort

void commandStarted | ( |  | ) |
| signal

emitted when new command has been send to a robot to execute

void connectedToRobot | ( | bool | connected | ) |
| signal

emitted after robot connection attempt

Parameters

  connected | true if connection was successful

void connectToRobot | ( |  | ) |
| slot

opens a TCP/IP connection to robot using robotIP and robotPort properties

void disconnectedFromRobot | ( |  | ) |
| signal

emitted when robot connection closed

void disconnectFromRobot | ( |  | ) |
| slot

closes a TCP/IP connection from robot

bool enableBinArrayMode_ | ( |  | ) | const

Gets enableBinArrayMode_ property value.

int getAckServerPort | ( |  | ) | const
| inline

Gets ackServerPort property value.

QVector<double> getArrayEndPosition | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  6 element vector defining array end position - [mm; rot. vct]

QVector<double> getArrayStartPosition | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  6 element vector defining array start position - [mm; rot. vct]

int getBinArraySize | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  number of bins for array calibration mode

QMap<int, BinDescriptor> getBinDescriptors | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  description of all bins defined in UR3Workspace as BinDescriptor

QVector<double> getBoardPosition | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  6 element vector defining robot middle position between home and working space - [rad]

QMap<int, QVector<double> > getCalibrationPoints | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  map of three six elements vectors describing robot celibration in relation to the camera - [mm; rot. vct]

bool getEnableBinArrayMode | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  calibration mode

QVector<double> getHomePosition | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  returns 6 element vector defining robot starting position in joint configuration - [rad]

QVector<double> getOverBinPosition | ( |  | ) |
| inline

UR3CalibWidget interface.

Returns
  6 element vector defining robot position over bins - [rad]

QString getRobotIP | ( |  | ) | const
| inline

Gets robotIP property value.

int getRobotPort | ( |  | ) | const
| inline

Gets robotPort property value.

double jMoveAcceleration_ | ( |  | ) | const

Gets jMoveAcceleration_ property value.

double jMoveSpeed_ | ( |  | ) | const

Gets jMoveSpeed_ property value.

double lMoveToolAcceleration_ | ( |  | ) | const

Gets lMoveToolAcceleration_ property value.

double lMoveToolSpeed_ | ( |  | ) | const

Gets lMoveToolSpeed_ property value.

void moveOverBin | ( |  | ) |
| slot

evokes a MoveJ command movement to point set by setOverBinPosition

void moveOverBoard | ( |  | ) |
| slot

evokes a MoveJ command movement to point set by setBoardPosition

void moveToWorkspaceHome | ( |  | ) |
| slot

evokes a MoveJ command movement to home point set by setHomePosition

void newPose | ( | QVector< double > | data,
|  | char | type
| ) |  |
| signal

emitted when new configuration/position data from robot was received

Parameters

  data | 6 element vector containing configuration or position
  type | determines message type: 'j' - joint [rad]; 'p' - pose [mm;rv]

int pickingObjectOffsetInMM_ | ( |  | ) | const

Gets pickingObjectOffsetInMM_ property value.

void pickObject | ( | QVector3D | pointInMeters,
|  | float | objectHeightInMeters,
|  | float | angle,
|  | int | bin
| ) |  |
| slot

pickObject evokes a procedure of object picking Home -> OverBoard -> OverObject -> PickObjest -> OverObject -> OverBoard -> Home -> Bin -> Home

Parameters

  vector | containing X, Y and Z [m] of object origin to pick in robot<->camera reference frame
  object | hight [m]
  angle | orientation of picked object - reorientates TCP according to this parameter
  bin | object destination bin (bucket)

int puttingObjectOffsetInMM_ | ( |  | ) | const

Gets puttingObjectOffsetInMM_ property value.

virtual void readXml | ( | QXmlStreamReader & | stream | ) |
| virtual

reads XML file UR3Workspace meta properties and description of robot enviroment like bins, home position, working and calibration TCP, etc.

Parameters

  stream | XML stream

Reimplemented from cXmlIO.

void recalculateBinArray | ( |  | ) |

recaltulates bin set for array calibration mode

void recalculateCalibration | ( |  | ) |

recaltulates transformation matrix between camera and robot coordinate systems based on calibration points stored in UR3Workspace

void robotEmergencyStopped | ( |  | ) |
| signal

emitted when robot is in emergency or protective stop

void setAckServerPort | ( | const int & | port | ) |
| inline

Sets ackServerPort property value.

void SetapproachOffsetInMM_ | ( | int | _arg_approachOffsetInMM_ | ) |

Sets approachOffsetInMM_ property value.

void setArrayEndPosition | ( | QVector< double > | cartesianData | ) |

sets array end position

Parameters

  cartesianData | 6 element vector containing point X, Y, Z [mm] and orientation as rotation vector

void setArrayStartPosition | ( | QVector< double > | cartesianData | ) |

sets array starting position

Parameters

  cartesianData | 6 element vector containing point X, Y, Z [mm] and orientation as rotation vector

void SetbinArraySize_ | ( | int | _arg_binArraySize_ | ) |

Sets binArraySize_ property value.

void setBinPosition | ( | int | key,
|  | QVector< double > | cartesianData
| ) |  |

sets one bin descriptor

Parameters

  key | identification key of the bin written
  cartesianData | 6 element vector containing point X, Y, Z [mm] and orientation as rotation vector

void setBoardPosition | ( | QVector< double > | jointData | ) |

sets robot middle position between home and working space

Parameters

  jointData | 6 element vector describing robot joint configuration [rad]

void setCalibrationPoint | ( | int | key,
|  | QVector< double > | cartesianData
| ) |  |

sets one calibration point

Parameters

  key | identification key of calibration point
  cartesianData | 6 element vector containing point X, Y, Z [mm] and orientation as rotation vector

void setCalibrationTCP | ( |  | ) |

sets robot Tool Center Point to calibration configuration as described in XML

void SetenableBinArrayMode_ | ( | bool | _arg_enableBinArrayMode_ | ) |

Sets enableBinArrayMode_ property value.

void setHomePosition | ( | QVector< double > | jointData | ) |

sets robot starting position

Parameters

  jointData | 6 element vector describing robot joint configuration [rad]

void SetjMoveAcceleration_ | ( | double | _arg_jMoveAcceleration_ | ) |

Sets jMoveAcceleration_ property value.

void SetjMoveSpeed_ | ( | double | _arg_jMoveSpeed_ | ) |

Sets jMoveSpeed_ property value.

void SetlMoveToolAcceleration_ | ( | double | _arg_lMoveToolAcceleration_ | ) |

Sets lMoveToolAcceleration_ property value.

void SetlMoveToolSpeed_ | ( | double | _arg_lMoveToolSpeed_ | ) |

Sets lMoveToolSpeed_ property value.

void setOverBinPosition | ( | QVector< double > | jointData | ) |

sets robot over bin position

Parameters

  jointData | 6 element vector describing robot joint configuration [rad]

void SetpickingObjectOffsetInMM_ | ( | int | _arg_pickingObjectOffsetInMM_ | ) |

Sets pickingObjectOffsetInMM_ property value.

void SetputtingObjectOffsetInMM_ | ( | int | _arg_puttingObjectOffsetInMM_ | ) |

Sets puttingObjectOffsetInMM_ property value.

void setRobotIP | ( | const QString & | IP | ) |
| inline

Sets robotIP property value.

void setRobotPort | ( | const int & | port | ) |
| inline

Sets robotPort property value.

void setWorkingTCP | ( |  | ) |

sets robot Tool Center Point to working configuration as described in XML

virtual void writeXml | ( | QXmlStreamWriter & | stream | ) |
| virtual

writes to XML file UR3Workspace meta properties and description of robot enviroment like bins, home position, working and calibration TCP, etc.

Parameters

  stream | XML stream

Reimplemented from cXmlIO.

## Property Documentation

int ackServerPort
| read write

Port for acknowledgment messages of command execution.

int approachOffsetInMM_
| read write

distance of final approach to picking point, when motion is switched to linear, default 10

int binArraySize_
| read write

defines bin count in array calibration mode, default 5

bool enableBinArrayMode_
| read write

enables array style calibration mode, default false

double jMoveAcceleration_
| read write

robot joint acceleration, default 1

double jMoveSpeed_
| read write

robot joint speed, default 1

double lMoveToolAcceleration_
| read write

robot TCP linear acceleration, default 0.6

double lMoveToolSpeed_
| read write

robot TCP linear speed, default 0.1

int pickingObjectOffsetInMM_
| read write

distance between robot TCP and final picking point (safety distance), default 0

int puttingObjectOffsetInMM_
| read write

additional offset for putting object into bin, default 5

QString robotIP
| read write

Robot TCP/IP interface IP.

int robotPort
| read write

Robot TCP/IP interface port. Default 30002.

The documentation for this class was generated from the following file:

- UR3CPP/UR3Workspace.h