Skip to content

Get Async Operation Progress

SUMMARY

Get Async Operation Progress returns a brand-specific value indicating the progress of the current asynchronous operation in flight.

On Universal Robots, this is the RTDE async_operation_progress field: it returns an integer in [0, 100] during execution, or -1 when no async operation is in progress.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
progress = robot.get_async_operation_progress()

The Code

Example: Poll Async Operation Progress

Start an asynchronous joint move and poll progress until it completes.

python
import time
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots

robot_ip = "192.168.1.2"  # replace with your robot's IP

robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)

initial_positions = robot.get_joint_positions()
target_positions = initial_positions[:]
target_positions[0] += 15

robot.set_joint_positions(
    joint_positions=target_positions,
    speed=30,
    acceleration=40,
    asynchronous=True,
)

while True:
    progress = robot.get_async_operation_progress()
    logger.info(f"Async operation progress: {progress}")
    if progress == -1 or progress == 100:
        break
    time.sleep(0.05)

logger.success("Async operation complete.")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_async_operation_progress reads the async_operation_progress RTDE field. During an async move, it returns a percentage (0–100). When no async operation is active, it returns -1. Use this to implement progress bars or to detect motion completion without blocking.

How to Tune the Parameters

This skill takes no input parameters.

Return Value

FieldTypeDescription
progressstrProgress value as a brand-specific code (integer string on Universal Robots).

Where to Use the Skill

  • Monitor progress of async motion commands.
  • Implement non-blocking wait loops with progress reporting.

When Not to Use the Skill

Use a different skill when:

  • You simply want to block until motion completes without polling — use asynchronous=False instead.