Go to the documentation of this file.00001
00002 import rospy
00003 from geometry_msgs.msg import PointStamped
00004 from asctec_hl_comm.msg import mav_imu
00005
00006 def callback(data):
00007
00008 height = data.height
00009
00010 rospy.loginfo(rospy.get_caller_id() + "Pressure: %f", height)
00011 pt = PointStamped()
00012 pt.header = data.header
00013 pt.point.z = height
00014 pub = rospy.Publisher('pressure_height_point', PointStamped, queue_size=1)
00015 pub.publish(pt)
00016
00017 def listener():
00018
00019
00020
00021
00022
00023 rospy.init_node('pressure_point_publisher', anonymous=True)
00024
00025 rospy.Subscriber("fcu/imu_custom", mav_imu, callback)
00026
00027
00028 rospy.spin()
00029
00030 if __name__ == '__main__':
00031 listener()