Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 import roslib
00012 roslib.load_manifest('rocon_gateway_demos')
00013 import rospy
00014 from gateway_msgs.msg import *
00015
00016
00017
00018
00019
00020 def createTutorialDictionaries(regex):
00021 '''
00022 Creates and returns names and nodes dictionaries for the xxx_tutorials.
00023
00024 @param regex : true if it should test regex patterns instead of strings
00025 @type bool
00026 @return names, nodes : two dictionaries with connection type keys and names, node string values
00027 '''
00028 names = {}
00029 nodes = {}
00030 if regex:
00031 names = { ConnectionType.PUBLISHER : '.*ter',
00032 ConnectionType.SUBSCRIBER : '.*ter',
00033 ConnectionType.SERVICE : '/add_two_.*',
00034 ConnectionType.ACTION_CLIENT : '/fibonacci/cli.*',
00035 ConnectionType.ACTION_SERVER : '/fibonacci/ser.*'
00036 }
00037 nodes = { ConnectionType.PUBLISHER : '/t.*er',
00038 ConnectionType.SUBSCRIBER : '',
00039 ConnectionType.SERVICE : '',
00040 ConnectionType.ACTION_CLIENT : '',
00041 ConnectionType.ACTION_SERVER : ''
00042 }
00043 else:
00044 names = { ConnectionType.PUBLISHER : '/chatter',
00045 ConnectionType.SUBSCRIBER : '/chatter',
00046 ConnectionType.SERVICE : '/add_two_ints',
00047 ConnectionType.ACTION_CLIENT : '/fibonacci/client',
00048 ConnectionType.ACTION_SERVER : '/fibonacci/server'
00049 }
00050 nodes = { ConnectionType.PUBLISHER : '',
00051 ConnectionType.SUBSCRIBER : '',
00052 ConnectionType.SERVICE : '',
00053 ConnectionType.ACTION_CLIENT : '',
00054 ConnectionType.ACTION_SERVER : ''
00055 }
00056 return names, nodes