Skip to content

Get Target Joint Positions

SUMMARY

Get Target Joint Positions returns the joint positions that the robot controller is currently commanding — the controller's desired setpoint — as opposed to the actual measured positions returned by Get Joint Positions.

Use this skill to monitor what positions the controller is targeting, which is useful for diagnosing tracking error and verifying command execution.

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
q_target = robot.get_target_joint_positions()

The Code

Example: Read Controller-Commanded Target Joint Positions

Connect to the robot, read the target joint positions, and log them.

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)

q = robot.get_target_joint_positions()
logger.info(f"Target joint positions (deg): {q}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_target_joint_positions reads the joint position setpoint currently generated by the motion controller. This is the commanded reference trajectory, not the measured encoder value. The result is a 6-element list [q1…q6] of joint angles in degrees.

How to Tune the Parameters

This skill takes no parameters.

Return Value

TypeDescription
list[float]6-element list [q1…q6] of controller-commanded joint positions [deg].

Where to Use the Skill

  • Tracking error analysis — Compare target positions against actual positions from Get Joint Positions
  • Motion monitoring — Observe the commanded trajectory in real time during a move

When Not to Use the Skill

Do not use Get Target Joint Positions when: