18 #ifndef GAZEBO_PHYSICS_SIMBODY_SIMBODYPHYSICS_HH 19 #define GAZEBO_PHYSICS_SIMBODY_SIMBODYPHYSICS_HH 22 #include <boost/thread/thread.hpp> 23 #include <boost/thread/mutex.hpp> 51 public:
virtual void Load(sdf::ElementPtr _sdf);
54 public:
virtual void Init();
57 public:
virtual void Reset();
64 public:
virtual void InitForThread();
67 public:
virtual void UpdateCollision();
70 public:
virtual void UpdatePhysics();
73 public:
virtual void Fini();
76 public:
virtual std::string GetType()
const;
82 public:
virtual CollisionPtr CreateCollision(
const std::string &_type,
86 public:
virtual JointPtr CreateJoint(
const std::string &_type,
90 public:
virtual ShapePtr CreateShape(
const std::string &_shapeType,
94 public: SimTK::MultibodySystem *GetDynamicsWorld()
const;
97 public:
virtual void SetGravity(
const ignition::math::Vector3d &_gravity);
100 public:
virtual void DebugPrint()
const;
103 public:
virtual void SetSeed(uint32_t _seed);
111 public:
static SimTK::Quaternion QuadToQuad(
112 const ignition::math::Quaterniond &_q);
117 public:
static ignition::math::Quaterniond QuadToQuadIgn(
118 const SimTK::Quaternion &_q);
123 public:
static SimTK::Vec3 Vector3ToVec3(
124 const ignition::math::Vector3d &_v);
129 public:
static ignition::math::Vector3d Vec3ToVector3Ign(
130 const SimTK::Vec3 &_v);
138 public:
static SimTK::Transform Pose2Transform(
139 const ignition::math::Pose3d &_pose);
145 public:
static ignition::math::Pose3d Transform2PoseIgn(
146 const SimTK::Transform &_xAB);
151 public:
static SimTK::Transform GetPose(sdf::ElementPtr _element);
157 public:
static std::string GetTypeString(
unsigned int _type);
166 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
169 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
179 private:
void CreateMultibodyGraph(
192 private:
void InitSimbodySystem();
196 private:
void AddStaticModelToSimbodySystem(
202 private:
void AddDynamicModelToSimbodySystem(
203 const SimTK::MultibodyGraphMaker &_mbgraph,
208 SimTK::MobilizedBody &_mobod, SimTK::ContactCliqueId _modelClique);
211 public: SimTK::SimbodyMatterSubsystem
matter;
212 public: SimTK::GeneralForceSubsystem
forces;
215 public: SimTK::ContactTrackerSubsystem
tracker;
216 public: SimTK::CompliantContactSubsystem
contact;
225 public:
virtual boost::any GetParam(
const std::string &_key)
const;
228 public:
virtual bool GetParam(
const std::string &_key,
229 boost::any &_value)
const;
232 public:
virtual bool SetParam(
const std::string &_key,
233 const boost::any &_value);
236 private:
double contactMaterialStiffness;
239 private:
double contactMaterialDissipation;
243 private:
double contactMaterialPlasticCoefRestitution;
247 private:
double contactMaterialPlasticImpactVelocity;
251 private:
double contactMaterialStaticFriction;
255 private:
double contactMaterialDynamicFriction;
259 private:
double contactMaterialViscousFriction;
263 private:
double contactImpactCaptureVelocity;
267 private:
double contactStictionTransitionVelocity;
269 private: SimTK::MultibodySystem *dynamicsWorld;
273 private:
double stepTimeDouble;
277 private: std::string solverType;
284 private: std::string integratorType;
SimTK::Integrator * integ
Definition: SimbodyPhysics.hh:217
boost::shared_ptr< Link > LinkPtr
Definition: PhysicsTypes.hh:109
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
SimTK::Force::DiscreteForces discreteForces
Definition: SimbodyPhysics.hh:214
Forward declarations for the common classes.
Definition: Animation.hh:26
SimTK::SimbodyMatterSubsystem matter
Definition: SimbodyPhysics.hh:211
Base class for a physics engine.
Definition: PhysicsEngine.hh:41
bool simbodyPhysicsStepped
Definition: SimbodyPhysics.hh:222
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
Simbody Link class.
Definition: SimbodyLink.hh:38
Simbody physics engine.
Definition: SimbodyPhysics.hh:42
SimTK::CompliantContactSubsystem contact
Definition: SimbodyPhysics.hh:216
SimTK::MultibodySystem system
Definition: SimbodyPhysics.hh:210
Simbody wrapper forward declarations and typedefs.
SimTK::Force::Gravity gravity
Definition: SimbodyPhysics.hh:213
boost::shared_ptr< Shape > ShapePtr
Definition: PhysicsTypes.hh:141
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:93
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
EntityType
Unique identifiers for all entity types.
Definition: Base.hh:81
SimTK::GeneralForceSubsystem forces
Definition: SimbodyPhysics.hh:212
bool simbodyPhysicsInitialized
true if initialized
Definition: SimbodyPhysics.hh:220
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
SimTK::ContactTrackerSubsystem tracker
Definition: SimbodyPhysics.hh:215
boost::shared_ptr< Base > BasePtr
Definition: PhysicsTypes.hh:77
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44