Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_T_cam_world(self, from_frame='kinect2_ir_optical_frame', to_frame='world'):
- """ get transformation from camera frame to world frame"""
- time = 0
- trans = None
- qat = None
- while not rospy.is_shutdown():
- try:
- time = self.tl.getLatestCommonTime(from_frame, to_frame)
- (trans, qat) = self.tl.lookupTransform(from_frame, to_frame, time)
- break
- except (tf.Exception,tf.LookupException,tf.ConnectivityException, tf.ExtrapolationException):
- print 'try again'
- continue
- print qat
- return RigidTransform(translation=trans, rotation=qat, from_frame=from_frame, to_frame=to_frame)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement