Skip to content

Commit

Permalink
Changes parameter name to make more clear it is boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Daraan committed Apr 16, 2024
1 parent bb4dcd1 commit fbb60c8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PythonAPI/carla/agents/conf/agent_settings_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion PythonAPI/carla/agents/navigation/basic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion PythonAPI/carla/agents/navigation/behavior_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fbb60c8

Please sign in to comment.