示例#1
0
def getDefaultRPCPort(zeroconf=False):
  try:
    masteruri = MasterMonitor._masteruri_from_ros()
    rospy.loginfo("ROS Master URI: %s", masteruri)
    from urlparse import urlparse
    return urlparse(masteruri).port+(600 if zeroconf else 300) 
  except:
    import traceback
    print traceback.format_exc()
    return 11911 if zeroconf else 11611
示例#2
0
def getDefaultRPCPort(zeroconf=False):
  try:
    masteruri = MasterMonitor._masteruri_from_ros()
    rospy.loginfo("ROS Master URI: %s", masteruri)
    from urlparse import urlparse
    return urlparse(masteruri).port+(600 if zeroconf else 300) 
  except:
    import traceback
    print traceback.format_exc()
    return 11911 if zeroconf else 11611