AbbClient.send

AbbClient.send(instruction)[source]

Sends an instruction to the robot without waiting.

Instructions can indicate that feedback is required or not. If the instruction sent does not require feedback, this method returns None. However, if the instruction needs feedback (i.e. feedback_level is greater than zero), the method returns a future result object that can be used to wait for completion.

Waiting for a future can be done immediately after calling this, or deferred to a later point.

Parameters:
instructioncompas_fab.backends.ros.messages.ROSmsg

ROS Message representing the instruction to send.

Returns:
FutureResult:

Represent the future value of the feedback request. This method will return immediately, and this object can be used to wait or react to the feedback whenever it becomes available.

Examples

Streaming commands without blocking or waiting for feedback:

# Print path
abb.send(rrc.MoveToFrame(Frame.worldXY(), 150, rrc.Zone.FINE, rrc.Motion.LINEAR))

Send commands and defer waiting to a future point in time:

# Stop watch
done = abb.send_and_wait(rrc.StopWatch())

# Read watch
future = abb.send(rrc.ReadWatch())

# Move robot to end position
abb.send(rrc.MoveToJoints(robot_joints_end_position, external_axis_dummy, 1000, rrc.Zone.FINE))

# Read and print printing time
watch_time = future.result(timeout=3.0)
print('Print Time [s] = ', watch_time)