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 | |
oculusprimesocket.reconnect = True | |
oculusprimesocket.connect() | |
while True: # loop forever | |
# wait for non-null streamactivity state value |
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 re, time | |
import oculusprimesocket | |
oculusprimesocket.connect() | |
oculusprimesocket.sendString("publish camera") | |
time.sleep(4) # wait for camera stream to start up | |
oculusprimesocket.sendString("getlightlevel") | |
result = oculusprimesocket.waitForReplySearch("<state> lightlevel") |
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 | |
""" | |
ROS node to determine frame rate of openni depth camera | |
start camera 1st with: | |
roslaunch openni2_launch openni2.launch | |
""" | |
import time | |
import rospy |
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 time | |
import rospy | |
from sensor_msgs.msg import CameraInfo | |
""" | |
ROS node to read timestamp of openni depth camera frame | |
subtract raw_image header timestamp from system time | |
start camera 1st with: |
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 time, oculusprimesocket | |
oculusprimesocket.reconnect = True | |
oculusprimesocket.connect() | |
while True: # loop forever | |
# wait for docked |
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
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
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 time, datetime, oculusprimesocket | |
# connect to server app, keep trying if not running yet | |
oculusprimesocket.reconnect = True | |
oculusprimesocket.connect() | |
while True: |
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 | |
oculusprimesocket.connect() | |
oculusprimesocket.sendString("gotowaypoint some waypoint") | |
# when waypoint reached, state var roscurrentgoal is deleted by remote_nav node: | |
oculusprimesocket.waitForReplySearch("<state> deleted: roscurrentgoal") | |
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 |
OlderNewer