def eubik(pos, armid="rgt"):
"""
compute the euristic waist rotation
ew = euristic waist
:param pos: object position
:return: waistangle in degree
author: weiwei
date: 20170410
"""
anglecomponent1 = 0
try:
anglecomponent1 = math.asin(80/np.linalg.norm(pos[0:2]))
except:
pass
waistangle = (math.atan2(pos[1], pos[0]) + anglecomponent1)*180/math.pi
if armid=="lft":
waistangle = 180.0-2*math.atan2(pos[0], pos[1])*180.0/math.pi-waistangle
return waistangle
评论列表
文章目录