예제 #1
0
def main():
  '''
  Creates and runs the ROS node.
  '''
  rospy.init_node(NODE_NAME, log_level=rospy.DEBUG)
  setTerminalName(rospy.get_name())
  setProcessName(rospy.get_name())
  # time to initialize the topics to receive these in rxconsole
  discoverer = master_sync.Main()
  if not rospy.is_shutdown():
    rospy.spin()
예제 #2
0
def main():
    '''
    Creates and runs the ROS node.
    '''
    # setup the loglevel
    try:
        log_level = getattr(
            rospy, rospy.get_param('/%s/log_level' % PROCESS_NAME, "INFO"))
    except Exception as e:
        print "Error while set the log level: %s\n->INFO level will be used!" % e
        log_level = rospy.INFO
    rospy.init_node(PROCESS_NAME, log_level=log_level)
    set_terminal_name(PROCESS_NAME)
    set_process_name(PROCESS_NAME)
    # time to initialize the topics to receive these in rxconsole
    discoverer = master_sync.Main()
    if not rospy.is_shutdown():
        rospy.spin()