14 from std_msgs.msg
import Float64
15 from nav_msgs.msg
import Odometry
21 """docstring for Odom2Yaw""" 30 self.
yaw_pub=rospy.Publisher(
'/yaw', Float64, queue_size = 1)
39 orie = odom.pose.pose.orientation
40 o=[orie.x,orie.y,orie.z,orie.w]
42 rpy= tf.transformations.euler_from_quaternion(o)
43 yaw.data = rpy[2]*180/3.1415926
44 self.yaw_pub.publish(yaw)
46 if __name__==
'__main__':
47 rospy.init_node(
'odom2yaw')
49 rospy.loginfo(
"initialization system")
51 print "process done and quit" 52 except rospy.ROSInterruptException:
53 rospy.loginfo(
"node terminated.")
def odom_callback(self, odom)