diff --git a/PythonAPI/carla/agents/conf/agent_settings_backend.py b/PythonAPI/carla/agents/conf/agent_settings_backend.py index f354ce5c50..ff58210956 100644 --- a/PythonAPI/carla/agents/conf/agent_settings_backend.py +++ b/PythonAPI/carla/agents/conf/agent_settings_backend.py @@ -406,7 +406,7 @@ class BasicAgentObstacleSettings(AgentConfig): Usage: max_tlight_distance = base_tlight_threshold + detection_speed_ratio * vehicle_speed """ - dynamic_threshold_by_speed : bool = True + use_dynamic_speed_threshold : bool = True """ Whether to add a dynamic threshold based on the vehicle speed to the base threshold. diff --git a/PythonAPI/carla/agents/navigation/basic_agent.py b/PythonAPI/carla/agents/navigation/basic_agent.py index 7be0a25cdd..128aea4067 100644 --- a/PythonAPI/carla/agents/navigation/basic_agent.py +++ b/PythonAPI/carla/agents/navigation/basic_agent.py @@ -177,7 +177,7 @@ def run_step(self): hazard_detected = True # Check if the vehicle is affected by a red traffic light - if self.config.obstacles.dynamic_threshold_by_speed: + if self.config.obstacles.use_dynamic_speed_threshold: # Basic agent setting: max_tlight_distance = self.config.obstacles.base_tlight_threshold + self.config.obstacles.detection_speed_ratio * self.config.live_info.current_speed else: diff --git a/PythonAPI/carla/agents/navigation/behavior_agent.py b/PythonAPI/carla/agents/navigation/behavior_agent.py index 52c21b3b10..c7fe580802 100644 --- a/PythonAPI/carla/agents/navigation/behavior_agent.py +++ b/PythonAPI/carla/agents/navigation/behavior_agent.py @@ -95,7 +95,7 @@ def traffic_light_manager(self): """ actor_list = self._world.get_actors() lights_list = actor_list.filter("*traffic_light*") - if self.config.obstacles.dynamic_threshold_by_speed: + if self.config.obstacles.use_dynamic_speed_threshold: # Basic agent setting: max_tlight_distance = self.config.obstacles.base_tlight_threshold + self.config.obstacles.detection_speed_ratio * self.config.live_info.current_speed else: diff --git a/PythonAPI/carla/agents/navigation/constant_velocity_agent.py b/PythonAPI/carla/agents/navigation/constant_velocity_agent.py index 750dfb892a..52b9c66ebe 100644 --- a/PythonAPI/carla/agents/navigation/constant_velocity_agent.py +++ b/PythonAPI/carla/agents/navigation/constant_velocity_agent.py @@ -97,7 +97,7 @@ def run_step(self): # Check if the vehicle is affected by a red traffic light - if self.config.obstacles.dynamic_threshold_by_speed: + if self.config.obstacles.use_dynamic_speed_threshold: # Basic agent setting: max_tlight_distance = self.config.obstacles.base_tlight_threshold + self.config.obstacles.detection_speed_ratio * vehicle_speed else: