05Robot 3.0

- Main Page
- Modules
- Classes
- Files

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

Signals | Public Member Functions | Public Attributes | List of all members
UR3Intermediator Class Reference
Universal Robot Module

Base class for communication with UR robot using TCP/IP interface. More...

`#include <UR3Intermediator.h>`

Inheritance diagram for UR3Intermediator:

## Signals
void | newPose (QVector< double > x, char flag)
| emitted when a new pose/data information has been received from robot More...
void | ConnectionAction (QString, bool Result)
| emitted on ConnectToRobot() More...
void | DisconnectionAction ()
| emitted on robot disconnection More...
void | CommandExecutionStart ()
| emmited when new command from command list has been send to robot for execution More...
void | CommandFinished ()
| emiited on command execution confirmation/acknowledgment reception More...
void | robotEmergancyStoped ()
| emiited when robot is in emergancy or protective stop state More...

## Public Member Functions
| UR3Intermediator (QString ipAddress="192.168.0.109", int port=30002, int ackServerPort=9090)
| default constructor, initializes class with starting properties More...
bool | ConnectToRobot ()
| Connects to a robot based on IpAddress and Port. Establishes acknowledgment server on port ackServerPort. More...
void | DisconnectFromRobot ()
| Disconnects from robot. More...
QString | MoveJ (QVector< double > Position, bool isBaseCS, double Acceleration=2.0, double Speed=4, double blendRadius=0)
| Generates command string for MoveJ command - move in robot joint space. More...
QString | MoveL (QVector< double > TargetPose, double toolAcceleration=1.2, double toolSpeed=.25, double time=0, double blendRadius=0)
| Generates command string for MoveL command - linear move in TCP space. More...
QString | setTCP (QVector< double > pose)
| Generates command string for setting Tool Center Point. More...
QString | robotSleep (float seconds)
| Generates command string for robot to sleep an amount of time. More...
QString | setToolOutput (int output, bool state)
| Generates command string to set tool digital output signal level. More...
void | addCommandToExecuteList (QString cmd)
| main method for sending commands to robot. addCommandToExecuteList adds commands generated by MoveJ, MoveL, setTCP, robotSleep or setToolOutput to be executed when robot is not running. Above commands can be concatenated to create a longer script to be send to robot at ounce. Internal UR3Intermediator mechanism queues the commands and sends them when robot finished former command More...
QString | setOutput (int output, bool state)

## Public Attributes
int | Port
| Robot TCP/IP interface port. Default 30002. More...
QString | IpAddress
| Robot TCP/IP interface IP. More...
int | ackServerPort
| Port for acknowledgment messages of command execution. More...

## Detailed Description

Base class for communication with UR robot using TCP/IP interface.

## Constructor & Destructor Documentation

UR3Intermediator | ( | QString | ipAddress = `"192.168.0.109"`,
|  | int | port = `30002`,
|  | int | ackServerPort = `9090`
| ) |  |

default constructor, initializes class with starting properties

Parameters

  ipAddress | Robot TCP/IP interface IP.
  port | Robot TCP/IP interface port. Default 30002.
  ackServerPort | Port for acknowledgment messages of command execution.

## Member Function Documentation

void addCommandToExecuteList | ( | QString | cmd | ) |

main method for sending commands to robot. addCommandToExecuteList adds commands generated by MoveJ, MoveL, setTCP, robotSleep or setToolOutput to be executed when robot is not running. Above commands can be concatenated to create a longer script to be send to robot at ounce. Internal UR3Intermediator mechanism queues the commands and sends them when robot finished former command

Parameters

  cmd | string containing a command to be executed

void CommandExecutionStart | ( |  | ) |
| signal

emmited when new command from command list has been send to robot for execution

void CommandFinished | ( |  | ) |
| signal

emiited on command execution confirmation/acknowledgment reception

void ConnectionAction | ( | QString | ,
|  | bool | Result
| ) |  |
| signal

emitted on ConnectToRobot()

Parameters

  Result | true on success, false otherwise

bool ConnectToRobot | ( |  | ) |

Connects to a robot based on IpAddress and Port. Establishes acknowledgment server on port ackServerPort.

Returns
  true on success, false otherwise

void DisconnectFromRobot | ( |  | ) |

Disconnects from robot.

Returns
  true on success, false otherwise

void DisconnectionAction | ( |  | ) |
| signal

emitted on robot disconnection

QString MoveJ | ( | QVector< double > | Position,
|  | bool | isBaseCS,
|  | double | Acceleration = `2.0`,
|  | double | Speed = `4`,
|  | double | blendRadius = `0`
| ) |  |

Generates command string for MoveJ command - move in robot joint space.

Parameters

  Position | target position as 6 element vector - joint configuration [rad] or TCP position [mm; RV]
  isBaseCS | specifies if position is given in joint configuration (false) or as TCP position (true)
  Acceleration | specifies acceleration as joint acceleration (isBaseCS=false) or as TCP acceleration (isBaseCS=true)
  Speed | specifies speed as joint speed (isBaseCS=false) or as TCP speed (isBaseCS=true)
  blendRadius | blend radius between specified and following motion [mm], omitted if 0

Returns
  command string to be feed into addCommandToExecuteList

QString MoveL | ( | QVector< double > | TargetPose,
|  | double | toolAcceleration = `1.2`,
|  | double | toolSpeed = `.25`,
|  | double | time = `0`,
|  | double | blendRadius = `0`
| ) |  |

Generates command string for MoveL command - linear move in TCP space.

Parameters

  TargetPose | target position as 6 element vector describing TCP position [mm; RV]
  toolAcceleration | tool acceleration
  toolSpeed | tool speed
  time | time
  blendRadius | blend radius between specified and following motion [mm]

Returns
  command string to be feed into addCommandToExecuteList

void newPose | ( | QVector< double > | x,
|  | char | flag
| ) |  |
| signal

emitted when a new pose/data information has been received from robot

Parameters

  x | new data received
  flag | determines type of message: 'j' - joint, 'p' - cartesian pose, 'f' - forces, 'c' - currents

void robotEmergancyStoped | ( |  | ) |
| signal

emiited when robot is in emergancy or protective stop state

QString robotSleep | ( | float | seconds | ) |

Generates command string for robot to sleep an amount of time.

Parameters

  seconds | time [s]

Returns
  command string to be feed into addCommandToExecuteList

QString setOutput | ( | int | output,
|  | bool | state
| ) |  |

QString setTCP | ( | QVector< double > | pose | ) |

Generates command string for setting Tool Center Point.

Parameters

  pose | pose describing transformation from robot flange to new TCP

Returns
  command string to be feed into addCommandToExecuteList

QString setToolOutput | ( | int | output,
|  | bool | state
| ) |  |

Generates command string to set tool digital output signal level.

Parameters

  output | id of the tool output (0 or 1)
  state | signal level

Returns
  command string to be feed into addCommandToExecuteList

## Member Data Documentation

int ackServerPort

Port for acknowledgment messages of command execution.

QString IpAddress

Robot TCP/IP interface IP.

int Port

Robot TCP/IP interface port. Default 30002.

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

- UR3CPP/UR3Intermediator.h