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

Method put_down

TEACh/models/agent/api_primitives_executable.py:415–439  ·  view source on GitHub ↗

Puts down the object in hand on a nearby receptacle. Note: Assumes object is in hand and agent wants to free its hand. Returns: bool: True if action successful, otherwise False.

(self)

Source from the content-addressed store, hash-verified

413 return self.execute_manipulation("Close")
414
415 def put_down(self) -> None:
416 """
417 Puts down the object in hand on a nearby receptacle.
418
419 Note:
420 Assumes object is in hand and agent wants to free its hand.
421
422 Returns:
423 bool: True if action successful, otherwise False.
424 """
425 if self.object_id is None:
426 self.agent.step_success = False
427 return False
428 if self.object_class not in self.agent.PICKUPABLE_OBJECTS:
429 self.agent.step_success = False
430 return False
431 id_holding = self.agent.object_tracker.get_ID_of_holding()
432 if id_holding is None:
433 return True
434 success = self.agent.put_down()
435 if success:
436 self.agent.object_tracker.objects_track_dict[id_holding]["holding"] = False
437 if args.use_gt_attributes and args.online_skill_learning:
438 self.agent.track_dict_before = copy.deepcopy(self.agent.object_tracker.objects_track_dict)
439 return success
440
441 def pour(self, landmark_name) -> None:
442 """

Callers 1

pickupMethod · 0.95

Calls 1

get_ID_of_holdingMethod · 0.80

Tested by

no test coverage detected