• 大小: 71KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-11
  • 语言: 其他
  • 标签: htc  vive  openvr  

资源简介

openvr for htc vive,主要用于HTC VR设备HTC vive Tracker的二次开发使用

资源截图

代码片段和文件信息

import triad_openvr
import time
import sys

v = triad_openvr.triad_openvr()
v.print_discovered_objects()

if len(sys.argv) == 1:
    interval = 1/250
elif len(sys.argv) == 2:
    interval = 1/float(sys.argv[0])
else:
    print(“Invalid number of arguments“)
    interval = False
    
if interval:
    while(True):
        start = time.time()
        txt = ““
        for each in v.devices[“controller_1“].get_pose_euler():
            txt += “%.4f“ % each
            txt += “ “
        print(“\r“ + txt end=““)
        sleep_time = interval-(time.time()-start)
        if sleep_time>0:
            time.sleep(sleep_time)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-10 15:51  triad_openvr-master\
     文件         643  2018-05-16 03:19  triad_openvr-master\README.md
     目录           0  2018-09-10 15:51  triad_openvr-master\__pycache__\
     文件        7189  2018-05-16 03:19  triad_openvr-master\__pycache__\triad_openvr.cpython-35.pyc
     文件         622  2018-05-16 03:19  triad_openvr-master\controller_test.py
     文件        3105  2018-05-16 03:19  triad_openvr-master\example_default.vrsettings
     目录           0  2018-09-10 15:51  triad_openvr-master\images\
     文件       64656  2018-05-16 03:19  triad_openvr-master\images\simple_xcoord_plot.png
     文件         619  2018-05-16 03:19  triad_openvr-master\tracker_test.py
     文件        7744  2018-05-16 03:19  triad_openvr-master\triad_openvr.py
     文件         763  2018-05-16 03:19  triad_openvr-master\udp_emitter.py
     文件        1664  2018-05-16 03:19  triad_openvr-master\udp_receiver.cs

评论

共有 条评论