check_map.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('entropy_descriptor_node')
00003  
00004 import rospy
00005 #from sensor_msgs.msg import Image
00006 from entropy_descriptor_node.msg import heat_map
00007 import numpy as np
00008 import pylab
00009 
00010 def show_map(data):
00011     #print data
00012     hmap=np.array(data.data)
00013     hmap.shape = (data.height, data.width)
00014     print hmap, hmap.max()
00015     pylab.imshow(hmap.astype('float'))
00016     pylab.colorbar()
00017     pylab.draw()
00018 
00019 
00020 if __name__ == '__main__':
00021     print "check map"
00022     pylab.ion()
00023     rospy.init_node('check_map')
00024     rospy.Subscriber("/entropy_descriptor_driver_node/wrinkled_map", heat_map, show_map)
00025     rospy.spin()
00026     
00027     
00028     
00029     
00030     
00031     
00032     


normal_descriptor_node
Author(s): Arnau Ramisa
autogenerated on Fri Dec 6 2013 20:19:55