From 43ab7241610804dc971344fa4b7d2b674b6f7045 Mon Sep 17 00:00:00 2001 From: Erik Wijmans <etw@gatech.edu> Date: Sat, 29 Jun 2019 14:46:31 -0700 Subject: [PATCH] Fix quickstart keys commands (#147) * Fix quickstart --- docs/source/tutorials/quickstart.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/tutorials/quickstart.md b/docs/source/tutorials/quickstart.md index 492f2dc3f..95c65f48b 100644 --- a/docs/source/tutorials/quickstart.md +++ b/docs/source/tutorials/quickstart.md @@ -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") @@ -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") -- GitLab