メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

HISpidarFishingRod.h

00001 #ifndef HDSPIDARFISHINGROD_H
00002 #define HDSPIDARFISHINGROD_H
00003 
00004 #include "HIHapticDevice.h"
00005 #include "HISpidarMotor.h"
00006 #include "Device/DVPioBase.h"
00007 #include "Device/DVDeviceManager.h"
00008 #include "HISpidarCalc3Dof.h"
00009 
00010 namespace Spr {;
00011 
00012 /** @JA エンドエフェクタ(グリップ)が剛体で6自由度なSPIDAR.糸の本数は可変.
00013     @EN A SPIDAR with a 6DOF solid grip. The number of the strings is variable.@@*/
00014 class SPR_DLL HISpidarFishingRod: public HIForceDevice3D,public HISpidarCalc3Dof{
00015 public:
00016     std::vector<HISpidarMotor> motor;   ///<    モータ
00017     std::vector<DVPioBase*> button; ///<    ボタン
00018 
00019         /// デバイスのタイプ
00020     HIOBJECTDEF(HISpidarFishingRod);
00021 
00022     HISpidarFishingRod();
00023     bool Init(DVDeviceManager& dev);
00024     virtual double  GetLength(int);
00025 
00026     /// デバイスの初期化(使用前に呼ぶ)
00027 //  bool Init(DVDeviceManager& dev, int nMotor, const Vec3f(* motorPos)[2], float vpn, float lpp, float minF, float maxF);
00028     /// キャリブレーションの前に行う処理
00029     virtual bool BeforeCalib(){ SetMinForce(); return true; }
00030     /// キャリブレーション
00031     virtual bool Calib();
00032     /// 最低張力を出力
00033     void SetMinForce();
00034     
00035     /// 位置の取得
00036     Vec3f GetPos(){ return pos; }
00037     /// 角度の取得
00038 //  Quaternionf GetOri(){ return ori; }
00039     
00040     /// 力の設定
00041     void SetForce(const Vec3f& f){ HISpidarCalc3Dof::SetForce(f); }
00042     /// トルクの設定
00043 //  void SetForce(const Vec3f& f, const Vec3f& t){ HISpidarCalc6Dof::SetForce(f, t); }
00044     /// 重み付けの設定
00045     void SetWeight(float s=0.3f, float t=1.0f){ smooth=s; lambda_t=t; }
00046 
00047     /// 力の取得
00048     Vec3f GetForce(){ return trnForce; }
00049     /// トルクの取得
00050 //  Vec3f GetTorque(){ return rotForce; }
00051 
00052     /// ボタン情報の取得
00053     int HISpidarFishingRod::GetButton(int ch){
00054         if(button[ch]) return button[ch]->Get();
00055         else return 0;
00056     }
00057 
00058     /// デバイスの状態を更新する.
00059     virtual void Update(float dt);
00060     virtual void Update(){ HISpidarCalc3Dof::Update(); }
00061 
00062 protected:
00063     virtual void MakeWireVec();                 ///<    ワイヤ方向ベクトルの計算
00064     virtual void UpdatePos();                   ///<    ワイヤ設置位置座標の更新
00065     virtual void MeasureWire();                 ///<    ワイヤ長の計測
00066 };
00067 
00068 }   //  namespace Spr
00069 #endif
00070 
00071 
00072 
00073 /*#ifndef HDSPIDARFishingRod_H
00074 #define HDSPIDARFishingRod_H
00075 
00076 #include "HISpidarG6.h"
00077 
00078 namespace Spr {;
00079 
00080 /** Spidar-G CType
00081     フレームのサイズやモータの符号を含む    */
00082 
00083 /*
00084 class SPR_DLL HISpidarFishingRod: public HISpidarG6{
00085 public:
00086     /// デバイスのタイプ
00087     HIOBJECTDEF(HISpidarFishingRod);
00088 
00089     HISpidarFishingRod();
00090     bool Init(DVDeviceManager& dev);
00091     virtual double  GetLength(int);
00092 
00093 };
00094 
00095 }   //  namespace Spr
00096 #endif
00097 
00098 */

Springheadに対してSun Apr 16 01:57:53 2006に生成されました。  doxygen 1.4.1