Skip to content

Get Actual Joint Positions History

SUMMARY

Get Actual Joint Positions History returns joint positions from the controller's internal history buffer, allowing you to look back a specified number of control steps.

This skill is useful for computing finite-difference velocities, detecting motion lag, or reconstructing a recent trajectory segment.

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
history = robot.get_actual_joint_positions_history(steps=5)

The Code

Example: Read Joint Position History

Connect to the robot and read the last 5 control-step joint configurations.

python
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)

steps = 5
history = robot.get_actual_joint_positions_history(steps=steps)
logger.success(f"Joint positions history ({steps} steps): {history}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_actual_joint_positions_history reads the actual_joint_positions_history_0 through actual_joint_positions_history_N fields from the RTDE data stream. The steps parameter controls how many past control cycles to retrieve. The returned data is ordered from the oldest to the most recent entry.

How to Tune the Parameters

ParameterTypeDefaultDescription
stepsint0Number of past control steps to retrieve. A value of 0 returns only the most recent sample.

Return Value

TypeDescription
list[float]Joint positions across the requested history window, flattened or structured depending on the number of steps.

Where to Use the Skill

  • Finite-difference velocity estimation — Compute joint velocity from two consecutive position samples
  • Trajectory reconstruction — Replay a short window of recent motion for logging or analysis
  • Lag detection — Compare history positions with commanded positions to measure control latency

When Not to Use the Skill

Do not use Get Actual Joint Positions History when: