Skip to content

Commit d6648cc

Browse files
erez-tomcopybara-github
authored andcommitted
Expose sites as properties.
PiperOrigin-RevId: 439496980 Change-Id: Ide941b547da85dc691001d0992f83df1f812c0d6
1 parent 434496b commit d6648cc

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

dm_control/entities/props/position_detector.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ def __init__(self, entity, detected=False):
4040

4141

4242
class PositionDetector(composer.Entity):
43-
"""Detects the presence of registered entities within a cuboidal region.
43+
"""Detects the presence of registered entities within an axis-aligned box.
4444
45+
The volume of this detector is defined by a "lower" corner and an "upper"
46+
corner, which suffice to define an axis-aligned box.
4547
An entity is considered "detected" if the `xpos` value of any one of its geom
4648
lies within the active region defined by this detector. Note that this is NOT
4749
a contact-based detector. Generally speaking, a geom will not be detected
@@ -266,6 +268,18 @@ def lower(self):
266268
def mid(self):
267269
return (self._lower + self._upper) / 2.
268270

271+
@property
272+
def lower_site(self):
273+
return self._lower_site
274+
275+
@property
276+
def mid_site(self):
277+
return self._mid_site
278+
279+
@property
280+
def upper_site(self):
281+
return self._upper_site
282+
269283
@property
270284
def lower_sensor(self):
271285
return self._lower_sensor

0 commit comments

Comments
 (0)