00001 00002 // 00003 // Title : DynamicScaling.h 00004 // Project : OSCAR 2.0 00005 // Created : 2/23/05 00006 // Author : Jeremy Sevier 00007 // Platforms : All 00026 // Purpose : A class for determining the maximum value a manipulator's joint velocity trajectory 00027 // can be scaled by without vioulating actuator torque constraints 00028 // 00029 //---------------------------------------------------------------------------- 00030 // $Revisions$ 2 simpler version 00031 // 00032 // 00034 #ifndef DynamicScaling_h 00035 #define DynamicScaling_h 00036 00037 #if _MSC_VER >= 1000 00038 #pragma once 00039 #endif // _MSC_VER >= 1000 00040 00041 #include "Dynamics/IDNewtonEuler.h" 00042 #include "Dynamics/IDSANewtonEuler.h" 00043 #include <vector> 00044 00046 namespace OSCAR 00047 { 00055 class DynamicScaling:public virtual Base 00056 { 00057 public: 00065 DynamicScaling(IDNewtonEuler *id,FKJacobian *fkj); 00071 virtual ~DynamicScaling(); 00078 bool SetTorqueLimits(const Vector &limits); 00087 bool SetTrajectory(const std::vector<Vector> pos,const std::vector<Vector> vel,const std::vector<Vector> acc); 00093 std::vector<Vector> GetScaledTorques(); 00099 double GetTorqueScalingFactor(); 00100 protected: 00101 double scale; 00102 std::vector<Vector> pos; 00103 std::vector<Vector> vel; 00104 std::vector<Vector> acc; 00105 std::vector<Vector> jointTorques; 00106 std::vector<Vector> gravityTorques; 00107 FKJacobian *fkj; 00108 IDNewtonEuler *idne; 00109 IDSANewtonEuler idsa; 00110 Vector limTau; 00111 DynamicScaling& operator=(const DynamicScaling &rhs);//disable the equals operator 00112 DynamicScaling(const DynamicScaling &rhs);//disable the copy constructor 00113 }; 00114 } 00115 #endif
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |