本文整理汇总了Python中PyPR2.getArmJointPositions方法的典型用法代码示例。如果您正苦于以下问题:Python PyPR2.getArmJointPositions方法的具体用法?Python PyPR2.getArmJointPositions怎么用?Python PyPR2.getArmJointPositions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyPR2
的用法示例。
在下文中一共展示了PyPR2.getArmJointPositions方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: larm_joints
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def larm_joints(in_degrees = True):
if in_degrees:
gain = 180.0/math.pi
else:
gain = 1.0
lajd = PyPR2.getArmJointPositions(True)
return(gain*gen_larm_joint_vector_from_dic(lajd))
示例2: twist_forearm
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def twist_forearm(angle = 180.0, is_left_arm = True):
if is_left_arm:
joint_name = 'l_forearm_roll_joint'
else:
joint_name = 'r_forearm_roll_joint'
jd = PyPR2.getArmJointPositions(is_left_arm)
jd[joint_name] = jd[joint_name] + angle*math.pi/180.0
PyPR2.moveArmWithJointPos(**jd)
示例3: rarm_elbow_flex_joint
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def rarm_elbow_flex_joint(in_degrees = True):
'''
returns the current angle of the shoulder pan joint of the right arm
'''
if in_degrees:
gain = 180.0/math.pi
else:
gain = 1.0
rajd = PyPR2.getArmJointPositions(False)
return(gain*rajd['r_elbow_flex_joint'])
示例4: larm_elbow_flex_joint
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def larm_elbow_flex_joint(in_degrees = True):
'''
returns the current angle of the shoulder pan joint of the left arm
'''
if in_degrees:
gain = 180.0/math.pi
else:
gain = 1.0
lajd = PyPR2.getArmJointPositions(True)
return(gain*lajd['l_elbow_flex_joint'])
示例5: larm_shoulder_lift_joint
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def larm_shoulder_lift_joint(in_degrees = True):
'''
returns the current angle of the shoulder lift joint of the left arm
'''
if in_degrees:
gain = 180.0/math.pi
else:
gain = 1.0
rajd = PyPR2.getArmJointPositions(True)
return(gain*rajd['l_shoulder_lift_joint'])
示例6: twist_rg
# 需要导入模块: import PyPR2 [as 别名]
# 或者: from PyPR2 import getArmJointPositions [as 别名]
def twist_rg(angle = 180.0):
jd = PyPR2.getArmJointPositions(False)
jd['r_wrist_roll_joint'] = jd['r_wrist_roll_joint'] + angle*math.pi/180.0
PyPR2.moveArmWithJointPos(**jd)