Hey,
I have defined a fixed point in the base coordinate system. When dragging the TCP to maintain spherical motion, how can I compute the wrench at the fixed point in real time?
I know how to get wrench at flange:
def get_flange_wrench():
local ft = get_tcp_force()
local t_end_base = pose_trans(get_target_tcp_pose(), pose_inv(get_tcp_offset()))
local current_rot_in_tool = pose_inv(p[0, 0, 0, t_end_base[3], t_end_base[4], t_end_base[5]])
local f = pose_trans(current_rot_in_tool, p[ft[0], ft[1], ft[2], 0, 0, 0])
local t = pose_trans(current_rot_in_tool, p[ft[3], ft[4], ft[5], 0, 0, 0])
return [f[0], f[1], f[2], t[0], t[1], t[2]]
end
My approach :
tcp_offset = [135.76,135.76,126.51,0.0146,0.0437,-2.3713] # just show my tcp offset
fixed_point = pose_trans(get_actual_tcp_pose(),p[0,0,0.3,0,0,0])
while True:
wrench_at_flange = get_flange_wrench()
current_flange_to_fixed_point = pose_trans(pose_inv(get_actual_tool_flange_pose()), fixed_point)
wrench_at_fixed_point = wrench_trans(current_flange_to_fixed_point, wrench_at_flange)
#Make the robot move (Pseudocode)
speedl(vel, a = 5, t = get_steptime())
end
Is my approach correct? I’m not entirely sure.
Thanks