From c259c5ad9f183310f96b3355b326336ef8f4cc29 Mon Sep 17 00:00:00 2001
From: Aditya Prakash <adityaprakash229997@gmail.com>
Date: Wed, 14 Apr 2021 09:44:07 +0200
Subject: [PATCH] minor changes

---
 leaderboard/leaderboard/autoagents/agent_wrapper.py    | 2 +-
 leaderboard/leaderboard/autoagents/autonomous_agent.py | 2 +-
 leaderboard/leaderboard/envs/sensor_interface.py       | 2 --
 leaderboard/leaderboard/scenarios/route_scenario.py    | 4 ++--
 leaderboard/leaderboard/utils/route_parser.py          | 2 +-
 5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/leaderboard/leaderboard/autoagents/agent_wrapper.py b/leaderboard/leaderboard/autoagents/agent_wrapper.py
index 95d9ce3..1c91ffe 100644
--- a/leaderboard/leaderboard/autoagents/agent_wrapper.py
+++ b/leaderboard/leaderboard/autoagents/agent_wrapper.py
@@ -148,7 +148,7 @@ class AgentWrapper(object):
                                                      yaw=sensor_spec['yaw'])
                 elif sensor_spec['type'].startswith('sensor.lidar'):
                     bp.set_attribute('range', str(85))
-                    bp.set_attribute('rotation_frequency', str(10)) # default: 10, change to 20 for old lidar models
+                    bp.set_attribute('rotation_frequency', str(10)) # default: 10, change to 20 to generate 360 degree LiDAR point cloud
                     bp.set_attribute('channels', str(64))
                     bp.set_attribute('upper_fov', str(10))
                     bp.set_attribute('lower_fov', str(-30))
diff --git a/leaderboard/leaderboard/autoagents/autonomous_agent.py b/leaderboard/leaderboard/autoagents/autonomous_agent.py
index 31a9536..5d9898b 100644
--- a/leaderboard/leaderboard/autoagents/autonomous_agent.py
+++ b/leaderboard/leaderboard/autoagents/autonomous_agent.py
@@ -39,7 +39,7 @@ class AutonomousAgent(object):
         self._global_plan_world_coord = None
 
         # this data structure will contain all sensor data
-        self.sensor_interface = SensorInterface() # commented out by aditya
+        self.sensor_interface = SensorInterface()
 
         # agent's initialization
         self.setup(path_to_conf_file)
diff --git a/leaderboard/leaderboard/envs/sensor_interface.py b/leaderboard/leaderboard/envs/sensor_interface.py
index a9f7e85..571994d 100644
--- a/leaderboard/leaderboard/envs/sensor_interface.py
+++ b/leaderboard/leaderboard/envs/sensor_interface.py
@@ -242,11 +242,9 @@ class SensorInterface(object):
                     break
 
                 sensor_data = self._new_data_buffers.get(True, self._queue_timeout)
-                if sensor_data[1] % 200 == 0 and sensor_data[0]=='gps': print("Getting {} - {}".format(sensor_data[0],sensor_data[1])) # random check
                 data_dict[sensor_data[0]] = ((sensor_data[1], sensor_data[2]))
 
         except Empty:
-            print (data_dict.keys())
             raise SensorReceivedNoData("A sensor took too long to send their data")
 
         return data_dict
diff --git a/leaderboard/leaderboard/scenarios/route_scenario.py b/leaderboard/leaderboard/scenarios/route_scenario.py
index 8672b83..62663e2 100644
--- a/leaderboard/leaderboard/scenarios/route_scenario.py
+++ b/leaderboard/leaderboard/scenarios/route_scenario.py
@@ -345,8 +345,8 @@ class RouteScenario(BasicScenario):
         for trigger in potential_scenarios_definitions.keys():
             possible_scenarios = potential_scenarios_definitions[trigger]
 
-            # scenario_choice = select_scenario(possible_scenarios) # original
-            scenario_choice = select_scenario_randomly(possible_scenarios)
+            # scenario_choice = select_scenario(possible_scenarios) # original prioritized sampling
+            scenario_choice = select_scenario_randomly(possible_scenarios) # random sampling
             del possible_scenarios[possible_scenarios.index(scenario_choice)]
             # We keep sampling and testing if this position is present on any of the scenarios.
             while position_sampled(scenario_choice, sampled_scenarios):
diff --git a/leaderboard/leaderboard/utils/route_parser.py b/leaderboard/leaderboard/utils/route_parser.py
index e516f8e..dabb377 100644
--- a/leaderboard/leaderboard/utils/route_parser.py
+++ b/leaderboard/leaderboard/utils/route_parser.py
@@ -139,7 +139,7 @@ class RouteParser(object):
     @staticmethod
     def parse_preset_weather(route):
         """
-        Returns a carla.WeatherParameters with the corresponding weather for that route. If the route
+        Returns one of the 14 preset weather condition. If the route
         has no weather attribute, the default one is triggered.
         """
 
-- 
GitLab