diff --git a/PythonAPI/carla/agents/conf/agent_settings_backend.py b/PythonAPI/carla/agents/conf/agent_settings_backend.py index e1efc15574..71ed7fdeda 100644 --- a/PythonAPI/carla/agents/conf/agent_settings_backend.py +++ b/PythonAPI/carla/agents/conf/agent_settings_backend.py @@ -271,7 +271,7 @@ class BehaviorAgentDistanceSettings(BasicAgentDistanceSettings): min_proximity_threshold : float = 10 """Range in which cars are detected. NOTE: Speed limit overwrites""" - braking_distance : float = 5 + emergency_braking_distance : float = 5 """Emergency Stop Distance Trigger""" diff --git a/PythonAPI/carla/agents/conf/behavior_types.py b/PythonAPI/carla/agents/conf/behavior_types.py index 94f3d211be..7d3faba887 100644 --- a/PythonAPI/carla/agents/conf/behavior_types.py +++ b/PythonAPI/carla/agents/conf/behavior_types.py @@ -14,7 +14,7 @@ class Cautious(SimpleBehaviorAgentSettings): speed_decrease = 12 safety_time = 3 min_proximity_threshold = 12 - braking_distance = 6 + emergency_braking_distance = 6 avoid_tailgators = True @dataclass @@ -25,7 +25,7 @@ class Normal(SimpleBehaviorAgentSettings): speed_decrease = 10 safety_time = 3 min_proximity_threshold = 10 - braking_distance = 5 + emergency_braking_distance = 5 avoid_tailgators = True @dataclass @@ -36,5 +36,5 @@ class Aggressive(SimpleBehaviorAgentSettings): speed_decrease = 8 safety_time = 3 min_proximity_threshold = 8 - braking_distance = 4 + emergency_braking_distance = 4 avoid_tailgators = False diff --git a/PythonAPI/carla/agents/navigation/behavior_agent.py b/PythonAPI/carla/agents/navigation/behavior_agent.py index 5153b94259..52c21b3b10 100644 --- a/PythonAPI/carla/agents/navigation/behavior_agent.py +++ b/PythonAPI/carla/agents/navigation/behavior_agent.py @@ -284,7 +284,7 @@ def run_step(self, debug=False): self._vehicle.bounding_box.extent.y, self._vehicle.bounding_box.extent.x) # Emergency brake if the car is very close. - if distance < self.config.distance.braking_distance: + if distance < self.config.distance.emergency_braking_distance: return self.emergency_stop() # 2.2: Car following behaviors @@ -298,7 +298,7 @@ def run_step(self, debug=False): self._vehicle.bounding_box.extent.y, self._vehicle.bounding_box.extent.x) # Emergency brake if the car is very close. - if distance < self.config.distance.braking_distance: + if distance < self.config.distance.emergency_braking_distance: return self.emergency_stop() else: control = self.car_following_manager(vehicle, distance)