MCPcopy Create free account
hub / github.com/Gabesarch/ICAL / close

Method close

TEACh/models/agent/api_primitives_executable.py:390–413  ·  view source on GitHub ↗

Closes the interaction object. Note: Assumes object is open and agent is at its location. Objects like fridges, cabinets, drawers can be closed. Returns: bool: True if action successful, otherwise False.

(self)

Source from the content-addressed store, hash-verified

388 return self.execute_manipulation("Open")
389
390 def close(self) -> None:
391 """
392 Closes the interaction object.
393
394 Note:
395 Assumes object is open and agent is at its location.
396 Objects like fridges, cabinets, drawers can be closed.
397
398 Returns:
399 bool: True if action successful, otherwise False.
400 """
401 if self.object_id is None:
402 self.agent.step_success = False
403 return False
404 if self.object_class not in self.agent.OPENABLE_OBJECTS:
405 self.agent.step_success = False
406 return False
407 if self.check_attribute("open", False):
408 # pre-condition check: already closed?
409 return True
410 if not self.agent.navigate_obj_info["obj_ID"]==self.object_id:
411 # pre-condition: make sure looking at object
412 self.go_to()
413 return self.execute_manipulation("Close")
414
415 def put_down(self) -> None:
416 """

Callers 3

toggle_onMethod · 0.95
readMethod · 0.45
readMethod · 0.45

Calls 3

check_attributeMethod · 0.95
go_toMethod · 0.95
execute_manipulationMethod · 0.95

Tested by

no test coverage detected