In [1]:
from pybotics.robot import Robot
from pybotics.predefined_models import ur10
robot = Robot.from_parameters(ur10())
In [2]:
forces = [0, 0, 10]
torques = [0, 0, 0]
wrench = [*forces, *torques]
In [5]:
import numpy as np
robot.joints = np.deg2rad([0, 0, 0, 0, 0, 0])
j_torques = robot.compute_joint_torques(wrench)
print(f'Robot Joints: {robot.joints}')
print(f'Joint Torques: {j_torques}')
robot.joints = np.deg2rad([0, -90, -90, 0, -90, 0])
j_torques = robot.compute_joint_torques(wrench)
print(f'Robot Joints: {robot.joints}')
print(f'Joint Torques: {j_torques}')