本文整理汇总了Python中Base.Base.rotateBase方法的典型用法代码示例。如果您正苦于以下问题:Python Base.rotateBase方法的具体用法?Python Base.rotateBase怎么用?Python Base.rotateBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base.Base
的用法示例。
在下文中一共展示了Base.rotateBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Base import Base [as 别名]
# 或者: from Base.Base import rotateBase [as 别名]
class Awesomeness:
def __init__(self, pick_id=0, place_id=1):
self.pick_object = trackObject(pick_id)
self.place_object = trackObject(place_id)
#self.pap = PickAndPlace()
self.pick_success = True
#self.arm = Arm('l_arm')
self.table_point = PointStamped()
self.table_point.header.frame_id = 0
self.table_point.point.x = 0.475179451085
self.table_point.point.y = 0.283060568718
self.table_point.point.z = -0.407675985492
self.placer = Place()
self.head = Head()
self.base = Base()
def run(self):
self.pick_up()
self.place()
def pick_up(self):
self.pick_success = False
self.pick_success = self.placer.pick_up()
return self.pick_success
def papmpick_up(self):
self.pick_success = False
point = self.pick_object.get_point()
#self.pick_success = self.pap.pick_up_object_near_point(self.table_point)
self.pick_success = self.pap.pick_up_object_near_point(point)
def place(self):
self.place_success = False
return self.placer.place_can()
def papmplace(self):
if self.pick_success:
#square of size 10 cm by 10 cm
place_rect_dims = [.1, .1]
place_rect_center = self.place_object.get_pose()
self.pap.place_object(place_rect_dims, place_rect_center)
def drop(self):
self.pap.papm.open_gripper(1) # 1 is for left arm
def rotate(self, amount):
self.base.rotateBase(amount)