get_tcp_force()
Returns the force/torque vector at the tool flange.
The function returns p[Fx(N), Fy(N), Fz(N), TRx(Nm), TRy(Nm), TRz(Nm)] where the forces: Fx, Fy, and Fz in Newtons and the torques: TRx, TRy and TRz in Newtonmeters are all measured at the tool flange with the orientation of the robot base coordinate system.
Return Value
The force/torque vector
Note:
Refer to zero_ftsensor() for taring sensor.
Example:
def get_wrench_at_tool_flange():
ft = get_tcp_force()
t_flange_in_base
= pose_trans(get_target_tcp_pose(), pose_inv(get_tcp_offset())) flange_rot = pose_inv(p[0, 0, 0, t_flange_in_base[3], t_flange_in_base[4], t_flange_in_base[5]])
f = pose_trans(flange_rot, p[ft[0], ft[1], ft[2], 0, 0, 0])
t = pose_trans(flange_rot, p[ft[3], ft[4], ft[5], 0, 0, 0])
return [f[0], f[1], f[2], t[0], t[1], t[2]]
end
def get_wrench_at_tcp():
return wrench_trans(get_tcp_offset(), get_wrench_at_tool_flange())
end