<commit_before>#!/usr/bin/env python


# ROSPY LOGS
# logdebug
# logerr
# logfatal
# loginfo
# logout
# logwarn

# Import required Python code.
import os
import sys
import rospy
import traceback
import genmsg.msg_loader
from include.genpy import generator
from include.genpy import genpy_firos
from include import confManager

def launchSetup(main=False):
    retcode = 0

    print "\nStarting Firos setup..."
    print "---------------------------------\n"
    print "\nGenerating Message Description Files\n"


    try:
        robots = confManager.getRobots()
        current_path = os.path.dirname(os.path.abspath(__file__))
        outdir = os.path.join(current_path, "include/ros/")
        print(outdir)
        retcode = genpy_firos.genmain(robots, generator.MsgGenerator(genmsg.msg_loader.load_msg_from_string), outdir)
        print "\nSuccesfully generated\n"
        if main:
            sys.exit(retcode or 0)
    except Exception as e:
        rospy.logerr("\nSomething wrong happened\n")
        traceback.print_exc()
        print("ERROR: ",e)
        sys.exit(retcode or 0)

# Main function.<commit_msg>removed log<commit_after>#!/usr/bin/env python


# ROSPY LOGS
# logdebug
# logerr
# logfatal
# loginfo
# logout
# logwarn

# Import required Python code.
import os
import sys
import rospy
import traceback
import genmsg.msg_loader
from include.genpy import generator
from include.genpy import genpy_firos
from include import confManager

def launchSetup(main=False):
    retcode = 0

    print "\nStarting Firos setup..."
    print "---------------------------------\n"
    print "\nGenerating Message Description Files\n"


    try:
        robots = confManager.getRobots()
        current_path = os.path.dirname(os.path.abspath(__file__))
        outdir = os.path.join(current_path, "include/ros/")
        retcode = genpy_firos.genmain(robots, generator.MsgGenerator(genmsg.msg_loader.load_msg_from_string), outdir)
        print "\nSuccesfully generated\n"
        if main:
            sys.exit(retcode or 0)
    except Exception as e:
        rospy.logerr("\nSomething wrong happened\n")
        traceback.print_exc()
        print("ERROR: ",e)
        sys.exit(retcode or 0)

# Main function.
{'fraction_non_alphanumeric': 0.12353471596032461, 'fraction_numerical': 0.002705139765554554, 'mean_word_length': 2.7294117647058824, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2982065', 'n_tokens_mistral': 704, 'n_tokens_neox': 682, 'n_words': 173}