Beispiel #1
0
#!/usr/bin/env python3

import rospy

import logging
import subprocess
import sys

from markov.utils import Logger, log_and_exit
from markov.utils import (SIMAPP_EVENT_ERROR_CODE_500,
                          SIMAPP_SIMULATION_WORKER_EXCEPTION)

logger = Logger(__name__, logging.INFO).get_logger()


def main():
    try:
        # parse argument
        race_idx = sys.argv[1]
        race_yaml_path = sys.argv[2]
        racecars_with_stereo_cameras = sys.argv[3]
        racecars_with_lidars = sys.argv[4]
        race_car_colors = sys.argv[5]
        simapp_versions = sys.argv[6]

        launch_name = 'tournament_rl_agent.launch'

        cmd = ' '.join([
            "roslaunch", "deepracer_simulation_environment",
            "{}".format(launch_name),
            "local_yaml_path:={}".format(race_yaml_path),
'''This module houses all the constants for the metrics package'''
from enum import Enum, unique
from collections import OrderedDict
import os
import logging
from markov.utils import Logger

LOG = Logger(__name__, logging.INFO).get_logger()


class MetricsS3Keys(Enum):
    '''The keys fro the s3 buckets'''
    REGION = 'aws_region'
    METRICS_BUCKET = 'metrics_bucket'
    METRICS_KEY = 'metrics_key'
    STEP_BUCKET = 'step_bucket'
    STEP_KEY = 'step_key'
    ENDPOINT_URL = 'endpoint_url'


class EvalMetricsKeys(Enum):
    '''The shared metric key for eval metrics'''
    PROGRESS = 'progress'


class StepMetrics(Enum):
    '''The keys for the sim trace metrics'''
    EPISODE = 'episode'
    STEPS = 'steps'
    X = 'X'
    Y = 'Y'