def goto_spoon(self):
self.calibrate_obj_det_pub.publish(True)
while self.calibrated == False:
pass
print("Finger Sensors calibrated")
try:
trans = self.tfBuffer.lookup_transform('root', 'spoon_position', rospy.Time())
except (tf2_ros.LookupException, tf2_ros.ConnectivityException, tf2_ros.ExtrapolationException):
rate.sleep()
# continue
translation = [trans.transform.translation.x, trans.transform.translation.y, trans.transform.translation.z]
rotation = [trans.transform.rotation.x, trans.transform.rotation.y, trans.transform.rotation.z, trans.transform.rotation.w]
pose_value = translation + rotation
#second arg=0 (absolute movement), arg = '-r' (relative movement)
self.cmmnd_CartesianPosition(pose_value, 0)
2017_Task10.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录