Skip to content

Commit

Permalink
Merge pull request #770 from allenai/moveHand
Browse files Browse the repository at this point in the history
Move hand
  • Loading branch information
mattdeitke authored Jun 24, 2021
2 parents 35d7922 + a7e9e9d commit edc4c37
Show file tree
Hide file tree
Showing 7 changed files with 810 additions and 683 deletions.
7 changes: 7 additions & 0 deletions ai2thor/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ def __getitem__(self, x):
+ "calling controller.step(action='GetReachablePositions'). Also, "
+ "the key 'reachablePositions' is deprecated in favor of event.metadata['actionReturn']."
)
elif x == "hand":
if "hand" not in self:
# maintains sideways compatibility
warnings.warn(
'The key event.metadata["hand"] is deprecated and has been remapped to event.metadata["heldObjectPose"].'
)
x = "heldObjectPose"
return super().__getitem__(x)


Expand Down
4 changes: 2 additions & 2 deletions ai2thor/tests/data/arm-metadata-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
"rotation"
]
},
"hand": {
"heldObjectPose": {
"type": "object",
"properties": {
"position": {
Expand Down Expand Up @@ -716,7 +716,7 @@
"errorMessage",
"flatSurfacesOnGrid",
"fov",
"hand",
"heldObjectPose",
"inventoryObjects",
"isOpenableGrid",
"isSceneAtRest",
Expand Down
Loading

0 comments on commit edc4c37

Please sign in to comment.