message: refactored viewer
diff: @@ -352,7 +352,10 @@ class BaseViewer(Viewer):
  self.drawBehaviorPlan(eval_agent)
  if self._draw_ego_rss_safety_responses:
  - self.DrawRSSEvaluatorState(world, eval_agent_ids[0], eval_agent_ids[0])
  + self.DrawRSSEvaluatorState(world, eval_agent_ids[0])
  +
  + if self._rss_min_braking_distances:
  + self.DrawRSSBrakingDistances(world, eval_agent_ids[0])
  def drawMapAerialImage(self):
  pass
  @@ -486,11 +489,7 @@ class BaseViewer(Viewer):
  self.drawPolygon2d(transformed_polygon, response_color,
  0.6, response_color, zorder=9)
  - def DrawRSSEvaluatorState(self, world, agent_id, eval_id):
  - agent = world.agents[agent_id]
  - behavior = agent.behavior_model
  -
  - if self._rss_min_braking_distances:
  + def DrawRSSBrakingDistances(self, world, eval_id):
  for agent_id, agent in world.agents.items():
  observed_world = world.Observe([agent_id])[0]
  rss_params = None
  @@ -500,7 +499,12 @@ class BaseViewer(Viewer):
  rss_params = self.parameters["EvaluatorRss"]["Others"]
  min_braking_safety_polygon = ComputeMinBrakingPolygon(observed_world, rss_params)
  color_face = "red" # self.agent_color_map[agent_id]
  - self.drawPolygon2d(min_braking_safety_polygon.GetPolygon(), color_face, 0.25, color_face, zorder=9)
  + self.drawPolygon2d(
  + min_braking_safety_polygon.GetPolygon(), color_face, 0.25, color_face, zorder=9)
  +
  + def DrawRSSEvaluatorState(self, world, agent_id):
  + agent = world.agents[agent_id]
  + behavior = agent.behavior_model
  if isinstance(behavior, BehaviorRSSConformant):
  longitudinal_response = behavior.GetLongitudinalResponse()
  