static_link_graph_service.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 #
00003 # License: BSD
00004 #   https://raw.github.com/robotics-in-concert/rocon_concert/license/LICENSE
00005 #
00006 ##############################################################################
00007 # Imports
00008 ##############################################################################
00009 
00010 import rospy
00011 import concert_service_link_graph
00012 import concert_service_utilities
00013 
00014 
00015 ##############################################################################
00016 # Main
00017 ##############################################################################
00018 
00019 if __name__ == '__main__':
00020     rospy.init_node('static_link_graph_service', anonymous=True)
00021 
00022     # this is a uuid.UUID key
00023     (name, description, priority, uuid) = concert_service_utilities.get_service_info()
00024     filename = rospy.get_param('~filename')
00025 
00026     impl_name, impl = concert_service_link_graph.load_linkgraph_from_file(filename)
00027 
00028     if not name:
00029         name = impl_name
00030 
00031     # Parameterisations
00032     topic_name = rospy.get_param("topic_name")
00033     for edge in impl.edges:
00034         edge.remap_to = edge.remap_to.replace('chatter', topic_name)
00035 
00036     static_link_graph_service = concert_service_link_graph.StaticLinkGraphHandler(name, description, priority, uuid, impl)
00037     static_link_graph_service.spin()


chatter_concert
Author(s): Daniel Stonier
autogenerated on Fri Feb 12 2016 02:51:14