Skip to content

Commit

Permalink
Fix quickstart keys commands (facebookresearch#147)
Browse files Browse the repository at this point in the history
* Fix quickstart
  • Loading branch information
erikwijmans authored and mathfac committed Jun 29, 2019
1 parent 38be0f5 commit 43ab724
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/tutorials/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def example():
keystroke = cv2.waitKey(0)

if keystroke == ord(FORWARD_KEY):
action = 0
action = habitat.SimulatorActions.MOVE_FORWARD
print("action: FORWARD")
elif keystroke == ord(LEFT_KEY):
action = 1
action = habitat.SimulatorActions.TURN_LEFT
print("action: LEFT")
elif keystroke == ord(RIGHT_KEY):
action = 2
action = habitat.SimulatorActions.TURN_RIGHT
print("action: RIGHT")
elif keystroke == ord(FINISH):
action = 3
action = habitat.SimulatorActions.STOP
print("action: FINISH")
else:
print("INVALID KEY")
Expand All @@ -74,7 +74,7 @@ def example():

print("Episode finished after {} steps.".format(count_steps))

if action == 3 and observations["pointgoal"][0] < 0.2:
if action == habitat.SimulatorActions.STOP and observations["pointgoal"][0] < 0.2:
print("you successfully navigated to destination point")
else:
print("your navigation was unsuccessful")
Expand Down

0 comments on commit 43ab724

Please sign in to comment.