Go to the documentation of this file.00001
00002 import roslib; roslib.load_manifest('rfnserver')
00003 import rospy
00004 from rfnserver import RFNServer
00005
00006 class PingServer:
00007 def __init__(self):
00008 self.server = RFNServer("ping_topic", self.ping_function)
00009
00010
00011 self.server.add_frame("../frames/pinging.yaml")
00012 self.server.add_lexical_unit("../lu/ping_pinging.yaml")
00013 self.server.register_with_frame("pinging")
00014 self.server.start()
00015
00016 def ping_function(self, filled_semantic_frame):
00017 rospy.loginfo("Ping!")
00018 self.server.set_succeeded()
00019
00020
00021
00022 def main():
00023 rospy.init_node('ping_node')
00024 server = PingServer()
00025 rospy.spin()
00026
00027 if __name__ == '__main__':
00028 main()
00029
00030
00031
00032