Skip to content
Snippets Groups Projects
Commit 43ab7241 authored by Erik Wijmans's avatar Erik Wijmans Committed by Oleksandr
Browse files

Fix quickstart keys commands (#147)

* Fix quickstart
parent 38be0f53
No related branches found
No related tags found
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment