Sensable社が開発した安価な力覚提示デバイス.
反力が得られる3次元マウスみたいなもの.
詳細な仕様:PHANTOM OMNI - Sensable : http://www.sensable.com/haptic-phantom-omni.htm
以前は40万円程したが,最近は時期によっては20万円弱で購入可能.
国内代理店が数社ある.私は日本バイナリー様から買うことが多い.
以前は本体色が白かったが,最近は灰色になった.白色と灰色で機能的な違いは特にない.ケンジントンロック用の穴が付いたくらい?
結構,速いマシンが必要.低スペックの場合,激しく振動したり,良い触感が得られない場合がある.
今回は以下のPCを用いました.
PC:DELL OptiPlex 745
OS:Windows7 64bit
CPU:Intel Core2Duo 6700 2.6GHz
メモリ:4GB
1394ボード:Buffalo IFC-ILP4
PC本体付属の1394ポートは不安定な場合が多いので,別途ボードを用意したほうが良いと思う.
PCIカードタイプ(Low ProfileでもOK):Buffalo IFC-ILP4
PCI Expressタイプ:SUNIX FWB3414G
Cardbusタイプ:RATOC REX-CFW3H
Cardbusタイプ:IODATA CB1394L
ExpressCard/34/54:玄人志向 1394a2-EC34
Phantom Omniは自ら電源を持つため,1394カード側から電源供給する必要は無い.(なので,4ピンケーブルで接続しても問題は無いはず.やったこと無いけど.)
今回は Microsoft Visual Studio 2008 を用いる.
Visual StudioのExpress系はコンパイラの性能があまり良くないので使わない方が無難.
C++とC#をインストールする.C++だけだとcl.exeがインストールされず,OpenHaptics Toolkitのコンパイルが出来ないので注意.
Sensable Downloads - Sensable : http://www.sensable.com/support-downloads.htm の PHANTOM Device Drivers をクリック.
シリアル番号は,Phantom Omni本体の下面に貼ってある.
現時点では,PDD_32and64-bit_4.2.131.zip が最新のようなので,これをダウンロードした.
SensAble Developer Support Center(DSC)に登録し,OpenHaptics Toolkitを取得する.
DSC: Registration : http://dsc.sensable.com/register_ohae.asp で必要な情報を入力して,登録.
しばらくするとパスワードがメールで送られてくる.
Welcome to the Sensable Developer Support Center : http://dsc.sensable.com/index.aspからログインして,
アカデミックユースの場合,OpenHaptics™ Academic Edition for Microsoft® Windows® →Software Downloads→Download OpenHaptics Academic Edition for Windows - v2.0 をクリックして,OHAE_Windows_v2.zip をダウンロードする.
最新のOpenHapticsはversion 3系だが,まだ私自身が追いつけてないので今回はversion 2系を使う.
必要に応じてインストールしておく.
IFC-ILP4の場合はWindows標準のドライバで動作するので別途インストールは不要.
PDD_32and64-bit_4.2.131.zip を展開
もし古いPDDが既にインストールされている場合は,先にアンインストールしておくこと.
SensAble_PDD_4.2.131_Install.exe をShift+右クリック,管理者として実行をクリック.
後は適当に.
PHANTOM Configurationの画面が出てきたら,OKをクリックして閉じる.
PCを再起動する.
PhantomOmni本体に電源をつなぎ,1394ケーブルでPCと接続.
2台目のPhantomOmniを使う場合は直接PCには繋がずに,1台目のデバイスの背面に繋ぐが,まずとにかく先に1台目の登録を終わらせること.
しばらくすると,デバイスドライバが読み込まれる.
デバイスマネージャーで確認.
デスクトップにあるPHANTOM Configurationを起動する.(本体は,C:\Windows\system32\PHANToM Configuration.cpl)
Hardwareタブ内の
PAHTOM:Default PHANToM (もし適当な名前を付けたい場合は,Addをクリックして指定する.この名前は,後のプログラミングで必要になる.)
PHANTOM model:Omni
Serial number:接続したものと一致しているかを確認.
OKをクリック.
Phantom Omniのスタイラスをデフォルトポジション(穴(ink well)に挿した状態)にする.
デスクトップにあるPHANTOM Testを起動.(本体は,C:\Program Files\SensAble\PHANTOM Device Drivers\PHANToM Test.exe)
Default PHANToMを選択(複数台ある場合は,適宜選択)
スタイラスを動かして,CGが同じように動くかを確認.
スタイラスをデフォルトポジションに戻す.
右下のNextをクリック
キャリブレートする.複数台使用の際は特に重要.
このような画面になった場合はキャリブレートに失敗している.ink wellへの挿し方が悪く,再度正しく挿し直すと解決することが多い.また複数台ある場合は,別のデバイスを先にキャリブレートすれば解決することが多い.
下図がOKの画面.右下のNextをクリック
スタイラスを動かしたり,スタイラスのボタンを押してみたりして,動作確認
問題なければ,右下のNextをクリック
何なのかよくわからない.モータの電源チェック?(AmplifiersのON,OFFに応じて穴が青く点滅する)
Device Falut: No であれば恐らく問題ない.
問題なければ,右下のNextをクリック
X,Y,Zのスライドバーを動かすと,スタイラスに力が掛かる.
Xは左右,Yは上下,Zは奥手前方向.
問題なければ,右下のNextをクリック
一辺10cmほどの立方体の内部を触れることができる.
力を掛けすぎると突き抜ける.
問題なければ,右下のNextをクリックして終了.
OHAE_Windows_v2.zip を展開
OpenHaptics Academic Edition → setup.exeを実行
適当に
使用開始時には,必ずすべてのPhantomのキャリブレーションを行うこと.
スタイラスをink wellから外す際は,ボタン部分を上にしてそっと抜くこと.
スタイラスはボタン側を上にして鉛筆を持つような感じで握り,人差し指でボタンが押せる状態を常に保つこと.
スタイラスのヨー軸方向の回転には限界がある.無理に回そうとするとプラスチックのロックが折れてしまうのでくれぐれも注意すること.
スタイラスの持ち手部分は取り外し可能であるが,外す際には関節部分に無理な力が掛からないように十分に注意せよ.
取り外した持ち手部分を元に戻す際は,切り欠きを合わせて嵌めること.この際にも関節部分に無理な力が掛からないように注意すること.
Phantom Omniを使わない場合には,スタイラスをink wellから外し,机に横置きしておくこと.スタイラスをink wellに挿したままにすると,不意に引っ掛けて壊すことがある.
使い終ったら,PCの電源を落とした後でPhantomOmniの電源を抜いておく.
C:\Program Files (x86)\SensAble\3DTouch\examples\bin\HL にあるexeを実行してみる.
プログラムの説明は,C:\Program Files (x86)\SensAble\3DTouch\doc\OpenHaptics_Examples.htmに書いてある.
Constraints
Shows how to use the constraint touch mode to create objects that the haptic device sticks to. Renders an OpenGL scene including lines, points, a tessellated NURB surface, and a stroked font(all as constraints).
スタイラスの動きを制約するオブジェクト(線,点,曲面,文字)の生成する方法.
Events
Shows how to use event callbacks to be notified when objects are touched, when the haptic device moves, and when the buttons on the haptic device are pressed. This sample also shows how to use calibration events to properly calibrate the haptic device.
オブジェクトに触れたり,スタイラスを動かしたり,ボタンを押したりした際に発生するイベントコールバックの使い方.
デバイスを適切にキャリブレーションするためのキャリブレーションイベントの使い方.
HapticMaterials
Shows a user interface implemented with GLUI that allows you to set the material properties of objects in a simple scene. It also shows how to use the haptic mouse utility library to use the haptic device as a 2D mouse.
GLUIで実装されたユーザインタフェースのサンプル
haptic mouse utility ライブラリの使い方
This example is a file viewer that can read and render triangle meshes stored in .obj files. Also shows how to more optimally render large triangle meshes both graphically and haptically using a spatial partition. A number of options are available to the user to compare performance of the various HLAPI shape rendering tools.
三角メッシュで構成されるobj形式のファイルを読み込んで表示するサンプル
HelloHaptics
Introductory example that shows basic integration of haptics into a very simple OpenGL program. This example renders a white rectangle on a black background. By adding a few extra lines of HLAPI code, you can also feel the rectangle.
触覚とOpenGLを融合させた,とてもシンプルなサンプルプログラム.
黒い背景の上に白い四角が表示される.
HLAPIを使えば,数行のコードでこのような触覚を提示できる.
HelloSphere
Takes the HelloHaptics example a few steps further by replacing the rectangle with a sphere and adding a 3D cursor that follows the position of the haptic device.
HelloHapticsより少し複雑なサンプルプログラム
四角の代わりに球体が表示され,スタイラスの位置を示す3Dカーソルも追加されている.
Shows how to use two haptic devices by extending the HelloSphere program to add a second haptic device. (requires two haptic devices)
HelloSphereを少し改造して,2台のデバイスを使うようにしたサンプル.
2台のデバイスを接続していないか,名前が間違っていると動作しないので注意.
"PHANToM 1","PHANToM 2"という名前で2台のデバイスを登録すると問題なく動作する.
PointManipulation
Shows how to snap to 3D points and then manipulate them in 3D. Snaping is implemented using a depth independent technique, which allows the user to select a point independent of depth in the view. In addition, this example demonstrates how to initiate 3D manipulation in a depth independent manner, such that a point is moved relative to position where the haptic device button is clicked. This example is very similar to the PointManipulation example from HDAPI, but demonstrates how to use HLAPI instead for easier constraint rendering and event handling.
3D空間に浮かんた吸着する点を掴んで操作するサンプル.
吸着効果はビューの奥行きとは無関係に発生するように実装されている.
さらに,...
このサンプルはHDAPIのPointManipulationとよく似ているが, HLAPIを使うことで,より簡単に拘束やイベントハンドリングの実装できることが分かる.
ShapeManipulation
Shows using constraints to allow precise manipulation of objects with the haptic device. This example also shows how to track the changes in position and orientation of the haptic device and how to apply those changes to an object in the scene. It also shows how to use collision thread events to disable proxy rendering in order to avoid a haptic "kick" when setting constraints on stylus switch clicks.
ハプティックデバイスを使って,オブジェクトの正確な操作を行うサンプル.
ハプティックデバイスの位置姿勢の変化を追いかける方法や,それらの変化をオブジェクトに伝える方法が分かる.
また,Proxyレンダリングを止めるための衝突スレッドイベントの使い方も分かる.
SimpleDeformableSurface
Shows haptic rendering of a deformable surface. A deformable sheet is implemented using a grid of particles connected by a spring damper network. You can feel the surface as well as deform it using the haptic device.
変形する面を表示するサンプル.
この変形するシートは,バネとダンパを網目状につないだ格子で表現されている.
ハプティックデバイスを使って,表面が変形する触感を感じることができる.
SimpleRigidBodyDynamics
Shows the integration of haptics into a rigid body simulation. Demonstrates a variety of different dynamics scenarios and interaction modes, such as falling blocks, dominos, and catapults. The device can be used to push around the blocks or used as a spring attached to a block.
力覚と剛体シミュレーションの統合のサンプル.
落ちてくるブロックや,ドミノ,カタパルトなどのシーンがある(らしい).
ライブラリの再コンパイル
付属のライブラリは,Microsoft Visual C++ 6.0でコンパイルされたものなので,Visual Studio 2008など新しいコンパイラでは使えないので,再コンパイルして作り直す.
やり方は,C:\Program Files (x86)\SensAble\3DTouch\README-AE.txtに書いてある.
C:\Program Files (x86)\SensAble\3DTouch\utilities\src\HDU\ にあるHDU.dsw をダブルクリック.
警告 HDU.vcprojという名前の...代わりに既存のプロジェクトを読み込みますか? はい
このソリューションに関連する...ソース管理のバインドをプロジェクトから完全に削除しますか? はい
Visual Studioが起動
ビルド→バッチビルド→すべて選択→リビルド
C:\Program Files (x86)\SensAble\3DTouch\utilities\lib\hdu.libとhdud.libができる.できない場合は手動でコピーする.
以降,HLU, SnapConstraints, HapticMouseも同様に.
C:\Program Files (x86)\SensAble\3DTouch\utilities\src\HLU\ にあるHLU.dsw をダブルクリック.
Visual Studioが起動
ビルド→バッチビルド→すべて選択→リビルド
C:\Program Files (x86)\SensAble\3DTouch\utilities\lib\hlu.libとhlud.libができる.
C:\Program Files (x86)\SensAble\3DTouch\utilities\src\SnapConstraints\ にあるSnapConstraints.dswをダブルクリック.
Visual Studioが起動
ビルド→バッチビルド→すべて選択→リビルド
C:\Program Files (x86)\SensAble\3DTouch\utilities\lib\SnapConstraints.libとSnapConstraintsD.libができる.
C:\Program Files (x86)\SensAble\3DTouch\utilities\src\HapticMouse\ にあるHapticMouse.dswをダブルクリック.
Visual Studioが起動
ビルド→バッチビルド→すべて選択→リビルド
C:\Program Files (x86)\SensAble\3DTouch\utilities\lib\HapticMouse.libとHapticMouseD.libができる.
(なんちゃら).libがRelease用のライブラリ,(なんちゃら)d.libがDebug用のライブラリである.
サンプルからプロジェクトをコピー
プロジェクトを一から自分で作っても良いが,面倒なのでHelloSphereをベースにする.
C:\Program Files (x86)\SensAble\3DTouch\examples\HL\graphics\HelloSphere\のディレクトリを丸ごと自分の作業フォルダにコピー.例えば,D:\src\など.
コピーしたHelloSphere\HelloSphere.dswをダブルクリック.
適宜,ソースを改変
ビルド→HelloSphareのビルド
デバッグ→デバッグなしで開始
リファレンスマニュアル
C:\Program Files (x86)\SensAble\3DTouch\doc\にある.
OpenHaptics_Ref.pdf,OpenHaptics_ProgGuide.pdfは,できれば印刷して,常に手元に置いておく.
ページ数が多いので,4upの両面印刷などにすべき.
APIのレベル(参照:http://www.sensable.com/openhaptics-toolkit-hdapi.htm)
HDAPI (Haptic Device API) :低レベルのAPI.PHANToMのモータを直接制御して自由自在に操作できるが,ちょっと難しいかも.
HLAPI (Haptic Library API) :高レベルのAPI.OpenGLと連携していて,OpenGLで描画した立体物などの触感を簡単に提示できる.初心者向き.
PHANTOM Omni User Guide(C:\Program Files\SensAble\PHANTOM Device Drivers\hardware_documentation\PHNTMOmni_UserGuide.pdf)のAppendix B,Appendix Dを参照.
Appendix B: Troubleshooting 追記B:トラブルシューティング
#7 How do I connect multiple PHANTOM Omni devices, daisy chaining?(#7 複数台のPHANTOM Omniを使うときは,デイジーチェーンで繋ぐの?)
To connect more than one PHANTOM Omni device, first connect your primary device to your computer following the instructions on “Connecting the PHANTOM Omni Device” on page 1(複数台のPhantom Omniを使うには,まず10ページの「PhantomOmniのつなぎ方」に従って,1台目のデバイスを繋いで設定する.)
Follow the same instructions for the second device, but connect the FireWire cable of your second device into the back of the first device rather than your computer.(同様にして2台目も繋ぐのだが,2台目のデバイスのFireWireケーブルは,直接PCには繋がずに,1台目のデバイスの背面に繋ぐ方が良い.)
IMPORTANT Remember to ensure that the connectors are oriented properly to the ports.(重要 コネクタの向きを間違えないように.)
See Appendix D: “Configuring Multiple Devices” for more information(詳細はAppendix D「複数デバイスの設定」を参照.)
Appendix D: Configuring Multiple Devices 追記D:複数台のPHANToMの設定
If you want to use more than one PHANTOM haptic device with your computer, you can create as many as 20 uniquely named PHANTOM configurations. Each named PHANTOM configuration can refer to a particular system configuration that you use frequently. Which device to use is defined by the software application which uses it.(複数台のPHANTOMを使う場合は,PHANTOM Configurationを使って,最大20台までのPHANTOMを登録できる.PHANTOM configurationでPhantomに付けた名前を指定することで,どのデバイスを使用するかを選択できる.)
To create a new PHANTOM configuration use the PHANTOM Configuration Utility.(新しいPHANTOMを登録するには,PHANTOM Configurationを使う.)
1 From the Start menu, select Settings > Control Panel > PHANToM Configuration. The PHANTOM Configuration window opens.(1 スタートメニュー→ 設定→ コントロールパネル→ PHANTOM Configurationで,PHANTOM Configurationウインドウが開く.)
2 On the hardware tab, click Add.(2 ハードウエアタブを開き,Addをクリックする.)
3 Enter a name to call that device, click OK.(3 新しく利用するPHANToMの名前を入力して,OKをクリックする.)
4 From the PHANTOM model menu, select the correct model.(4 PHANTOM modelメニューから,適当なモデルを選択する.)
5 Click OK.(5 OKをクリックする.)
Dual Configurations 2台のタンデム利用の設定
The Dual Configuration settings only apply if you want to set up a pair of PHANTOM devices to work in tandem with each other. You must have created at least two PHANTOM devices as described above before the Dual Configuration tab can be used. Once you have created at least two devices, go to the Dual Configuration area and select the PHANTOM devices you would like to use in a paired configuration. Then enable the check box to turn the dual configuration on.(2台をタンデムで利用(片方のPhahtomのスタイラスの動作をもう一方のPhantomに伝える)する場合に, 2台をペアとして設定するには,まず上で説明した方法で最低2台のPHANToMを登録する. Dual Configuration タブを開き,ペアで利用したい2台のデバイスを選択する. そうすると,dual configurationのチェックボックスが利用可能になる.)
(と書いてあるが,筆者の環境ではDual Configurationのタブが現れない.原因不明)
(参考:http://www.vrac.iastate.edu/ohug/Hai_Jun_HDAPI_talk.pdf)
だいたいこんな感じ
関数hdGet*を使う
引数に HD_{CURRENT, LAST}_{FORCE, TORQUE, POSITION, VELOCITY, BUTTONS, TRANSFORM}などを指定すれば,それぞれの情報が取得できる.
HD_CURRENT_*は現在の状態,HD_LAST_*は1フレーム前の状態を表す.
スタイラスのボタンを押すと力を発生させる.
ボタン1で+x方向,ボタン2で+y方向,ボタン3(両方押し)で+z方向 sample_force1.cpp
複数台の場合,MakeCurrentでデバイスを切り替える. sample_force1_dual.cpp
追加のインクルードディレクトリ:$(3DTOUCH_BASE)\include,$(3DTOUCH_BASE)\utilities\include
追加のライブラリディレクトリ:$(3DTOUCH_BASE)\lib,$(3DTOUCH_BASE)\utilities\lib
追加の依存ファイル(Debug):hd.lib hl.lib hdud.lib
追加の依存ファイル(Release):hd.lib hl.lib hdu.lib
$(3DTOUCH_BASE) はOpenHaptics をインストールした際に自動で設定される環境変数で,C:\Program Files (x86)\SensAble\3DTouch
数字から始まる環境変数が使えなくなったため,3DTOUCH_BASEでは不具合が起きる.
回避策:手動で適当な環境変数(例えば,変数名:OPENHAPTICS,変数値:C:\Program Files (x86)\SensAble\3DTouch )を設定し,VisualStudioの設定もこれに合わせて変更すればよい.
「error LNK2026: モジュールは SAFESEH イメージには安全ではありません。」が出る.
回避策:メニュー,プロジェクト,プロパティ,構成プロパティ,リンカー,詳細設定
一番下の,安全な例外ハンドラーを含むイメージ,に何も書かない(消去する).
「error LNK2038: '_MSC_VER' の不一致が検出されました。」が出る.
回避策:ライブラリをビルドしたVisual Studioのバージョンと今使っているVisual Studioのバージョンが異なるため発生する.ちゃんと合わせれば問題は解決する.
C:\Program Files (x86)\SensAble\3DTouch\doc にPDFある.
OpenHaptics_Install_win.pdf:Windowsへのインストールガイド
OpenHapticsAcademicEditionLicense.pdf:使用許諾書
OpenHaptics_ProgGuide.pdf:プログラミングのガイド
OpenHaptics_Ref.pdf:関数リファレンス
そのうち書く
hdInitDevice()
Description: Initializes the device. If successful, this returns a handle to the device and sets the device as the current device.
hlCreateContext()
Description: Creates a new haptic rendering context. The haptic rendering context stores the current set of haptic primitives to be rendered as well as the haptic rendering state.
hlMakeCurrent()
Description: Makes a haptic rendering context current. The current rendering context is the target for all rendering and state commands. All haptic rendering commands will be sent to the device in the current context until a context with a different device is made current.
hdMakeCurrentDevice()
Description: Makes the device current. All subsequent device-specific actions such as getting and setting state or querying device information will be performed on this device until another is made current.
hlBeginFrames()
Description: Begins an haptics frame, which is a block of code within which the device state is guaranteed to be consistent. Updates state from the device for current/last information. All state-related information, such as setting state, should be done within a haptics frame.
hlEndFrames()
Description: Ends a haptics rendering pass, that is a block of code that sends primitives to the haptic device to be rendered. hlEndFrame() flushes the set of haptics primitives (that is, shapes, effects) specified since the last hlBeginFrame() to the haptics device. All haptic primitive rendering functions must be made within a begin/end frame pair.
hlBeginShape()
Description: Indicates that subsequent geometry commands will be sent to the haptic renderer as part of the shape indicated until hlEndShape() is called. Geometric primitives may only be sent to the haptic renderer if they are specified inside an hlBeginShape()/hlEndShape() block. Grouping geometric primitives is important for two reasons:
1 Event callbacks will report the shape id of geometric primitives touched, and
2 Correct haptic rendering of geometric primitives that are dynamically moving is
accomplished by looking at frame to frame differences based on shape id.
hlEndShape()
Description: Completes the shape specified by the last call to hlBeginShape(). Geometry, materials, transforms and other state for the shape are captured and sent to the haptic renderer.
hlGenShapes()
Description: For shapes, generates a unique identifier that may be used with hlBeginShape().
hdGet (Parameter Values): hdGetIntegerv(), hdGetFloatv(), hdGetDoublev(), etc
Description: Obtains information about the device. There are five query functions for obtaining information about the device associated with the parameter name used.
version 3.0のマニュアルより抜粋(http://www.sensable.com/documents/documents/OpenHaptics_ProgGuide.pdf)
What is OpenHaptics 3.0?
OpenHaptics 3.0 tries to make programming simpler by encapsulating the basic steps common to all haptics/graphics applications. This encapsulation is implemented in the C++ classes of the QuickHaptics micro API. By anticipating typical use scenarios, a wide range of default parameter settings is put into place that allow the user to code haptically enabled applications very efficiently. The common steps required by haptics/graphics applications include: ? Parsing geometry files from popular animation packages ? Creating graphics windows and initializing the OpenGL environment ? Initializing one or multiple haptics devices ? Scene and camera design ? Mapping force and stiffness parameters to objects in the scene ? Setting up callback responses to interactions Through an informed choice of default values for haptic and graphics parameters, a programmer can create a viable scene without the need to explicitly define the camera location, device space parameters, or settings for various shape properties. See "Default Parameter Values for Shape and Display Windows" on page 2-54. The first three programming examples in the next section shows how QuickHaptics can be used to prototype relatively complex scenes with less than a page of C++ code and represents the top of our pyramid. In the second QuickHaptics level are functions that provide custom force effects, more flexible model interactions, and user-defined callback functions. The third level of the pyramid shows that QuickHaptics is built on the foundation provided by the existing OpenHaptics 2.0 HL and HD functions. In most cases, applications previously developed in OH 2.0 should run with little to no modification in OpenHaptics 3.0. The following diagram illustrates the relationship between the QuickHaptics micro API and the existing HD and HL layers of OpenHaptics.
そのうち書く
そのうち書く
そのうち書く
概要
linux用PDDはLinux用OpenHapticsの中に含まれている.
Kernel 2.6.30 以上,raw1394 カーネルモジュールが必要.Mesa,GLUT,MesaGLw,FreeType2も必要.
詳細は HW_userguide_Linux.pdf を参照.
ダウンロード
DSCから,OpenHaptics Academic Edition for Linux → Software Downloads → Download OpenHaptics Academic Edition for Linux - v3.0 をクリックして, OpenHapticsAE_Linux_v3_0.zip をダウンロードする.
zipを展開し,中身を見る.
# unzip OpenHapticsAE_Linux_v3_0.zip
# cd OpenHapticsAE_Linux_v3_0
# ls
HW_userguide_Linux.pdf OpenHaptics-AE 3.0/ PHANTOM Device Drivers/
PDDのインストール
rootで実行.
# cd PHANTOM\ Device\ Drivers
# cd 32-bit (64bit環境では,cd 64-bit)
(rpmでインストール)# rpm -ivh phantomdevicedrivers-4.x-x.ix86.rpm
(dpkgでインストール)# dpkg -i phantomdevicedrivers_4.x_x.ix86.deb
1394モジュールが組み込まれているかを確認.raw1394が組み込まれていれば問題なし.
# cat /proc/modules | grep raw1394
raw1394が組み込まれていない場合は以下のコマンドを実行.
# /sbin/modprobe raw1394
Phantomの登録とテストは以下のコマンドを実行.
# /usr/sbin/PHANToMConfiguration
# /usr/sbin/PHANToMTest
OpenHapticsのインストール
rootで実行.
# cd OpenHaptics-AE\ 3.0
# cd 32-bit (64bit環境では,cd 64-bit)
(rpmでインストール)# rpm -ivh openhaptics-3.x-x.ix86.rpm
(dpkgでインストール)# dpkg -i openhaptics_3.x_x.ix86.deb
ヘッダファイルのパス
/usr/include/HD
/usr/include/HDU
/usr/include/HL
/usr/include/HLU
/usr/include/QH
/usr/include/SnapConstraints
ライブラリファイルのパス
/usr/lib/libHD.so
/usr/lib/libHDU.a
/usr/lib/libHL.so
/usr/lib/libHLU.a
/usr/lib/libQH.so
/usr/lib/libQHGLUTWrapper.so
/usr/lib/libSnapConstraints.a
環境変数の設定..cshrcなどに追記しておくと良い.
# setenv 3DTOUCH_BASE /usr/share/3DTouch
サンプルプログラムは以下のディレクトリにあるのでmakeしてください.
/usr/share/3DTouch/examples/HL/console
/usr/share/3DTouch/examples/HL/graphics
/usr/share/3DTouch/examples/HD/console
/usr/share/3DTouch/examples/HD/graphics
/usr/share/3DTouch/QuickHaptics/examples
CHAI 3D : http://www.chai3d.org/
OpenHapticsの代わりになるもの.
様々な力覚提示デバイスで共通して使用可能.
フリー
Windows, MacOS, Linuxで利用可能
そのうち書く