teleop_record.py
Go to the documentation of this file.
00001 #!/usr/bin/env python  
00002 import roslib
00003 roslib.load_manifest('pr2_omni_teleop')
00004 
00005 import math
00006 import numpy as np
00007 import hrl_lib.tf_utils as tfu
00008 import pdb
00009 
00010 import rospy
00011 import tf
00012 import tf.transformations as tr
00013 
00014 
00015 class TeleopRecord:
00016 
00017     def __init__(self):
00018         self.tflistener = tf.TransformListener()
00019         tfu.wait('map', 'base_footprint', self.tflistener, 4.)
00020 
00021     def print_pose(self):
00022         try:
00023             tfu.wait('map', 'base_footprint', self.tflistener, 1.)
00024             m_T_b = tfu.transform('map', 'base_footprint', self.tflistener)
00025             t, q = tfu.matrix_as_tf(m_T_b)
00026 
00027             print m_T_b
00028             print 't', t, 'q', q
00029 
00030         except Exception, e:
00031             print e
00032 
00033 if __name__ == '__main__':
00034     rospy.init_node('teleop_record')
00035     t = TeleopRecord()
00036     t.print_pose()


pr2_omni_teleop
Author(s): Hai Nguyen, Marc Killpack Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:51:39