Kinematics
Forward Kinematics
Compute the TCP pose from joint angles.
pose = arm.forward_kinematics([0.0, 0.0, 0.0, 1.57, 0.0, 0.0, 0.0])
print(f"TCP: ({pose.x:.3f}, {pose.y:.3f}, {pose.z:.3f})")
Parameter:
angles: 7 joint angles in radians, typelist[float]
Return value:
Pose: TCP pose
Inverse Kinematics
Solve joint angles from a TCP pose.
from realhand import Pose
target = Pose(x=0.0, y=0.33, z=-0.25, rx=1.85, ry=0.0, rz=-1.57)
angles = arm.inverse_kinematics(target)
print(f"Joint angles: {angles}")
Parameters:
pose: Target TCP pose, typePosecurrent_angles: Initial IK guess for joint angles, typelist[float] | None; whenNone, the SDK reads the motors
Return value:
list[float]: 7 joint angles in radians
Joint Limits
# Read the current joint limits
limits = arm.get_joint_limits()
print(limits) # [(lower0, upper0), (lower1, upper1), ...]
# Set custom joint limits
arm.set_joint_limits([(-1.0, 1.0)] * 7)