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);
118 public:
static SimTK::Quaternion QuadToQuad(
119 const ignition::math::Quaterniond &_q);
131 public:
static ignition::math::Quaterniond QuadToQuadIgn(
132 const SimTK::Quaternion &_q);
138 public:
static SimTK::Vec3 Vector3ToVec3(
const math::Vector3 &_v)
144 public:
static SimTK::Vec3 Vector3ToVec3(
145 const ignition::math::Vector3d &_v);
151 public:
static math::Vector3 Vec3ToVector3(
const SimTK::Vec3 &_v)
157 public:
static ignition::math::Vector3d Vec3ToVector3Ign(
158 const SimTK::Vec3 &_v);
167 public:
static SimTK::Transform Pose2Transform(
const math::Pose &_pose)
176 public:
static SimTK::Transform Pose2Transform(
177 const ignition::math::Pose3d &_pose);
184 public:
static math::Pose Transform2Pose(
const SimTK::Transform &_xAB)
191 public:
static ignition::math::Pose3d Transform2PoseIgn(
192 const SimTK::Transform &_xAB);
197 public:
static SimTK::Transform GetPose(sdf::ElementPtr _element);
203 public:
static std::string GetTypeString(
unsigned int _type);
212 protected:
virtual void OnRequest(ConstRequestPtr &_msg);
215 protected:
virtual void OnPhysicsMsg(ConstPhysicsPtr &_msg);
225 private:
void CreateMultibodyGraph(
238 private:
void InitSimbodySystem();
242 private:
void AddStaticModelToSimbodySystem(
248 private:
void AddDynamicModelToSimbodySystem(
249 const SimTK::MultibodyGraphMaker &_mbgraph,
254 SimTK::MobilizedBody &_mobod, SimTK::ContactCliqueId _modelClique);
257 public: SimTK::SimbodyMatterSubsystem
matter;
258 public: SimTK::GeneralForceSubsystem
forces;
261 public: SimTK::ContactTrackerSubsystem
tracker;
262 public: SimTK::CompliantContactSubsystem
contact;
271 public:
virtual boost::any GetParam(
const std::string &_key)
const;
274 public:
virtual bool GetParam(
const std::string &_key,
275 boost::any &_value)
const;
278 public:
virtual bool SetParam(
const std::string &_key,
279 const boost::any &_value);
282 private:
double contactMaterialStiffness;
285 private:
double contactMaterialDissipation;
289 private:
double contactMaterialPlasticCoefRestitution;
293 private:
double contactMaterialPlasticImpactVelocity;
297 private:
double contactMaterialStaticFriction;
301 private:
double contactMaterialDynamicFriction;
305 private:
double contactMaterialViscousFriction;
309 private:
double contactImpactCaptureVelocity;
313 private:
double contactStictionTransitionVelocity;
315 private: SimTK::MultibodySystem *dynamicsWorld;
319 private:
double stepTimeDouble;
323 private: std::string solverType;
330 private: std::string integratorType;
SimTK::Integrator * integ
Definition: SimbodyPhysics.hh:263
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:260
Encapsulates a position and rotation in three space.
Definition: Pose.hh:42
SimTK::SimbodyMatterSubsystem matter
Definition: SimbodyPhysics.hh:257
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Base class for a physics engine.
Definition: PhysicsEngine.hh:41
bool simbodyPhysicsStepped
Definition: SimbodyPhysics.hh:268
boost::shared_ptr< Joint > JointPtr
Definition: PhysicsTypes.hh:117
Simbody Link class.
Definition: SimbodyLink.hh:38
Simbody physics engine.
Definition: SimbodyPhysics.hh:42
A quaternion class.
Definition: Quaternion.hh:48
SimTK::CompliantContactSubsystem contact
Definition: SimbodyPhysics.hh:262
SimTK::MultibodySystem system
Definition: SimbodyPhysics.hh:256
Simbody wrapper forward declarations and typedefs.
SimTK::Force::Gravity gravity
Definition: SimbodyPhysics.hh:259
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
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:258
bool simbodyPhysicsInitialized
true if initialized
Definition: SimbodyPhysics.hh:266
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
SimTK::ContactTrackerSubsystem tracker
Definition: SimbodyPhysics.hh:261
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