test_ros_interface.py
Go to the documentation of this file.
00001 
00002 
00003 #
00004 # Steps:
00005 #   1. Run  bin/og_node
00006 #   2. run rviz with the fixed frame = /occupancy_grid_frame
00007 #   3. Run this node.
00008 
00009 import roslib; roslib.load_manifest('simple_occupancy_grid')
00010 import rospy
00011 
00012 from std_msgs.msg import Empty
00013 from hrl_srvs.srv import FloatArray_None
00014 
00015 
00016 if __name__ == '__main__':
00017     viz_cmd_pub = rospy.Publisher('/occupancy_grid_node/cmd/viz_simple', Empty)
00018     rospy.init_node('occupancy_grid_tester')
00019 
00020     add_pts_srv = rospy.ServiceProxy('/occupancy_grid_node/srv/add_points_unstamped', FloatArray_None)
00021 
00022     raw_input('Hit ENTER to add points')
00023 
00024     pts = [0.6, 0., 1., 0.4, 0., 1., 0.5, 0.1, 1.]
00025     #pts = [0.27, -0.23, 0.]
00026     #pts = [0.4, 0., 0.]
00027     add_pts_srv(pts)
00028 
00029 
00030     raw_input('Hit ENTER to visualize')
00031     viz_cmd_pub.publish(Empty())
00032 
00033 
00034 
00035 


simple_occupancy_grid
Author(s): Advait Jain
autogenerated on Wed Nov 27 2013 12:10:09