def goto_plate(self):
if self.listen.frameExists("/root") and self.listen.frameExists("/plate_position"):
self.listen.waitForTransform('/root','/plate_position',rospy.Time(),rospy.Duration(100.0))
# t1 = self.listen.getLatestCommonTime("/root", "bowl_position")
translation, quaternion = self.listen.lookupTransform("/root", "/plate_position", rospy.Time(0))
translation = list(translation)
quaternion = list(quaternion)
#quaternion = [0.8678189045198146, 0.0003956789257977804, -0.4968799802988633, 0.0006910675928639343]
#quaternion = [0]*4
pose_value = translation + quaternion
#second arg=0 (absolute movement), arg = '-r' (relative movement)
self.cmmnd_CartesianPosition(pose_value, 0)
else:
print ("we DONT have the bowl frame")
task_4.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录