Skip to content

Instantly share code, notes, and snippets.

@xaxxontech
Last active July 8, 2016 18:05
Show Gist options
  • Save xaxxontech/a7a66a45c146e84ef43066790673a015 to your computer and use it in GitHub Desktop.
Save xaxxontech/a7a66a45c146e84ef43066790673a015 to your computer and use it in GitHub Desktop.
#!/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