当前位置: 首页>>代码示例>>Python>>正文


Python Limb.move_to_joint_positions方法代码示例

本文整理汇总了Python中baxter_interface.Limb.move_to_joint_positions方法的典型用法代码示例。如果您正苦于以下问题:Python Limb.move_to_joint_positions方法的具体用法?Python Limb.move_to_joint_positions怎么用?Python Limb.move_to_joint_positions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在baxter_interface.Limb的用法示例。


在下文中一共展示了Limb.move_to_joint_positions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: Gripper

# 需要导入模块: from baxter_interface import Limb [as 别名]
# 或者: from baxter_interface.Limb import move_to_joint_positions [as 别名]
from baxter_interface import Gripper, Head, Limb
rospy.init_node('run_condition')
voice_pub = rospy.Publisher('/voice', UInt32, queue_size=10)
time.sleep(1)

rightg = Gripper('right')
rightg.set_holding_force(50)
leftg = Gripper('left')
right = Limb('right')
left = Limb('left')
head = Head()
neutral_right = {'right_s0': 0.476301034638421, 'right_s1': -0.5606699779721187, 'right_w0': 0.07094661143970038, 'right_w1': 0.7037136864424336, 'right_w2': -0.28033498898605935, 'right_e0': -0.16566992509162468, 'right_e1': 1.3077186216723151}
neutral_left = {'left_w0': -0.15339807878854136, 'left_w1': 0.34552917247118947, 'left_w2': 3.0158062289827234, 'left_e0': 0.18676216092504913, 'left_e1': 1.5715633171886063, 'left_s0': -0.5836796897904, 'left_s1': -0.6845389265938658}


right.move_to_joint_positions(neutral_right)
left.move_to_joint_positions(neutral_left)

head.set_pan(0.0, speed = 0.8, timeout = 0.0)

Gripper.calibrate(rightg)
Gripper.calibrate(leftg)

# neutral_right = {'right_s0': 0.476301034638421, 'right_s1': -0.5606699779721187, 'right_w0': 0.07094661143970038, 'right_w1': 0.7037136864424336, 'right_w2': -0.28033498898605935, 'right_e0': -0.16566992509162468, 'right_e1': 1.3077186216723151}
# neutral_left = {'left_w0': -0.15339807878854136, 'left_w1': 0.34552917247118947, 'left_w2': 3.0158062289827234, 'left_e0': 0.18676216092504913, 'left_e1': 1.5715633171886063, 'left_s0': -0.5836796897904, 'left_s1': -0.6845389265938658}

# right.move_to_joint_positions(neutral_right)
# left.move_to_joint_positions(neutral_left)

def wait():
	raw_input("Press Enter to continue...")
开发者ID:aashi7,项目名称:baxter_deli,代码行数:33,代码来源:run_condition2.py

示例2: Gripper

# 需要导入模块: from baxter_interface import Limb [as 别名]
# 或者: from baxter_interface.Limb import move_to_joint_positions [as 别名]
rightg.set_holding_force(100)
leftg = Gripper('left')
right = Limb('right')
left = Limb('left')
head = Head()
head.set_pan(0.0, speed = 0.8, timeout = 0.0)

Gripper.calibrate(rightg)
Gripper.calibrate(leftg)

neutral_right ={'right_s0': 0.5971020216843973, 'right_s1': -0.4237621926533455, 'right_w0': 0.4226117070624315, 'right_w1': 0.8471408901097197, 'right_w2': -0.9725438195193523, 'right_e0': -0.40727189918357737, 'right_e1': 1.161990446823201}

neutral_left = {'left_w0': -0.3006602344255411, 'left_w1': 0.5549175500175484, 'left_w2': 3.050704291907117, 'left_e0': 0.5161845351234418, 'left_e1': 1.1984224905354794, 'left_s0': -0.8904758473674826, 'left_s1': -0.38387869216832476}


right.move_to_joint_positions(neutral_right)
left.move_to_joint_positions(neutral_left)



####PART 1 ("what would you like today")
#can we track the person with Baxter's head?


###PART 2 (COOKIE)
Head.set_pan(head, 0.45, speed = 1.0, timeout = 0.0) #looks at cookie section

#lifts arm above cookies
left.move_to_joint_positions({'left_w0': -0.177941771394708, 'left_w1': 1.131694326262464, 'left_w2': 3.0161897241796947, 'left_e0': 0.24965537322835107, 'left_e1': 0.8038059328519568, 'left_s0': -0.7320923310183137, 'left_s1': -0.4571262747898533}
)
开发者ID:aashi7,项目名称:baxter_deli,代码行数:32,代码来源:db_script.py


注:本文中的baxter_interface.Limb.move_to_joint_positions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。