diff --git a/PythonAPI/carla/agents/conf/agent_settings_backend.py b/PythonAPI/carla/agents/conf/agent_settings_backend.py index ff582109566..a6d644c8221 100644 --- a/PythonAPI/carla/agents/conf/agent_settings_backend.py +++ b/PythonAPI/carla/agents/conf/agent_settings_backend.py @@ -260,10 +260,12 @@ class BasicAgentDistanceSettings(AgentConfig): @dataclass class BehaviorAgentDistanceSettings(BasicAgentDistanceSettings): """ - Collision Avoidance ----- + Collision Avoidance + ------------------- - Distance in which for vehicles are checked: - usage: max_distance = max(min_proximity_threshold, self._speed_limit / (2 if else 3 ) ) + Distance in which for vehicles are checked. + + Usage: max_distance = max(min_proximity_threshold, self._speed_limit / (2 if else 3 ) ) """ min_proximity_threshold : float = 10 @@ -580,6 +582,8 @@ class BehaviorAgentEmergencySettings(BasicAgentEmergencySettings): pass +# --------------------- +# Final Settings # --------------------- @dataclass @@ -625,7 +629,7 @@ class AutopilotBehavior(AgentConfig): The distance is in meters and will affect the minimum moving distance. It is computed from front to back of the vehicle objects. """ - vehicle_percentage_speed_difference : float = 30 + vehicle_percentage_speed_difference : float = 30 # in percent """ Sets the difference the vehicle's intended speed and its current speed limit. Speed limits can be exceeded by setting the percentage to a negative value. @@ -641,14 +645,8 @@ class AutopilotBehavior(AgentConfig): update_vehicle_lights : bool = False """Sets if the Traffic Manager is responsible of updating the vehicle lights, or not.""" - - -# --------------------- -# Final Settings -# --------------------- - @dataclass class BasicAgentSettings(AgentConfig): overwrites : Optional[Dict[str, dict]] = field(default_factory=dict, repr=False) # type: Optional[Dict[str, Union[dict|AgentConfig]]] @@ -661,6 +659,7 @@ class BasicAgentSettings(AgentConfig): planner : BasicAgentPlannerSettings = field(default_factory=BasicAgentPlannerSettings, init=False) emergency : BasicAgentEmergencySettings = field(default_factory=BasicAgentEmergencySettings, init=False) + @dataclass class BehaviorAgentSettings(AgentConfig): overwrites : Optional[Dict[str, dict]] = field(default_factory=dict, repr=False) # type: Optional[Dict[str, Union[dict|AgentConfig]]] @@ -673,7 +672,7 @@ class BehaviorAgentSettings(AgentConfig): planner : BehaviorAgentPlannerSettings = field(default_factory=BehaviorAgentPlannerSettings, init=False) emergency : BehaviorAgentEmergencySettings = field(default_factory=BehaviorAgentEmergencySettings, init=False) avoid_tailgators : bool = True - + @dataclass class SimpleBasicAgentSettings(SimpleConfig, LiveInfo, BasicAgentSpeedSettings, BasicAgentDistanceSettings, BasicAgentLaneChangeSettings, BasicAgentObstacleSettings, BasicAgentControllerSettings, BasicAgentPlannerSettings, BasicAgentEmergencySettings): _base_settings :ClassVar[BasicAgentSettings] = BasicAgentSettings