stop.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('rfnserver')
00003 import rospy
00004 from rfnserver import RFNServer
00005 
00006 class StopServer:
00007     def __init__(self):
00008         self.server = RFNServer("stop_topic", self.stop_function)
00009         self.server.register_with_frame("stopping")
00010         self.server.start()
00011 
00012     def stop_function(self, filled_semantic_frame):
00013         # Preempts last goal, waits, then does nothing more.
00014         rospy.sleep(0.5)
00015         self.server.set_succeeded()
00016 
00017 
00018 
00019 def main():
00020     rospy.init_node('stop_node')
00021     server = StopServer()
00022     rospy.spin()
00023 
00024 if __name__ == '__main__':
00025     main()
00026 
00027 
00028 
00029 


stop_server
Author(s): Brian Thomas
autogenerated on Fri Dec 6 2013 20:38:32