Last active
July 8, 2016 18:05
-
-
Save xaxxontech/a7a66a45c146e84ef43066790673a015 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import oculusprimesocket | |
import time | |
oculusprimesocket.connect() | |
# define waypoint names in loop | |
waypoints = ["waypoint1", "waypoint2", "waypoint3", "waypoint4"] | |
i=0 | |
while True: | |
print "setting waypoint: "+waypoints[i] | |
oculusprimesocket.sendString("gotowaypoint "+waypoints[i]) | |
# wait to reach waypoint: | |
oculusprimesocket.waitForReplySearch("<state> deleted: roscurrentgoal") | |
time.sleep(1) | |
i += 1 | |
if i >= len(waypoints): | |
i=0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment