18 #ifndef _GAZEBO_BUOYANCY_PLUGIN_HH_ 19 #define _GAZEBO_BUOYANCY_PLUGIN_HH_ 25 #include "gazebo/physics/physics.hh" 69 public:
virtual void Init();
72 protected:
virtual void OnUpdate();
84 protected: sdf::ElementPtr
sdf;
A plugin that simulates buoyancy of an object immersed in fluid.
Definition: BuoyancyPlugin.hh:59
Forward declarations for the common classes.
Definition: Animation.hh:33
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
sdf::ElementPtr sdf
Pointer to the plugin SDF.
Definition: BuoyancyPlugin.hh:84
double fluidDensity
The density of the fluid in which the object is submerged in kg/m^3.
Definition: BuoyancyPlugin.hh:88
VolumeProperties()
Default constructor.
Definition: BuoyancyPlugin.hh:33
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:116
double volume
Volume of this link.
Definition: BuoyancyPlugin.hh:39
A class for storing the volume properties of a link.
Definition: BuoyancyPlugin.hh:30
event::ConnectionPtr updateConnection
Connection to World Update events.
Definition: BuoyancyPlugin.hh:75
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
boost::shared_ptr< Model > ModelPtr
Definition: PhysicsTypes.hh:88
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
math::Vector3 cov
Center of volume in the link frame.
Definition: BuoyancyPlugin.hh:36
std::map< int, VolumeProperties > volPropsMap
Map of <link ID, point> pairs mapping link IDs to the CoV (center of volume) and volume of the link...
Definition: BuoyancyPlugin.hh:92
physics::ModelPtr model
Pointer to model containing the plugin.
Definition: BuoyancyPlugin.hh:78
A plugin with access to physics::Model.
Definition: Plugin.hh:245
physics::PhysicsEnginePtr physicsEngine
Pointer to the physics engine (for accessing gravity).
Definition: BuoyancyPlugin.hh:81
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59