Skip to content

Commit

Permalink
インストール時のパスチェックを強化
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsnmeajp committed Jun 14, 2021
1 parent 33d3d66 commit 2c0d419
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 62 deletions.
69 changes: 7 additions & 62 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,17 @@
# VMT - Virtual Motion Tracker
The OSC Virtual OpenVR Tracker Driver for your DIY tracking devices.
Very easy, simple, and robust.
## [Official page and Manual / 公式ページ & 説明書](https://gpsnmeajp.github.io/VirtualMotionTrackerDocument/)

シンプルなOpenVR 仮想トラッカードライバです。
OSCで姿勢(座標や回転)を受け取り、仮想的なトラッカーとしてSteamVR上で利用することができます。

今まで難易度の高かったVRトラッキングデバイスの自作を、UnityでGameObjectにアタッチする程度の簡単な処理で行うことができるようになります。
OpenVRのサンプルと仕様に沿った作りになっており、他のドライバのようにSteamVRのアップデートの度にクラッシュすることは起きにくい作りになっています。
An easy-to-use virtual tracker driver for OpenVR. With your own device, your own software, and any.
You can send pose (position and rotation) with OSC Protocol and use it as a virtual tracker on SteamVR.

# [Download / ダウンロード](https://github.com/gpsnmeajp/VirtualMotionTracker/releases)
# [Manual & sample(English)](docs/note_en.md)
# [説明書・サンプル(日本語)](docs/note.md)
Creating your own OpenVR tracking device was difficult and required a high degree of technical work.
However, from now on, by using VMT, it will be possible to do it in a simple way like attaching to a GameObject in Unity.

**本ソフトウェアは、自分で問題を解決できる人向け(上級者向け)です。**
**入れただけで何かができるツールではなく、他のアプリケーションやデバイスと組み合わせて使用します。**
**This software for developers. (not for end user)**

**64bit Windows 10環境でのみ動作します。**
**Only works on 64bit Windows 10**
自作デバイス、自作のソフトウェアで、簡単に使える OpenVR 仮想トラッカードライバです。OSCで姿勢(座標や回転)を受け取り、仮想的なトラッカーとしてSteamVR上で利用することができます。

**Steam VRがHMDを認識していない場合、利用できません。(HMD未接続、Oculus Link起動前など)**
**It should not work when you are not connect HMD. (Ex. disconnected, not started Oculus Link)**

VMT_005までにあった"起動しない"などのトラブルに関しては、VMT_006を使用するとエラーメッセージが表示されます。
If you have trouble for VMT 005 such as not starting, use VMT 006 or after will shows error message.

認識しないソフトがある場合、以下を確認してください。
+ VMT_009以降を使用しているか
+ [SteamVRトラッカーロールの設定](docs/howto.md)
+ [SteamVRバインディングの割当](docs/binding.md)
+ C:\Program Files (x86)\Steam\config\steamvr.vrsettings からVMT周りの設定を削除してみる(必ずバックアップを取ってください)

Please check below if you meet software won't recognize VMT.
+ Use after version of VMT_009
+ [SteamVR Tracker Role](docs/note_en.md)
+ [SteamVR binding (Pose)](docs/binding.md)
+ Try remove VMT setting on C:\Program Files (x86)\Steam\config\steamvr.vrsettings (You must backup before change it.)

# サポートは閉鎖しました。(Support desk has been closed.)
説明書を読んで理解できない場合は、使用されないことを勧めします。
Please don't use if you can not understand manual.

コードレベル以外のIssueは返答無くCloseすることがあります。
Issues other than code level may be closed without a response.

明らかな不具合や異常挙動に関しては、詳細を添えてIssueを立ててください。

# 他のソフトウェアに同梱されたVMTを使っている人へ (To VMT users bundled with other software)
このソフトは、無料、無保証で、使い方がわかる開発者に向けて作成しています。
各ソフトウェアとの組み合わせで発生したトラブルは、各作者にサポートの依頼をしてください。
This software is free, non-warranty, and designed for developers who know how to use it.
For troubles that occur in combination with each software, ask each author for support.

<img src="https://github.com/gpsnmeajp/VirtualMotionTracker/blob/master/docs/vmt_vr.png?raw=true"></img>
<img src="https://github.com/gpsnmeajp/VirtualMotionTracker/blob/master/docs/screen0.png?raw=true"></img>
<img src="https://github.com/gpsnmeajp/VirtualMotionTracker/blob/master/docs/Architecture.png?raw=true"></img>
これまで、独自のOpenVRトラッキングデバイスを作成するということは難しい作業であり、高度な技術的作業が必要でした。しかし、これからはVMTを用いることで、UnityでGameObjectにアタッチするような簡単な方法で行うことができるようになります。

# Licence
MIT Licence

Logo text font: M+ Fonts https://mplus-fonts.osdn.jp/about2.html

# Keyword
Virtual Motion Tracker
バーチャルモーショントラッカー
OpenVR 仮想トラッカー
OSCトラッカー
ばもとら

# 苦労話
[Virtual Motion Trackerを作ったときのノウハウ](https://qiita.com/gpsnmeajp/items/9c41654e6c89c6b9702f)
33 changes: 33 additions & 0 deletions vmt_manager/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,39 @@ private void InstallButton(object sender, RoutedEventArgs e)
Console.WriteLine(OpenVR.RuntimePath() + @"\bin\win64");
Console.WriteLine(driverPath);

if (driverPath.Length > 100)
{
MessageBox.Show("Path length over 100. it couldn't install.\nパスの長さが100を超えています。インストールできません。\n\n" + driverPath, title, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

if (driverPath.Contains("Program Files"))
{
MessageBox.Show("Path contains \"Program Files\". it couldn't install.\nパスに\"Program Files\"が入っています。インストールできません。\n\n" + driverPath, title, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

if (driverPath.Contains(" ")) {
MessageBox.Show("Path contains space. it couldn't install.\nパスにスペースが入っています。インストールできません。\n\n"+driverPath, title, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

if (!File.Exists(driverPath+ @"\bin\win64\driver_vmt.dll"))
{
MessageBox.Show("driver_vmt.dll not found. Do not break apart files. it couldn't install.\ndriver_vmt.dllが見つかりませんでした。ファイル構成をバラバラにしないでください。。インストールできません。\n\n" + driverPath, title, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

Encoding enc = Encoding.GetEncoding("us-ascii", new EncoderExceptionFallback(), new DecoderExceptionFallback());
try
{
enc.GetBytes(driverPath);
}
catch (EncoderFallbackException) {
MessageBox.Show("Path contains non-ascii (Japanese, Chinese, emoji, or other). it couldn't install.\nパスに非ASCII文字(日本語、中国語、絵文字、その他)が入っています。インストールできません。\n\n" + driverPath, title, MessageBoxButton.OK, MessageBoxImage.Error);
return;
}

System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.WorkingDirectory = OpenVR.RuntimePath() + @"\bin\win64";
process.StartInfo.FileName = OpenVR.RuntimePath() + @"\bin\win64\vrpathreg.exe";
Expand Down

0 comments on commit 2c0d419

Please sign in to comment.