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


Python MoveGroupCommander.detach_object方法代码示例

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


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

示例1:

# 需要导入模块: from moveit_commander import MoveGroupCommander [as 别名]
# 或者: from moveit_commander.MoveGroupCommander import detach_object [as 别名]
	p1.pose.orientation.z = b1[2]
	p1.pose.orientation.w = b1[3]

	#glovebox pose
	p2.pose.position.x = 0
	p2.pose.position.y = 0
	p2.pose.position.z = 0.56
	b2 = tf.transformations.quaternion_from_euler(1.57,0,0)
	p2.pose.orientation.x = b2[0]
	p2.pose.orientation.y = b2[1]
	p2.pose.orientation.z = b2[2]
	p2.pose.orientation.w = b2[3]

	#detach/remove current scene objects
	print 'removing objects...'
	robot.detach_object("bowl")
	rospy.sleep(1)
	scene.remove_world_object("bowl")
	scene.remove_world_object("punch")
	scene.remove_world_object("glovebox")

	rospy.sleep(2)

	#reset the gripper and arm position to home
	robot.set_start_state_to_current_state()
	robot.set_named_target("start_glove")
	robot.go()
	gripper.set_start_state_to_current_state()
	gripper.go()

	#add scene objects	
开发者ID:clintP,项目名称:Workspace,代码行数:33,代码来源:bowlreduction1.py

示例2: RobotCommander

# 需要导入模块: from moveit_commander import MoveGroupCommander [as 别名]
# 或者: from moveit_commander.MoveGroupCommander import detach_object [as 别名]
 p.pose.position.x = 0.72
 p.pose.position.z = 0.05
 # add the pen
 scene.add_mesh("pen",p,resourcepath+'objects/pen.dae')
 rospy.sleep(1)
  
 # print the existing groups 
 robot = RobotCommander()
 print "Available groups: ",robot.get_group_names()
 
 # setup the arm group and its planner
 arm = MoveGroupCommander("arm")
 arm.set_start_state_to_current_state()
 arm.set_planner_id("RRTstarkConfigDefault") 
 arm.set_planning_time(5.0)
 arm.detach_object("pen")
 
 # set the arm to a safe target
 arm.set_named_target("gamma")
 # plan and execute the motion 
 arm.go()
 
 # setup the hand group and its planner
 hand = MoveGroupCommander("hand")
 hand.set_start_state_to_current_state()
 hand.set_planner_id("LBKPIECEkConfigDefault") 
 hand.set_planning_time(10.0)
 
 # set the hand to a safe target
 hand.set_named_target("open")
 # plan and execute the motion
开发者ID:amoliu,项目名称:dexterous-manipulation-tutorial,代码行数:33,代码来源:regrasping_app.py


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