18 #ifndef _SIMBODY_PHYSICS_HH
19 #define _SIMBODY_PHYSICS_HH
22 #include <boost/thread/thread.hpp>
23 #include <boost/thread/mutex.hpp>
50 public:
virtual void Load(sdf::ElementPtr _sdf);
53 public:
virtual void Init();
56 public:
virtual void Reset();
72 public:
virtual void Fini();
75 public:
virtual std::string
GetType()
const;
102 public:
virtual void SetSeed(uint32_t _seed);
144 public:
static SimTK::Transform
GetPose(sdf::ElementPtr _element);
150 public:
static std::string
GetTypeString(
unsigned int _type);
159 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
162 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
172 private:
void CreateMultibodyGraph(
185 private:
void InitSimbodySystem();
189 private:
void AddStaticModelToSimbodySystem(
195 private:
void AddDynamicModelToSimbodySystem(
196 const SimTK::MultibodyGraphMaker &_mbgraph,
201 SimTK::MobilizedBody &_mobod, SimTK::ContactCliqueId _modelClique);
204 public: SimTK::SimbodyMatterSubsystem
matter;
205 public: SimTK::GeneralForceSubsystem
forces;
208 public: SimTK::ContactTrackerSubsystem
tracker;
209 public: SimTK::CompliantContactSubsystem
contact;
218 private:
double contactMaterialStiffness;
221 private:
double contactMaterialDissipation;
225 private:
double contactMaterialPlasticCoefRestitution;
229 private:
double contactMaterialPlasticImpactVelocity;
233 private:
double contactMaterialStaticFriction;
237 private:
double contactMaterialDynamicFriction;
241 private:
double contactMaterialViscousFriction;
245 private:
double contactImpactCaptureVelocity;
249 private:
double contactStictionTransitionVelocity;
251 private: SimTK::MultibodySystem *dynamicsWorld;
255 private:
double stepTimeDouble;