Skip to content

Commit

Permalink
doc and layout update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daraan committed Apr 16, 2024
1 parent fbb60c8 commit 1be285b
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions PythonAPI/carla/agents/conf/agent_settings_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <LANE CHANGE> else 3 ) )
Distance in which for vehicles are checked.
Usage: max_distance = max(min_proximity_threshold, self._speed_limit / (2 if <LANE CHANGE> else 3 ) )
"""

min_proximity_threshold : float = 10
Expand Down Expand Up @@ -580,6 +582,8 @@ class BehaviorAgentEmergencySettings(BasicAgentEmergencySettings):
pass


# ---------------------
# Final Settings
# ---------------------

@dataclass
Expand Down Expand Up @@ -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.
Expand All @@ -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]]]
Expand All @@ -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]]]
Expand All @@ -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
Expand Down

0 comments on commit 1be285b

Please sign in to comment.