Skip to content

Commit

Permalink
Start bubble condition integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamenot committed May 18, 2023
1 parent 6921311 commit a71306c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions smarts/core/bubble_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def safe_min(a, b):
self._limit = bubble_limit
self._cached_inner_geometry = geometry
self._exclusion_prefixes = bubble.exclusion_prefixes
self._condition = bubble.condition

self._cached_airlock_geometry = self._cached_inner_geometry.buffer(
bubble.margin,
Expand Down
3 changes: 3 additions & 0 deletions smarts/sstudio/types/bubble.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
from typing import Optional, Tuple

from smarts.core import gen_id
from smarts.core.condition_state import ConditionState
from smarts.core.utils.id import SocialAgentId
from smarts.sstudio.types.actor.social_agent_actor import (
BoidAgentActor,
SocialAgentActor,
)
from smarts.sstudio.types.bubble_limits import BubbleLimits
from smarts.sstudio.types.condition import Condition, LiteralCondition
from smarts.sstudio.types.zone import MapZone, Zone


Expand Down Expand Up @@ -71,6 +73,7 @@ class Bubble:
which means it moves to follow the `follow_vehicle_id`'s vehicle. Offset is from the
vehicle's center position to the bubble's center position.
"""
condition: Condition = LiteralCondition(ConditionState.TRUE)

def __post_init__(self):
if self.margin < 0:
Expand Down

0 comments on commit a71306c

Please sign in to comment.