Directly read orientation and position data from the VIVE Ultimate Tracker using Python.
推荐:ubuntu 22.04和windows,这里以Ubuntu 22.04为例
ATTENTION: 在ubuntu 20.04中,无法在后续步骤中打开steamVR进行配对(不支持图形化界面),所以在第一次使用时推荐ubuntu 22.04或windows系统,具体详见steamVR部分内容
sudo apt update
sudo apt upgrade
可以在本代码仓中直接找到steam.deb文件并进行下载
sudo dpkg -i steam.deb
第一次点击Start Steam会进入安装终端,此时要分别按大概3-4次enter进行安装,安装好后会自动升级系统
更新根据网络情况而定,推荐网络有线连接
如果安装时出现下图报错,需要先补充安装curl。
sudo apt install curl
启动Steam可能会出下如下报错。
在启动steam时,请在自动打开的terminal中根据指引安装所需的package。
推荐:ubuntu 22.04和windows,这里以Ubuntu 22.04为例
ATTENTION: 在ubuntu 20.04中,无法打开steamVR进行配对(不支持图形化界面),因此建议在第一次配对时使用windows或ubuntu 22.04 系统进行配对,而后再切入ubuntu 20.04系统进行使用。切入系统使用前仍然需要安装steamVR修改config文件,因为openvr的驱动依赖于steamvr,具体修改步骤详见下方内容
在仓库中搜索steamvr,安装SteamVR时也会自动安装 Linux Runtime 3.0。
![]()
this step only occurs in ubuntu system
需要按图所示连接
按图所示方式连接一次后则不需要,之后直接将蓝牙适配器拔下来插入PC USB口即可
sudo vim ~/.steam/steam/steamapps/common/SteamVR/drivers/null/resources/settings/default.vrsettings
Open the null driver file and replace "enable": false, with "enable": true,
{
"driver_null": {
"enable": true,
"loadPriority": -999,
"serialNumber": "Null Serial Number",
"modelNumber": "Null Model Number",
"windowX": 0,
"windowY": 0,
"windowWidth": 2160,
"windowHeight": 1200,
"renderWidth": 1512,
"renderHeight": 1680,
"secondsFromVsyncToPhotons": 0.01111111,
"displayFrequency": 90.0
}
}
sudo vim ~/.steam/steam/steamapps/common/SteamVR/resources/settings/default.vrsettings
"requireHmd": true, to"requireHmd": false,"forcedDriver": "", to"forcedDriver": "null","activateMultipleDrivers": false, to"activateMultipleDrivers": true,
after installing steam and steamVR
对比ubuntu 路径steamapps/common/SteamVR/resources/settings/default.vrsettings打开对应的文件,修改方式和上面Ubuntu一样
启动steamVR,steamVR可以启动VIVE的驱动。确保VR headset, 定位器基站和tracker都连接
after pair successfully, it will show the picture below
pip install openvr numpy matplotlib collections mpl_toolkits.mplot3d pip install openvr numpy matplotlib collections mpl_toolkits.mplot3d win_precise_timeVIVE Tracker (3.0) uses the “Right-handed coordinate system”.
- Datum A is set to be the top surface of the ring feature around the 1/4” Screw Nut.
基准面A:围绕 1/4 英寸螺纹螺母的环形特征上表面。
- Datum B is set to be the intersection point between the centerline of Standard Camera Mount (1/4” Screw Bolt) and Datum A.
基准点B:标准相机支架(1/4 英寸螺钉)中心线与基准面A的交点。
- Datum C is set to be the intersection point between the centerline of Stabilizing Pin Recess and Datum A.
基准点C:稳定销凹槽中心线与基准面A的交点。
- The coordinate system is constructed by the Datum frame of Datum A, the line of Datum B and Datum C, and Datum C itself.
该坐标系由基准面A、基准点B与C的连线以及基准点C共同构建而成。
python tracker.pyaftern running this program, if you want your tracking data to be:
- a. output
6 dof poseto terminal - b. live plotted in a
3Dplot (might impact system performance) - c. live plotted in a
time/XYZplot - d. saved in a
.csvfile
output
Tracker 0: [-0.05243462324142456, -0.14969228208065033, -1.3739923238754272, 0.6392734003249869, 0.6136829491089955, 0.3124104099660625, -0.3422316009644308]
Tracker 0: [-0.0515730194747448, -0.1505933701992035, -1.3816518783569336, 0.6393158619547124, 0.613702487691718, 0.3123262788311258, -0.34219402222760714]
Tracker 0: [-0.05071805790066719, -0.15148380398750305, -1.3892226219177246, 0.639357912173423, 0.6137095767419568, 0.3122797935863463, -0.34214521644610874]
python tracker_calib.py
启动之后,先沿着Z轴做往复运动,再沿着X轴做往复运动, 注意: 运动方向一定要和机械臂坐标系一致
after executing this step, the program will save calibration.npz file as a result of calibration
python two_tracker.py