Exemplo n.º 1
0
 def __init__(self):
     params = ParameterServer(filename= \
       os.path.join(os.path.dirname(__file__),
       "../environments/blueprints/visualization_params.json"))
     cont_merging_bp = ContinuousMergingBlueprint(params, mode="medium")
     SingleAgentRuntime.__init__(self,
                                 blueprint=cont_merging_bp,
                                 render=True)
Exemplo n.º 2
0
 def __init__(self):
     params = ParameterServer(filename=os.path.join(
         os.path.dirname(__file__),
         "../environments/blueprints/visualization_params.json"))
     cont_highway_bp = ContinuousHighwayBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=cont_highway_bp,
                                 render=True)
Exemplo n.º 3
0
 def __init__(self,
   params = ParameterServer(filename= \
     os.path.join(os.path.dirname(__file__),
     "../environments/blueprints/visualization_params.json")),
   render=False):
     discrete_merging_bp = DiscreteMergingBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=discrete_merging_bp,
                                 render=render)
 def __init__(self,
              blueprint=None,
              ml_behavior=None,
              observer=None,
              evaluator=None,
              step_time=None,
              viewer=None,
              scenario_generator=None,
              render=False,
              max_col_rate=0.1,
              behavior_model_pool=None,
              ego_rule_based=None,
              params=None):
   SingleAgentRuntime.__init__(
     self,
     blueprint=blueprint,
     ml_behavior=ml_behavior,
     observer=observer,
     evaluator=evaluator,
     step_time=step_time,
     viewer=viewer,
     scenario_generator=scenario_generator,
     render=render)
   self._params = params or ParameterServer()
   self._max_col_rate = params["ML"][
     "MaxColRate",
     "Max. collision rate allowed over all counterfactual worlds.", 0.1]
   self._cf_simulation_steps = params["ML"][
     "CfSimSteps",
     "Simulation steps for the counterfactual worlds.", 5]
   self._visualize_cf_worlds = params["ML"][
     "VisualizeCfWorlds",
     "Whether the counterfactual worlds are visualized.", False]
   self._visualize_heatmap = params["ML"][
     "VisualizeCfHeatmap",
     "Whether the heatmap is being visualized.", False]
   self._results_folder = params["ML"][
     "ResultsFolder",
     "Whether the heatmap is being visualized.", "./"]
   self._logger = logging.getLogger()
   self._behavior_model_pool = behavior_model_pool or []
   self._ego_rule_based = ego_rule_based or BehaviorIDMLaneTracking(self._params)
   self._tracer = Tracer()
   if self._visualize_heatmap:
     _, self._axs_heatmap = plt.subplots(1, 1, constrained_layout=True)
   self._count = 0
   self._cf_axs = {}
Exemplo n.º 5
0
 def __init__(self, *args, **kwargs):
     SingleAgentRuntime.__init__(self, *args, **kwargs)
Exemplo n.º 6
0
 def __init__(self, params=ParameterServer(), render=False):
     discrete_merging_bp = DiscreteIntersectionBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=discrete_merging_bp,
                                 render=render)
Exemplo n.º 7
0
 def __init__(self):
     params = ParameterServer()
     cont_merging_bp = ContinuousIntersectionBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=cont_merging_bp,
                                 render=True)
Exemplo n.º 8
0
 def __init__(self, params=ParameterServer(), render=False):
     discrete_highway_bp = DiscreteHighwayBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=discrete_highway_bp,
                                 render=render)
Exemplo n.º 9
0
 def __init__(self):
     params = ParameterServer()
     cont_highway_bp = ContinuousHighwayBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=cont_highway_bp,
                                 render=True)
Exemplo n.º 10
0
 def __init__(self):
     params = ParameterServer()
     discrete_merging_bp = DiscreteMergingBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=discrete_merging_bp,
                                 render=True)
Exemplo n.º 11
0
 def __init__(self):
     params = ParameterServer()
     discrete_highway_bp = DiscreteHighwayBlueprint(params)
     SingleAgentRuntime.__init__(self,
                                 blueprint=discrete_highway_bp,
                                 render=True)