Skip to content

BuoyantObject

class gazebo::BuoyantObject

Class describing the dynamics of a buoyant object, useful for simple representations of underwater structures.

Summary
Members Descriptions
publicBuoyantObject(physics::LinkPtr _link) Constructor.
public~BuoyantObject() Destructor.
public voidGetBuoyancyForce(const ignition::math::Pose3d & _pose,ignition::math::Vector3d & buoyancyForce,ignition::math::Vector3d & buoyancyTorque) Returns the buoyancy force vector in the world frame.
public voidApplyBuoyancyForce() Applies buoyancy force on link.
public voidSetVolume(double _volume) Sets the link's submerged volume.
public doubleGetVolume() Returns the stored link submerged volume.
public voidSetFluidDensity(double _fluidDensity) Sets the fluid density in kg/m^3.
public doubleGetFluidDensity() Returns the stored fluid density.
public voidSetCoB(const ignition::math::Vector3d & _centerOfBuoyancy) Sets the position of the center of buoyancy on the body frame.
public ignition::math::Vector3dGetCoB() Returns the stored center of buoyancy.
public voidSetGravity(double _g) Set acceleration of gravity.
public doubleGetGravity() Get stored acceleration of gravity.
public voidSetBoundingBox(const ignition::math::Box & _bBox) Sets bounding box.
public voidSetStoreVector(std::string _tag) Adds a field in the hydroWrench map.
public ignition::math::Vector3dGetStoredVector(std::string _tag) Get vector from the hydroWrench map.
public voidSetDebugFlag(bool _debugOn) Set debug flag to store intermediate forces and torques.
public boolIsSubmerged() Returns true if the robot is completely submerged.
public boolIsNeutrallyBuoyant() Returns true if the link was set to be neutrally buoyant.
public boolGetDebugFlag() Returns the debug flag.
public voidSetNeutrallyBuoyant() Sets this link as neutrally buoyant.
protected doublevolume Volume of fluid displaced by the submerged object.
protected doublescalingVolume Scaling factor for the volume.
protected doubleoffsetVolume Offset for the volume.
protected doublefluidDensity Fluid density.
protected doubleg Acceleration of gravity.
protected ignition::math::Vector3dcenterOfBuoyancy Center of buoyancy in the body frame.
protected ignition::math::BoxboundingBox TEMP for calculation of the buoyancy force close to the surface.
protected std::map< std::string, ignition::math::Vector3d >hydroWrench Storage for hydrodynamic and hydrostatic forces and torques for debugging purposes.
protected booldebugFlag Debug flag, storing all intermediate forces and torques.
protected boolisSubmerged Is submerged flag.
protected physics::LinkPtrlink Pointer to the correspondent robot link.
protected boolneutrallyBuoyant If true, the restoring force will be equal to the gravitational.
protected doublemetacentricWidth
protected doublemetacentricLength Metacentric length of the robot, used only for surface vessels and floating objects.
protected doublewaterLevelPlaneArea If the cross section area around water level of the surface vessel is not given, it will be computed from the object's bounding box.
protected doublesubmergedHeight Height of the robot that is submerged (only for surface vessels)
protected boolisSurfaceVessel Flag set to true if the information about the metacentric width and height is available.
protected boolisSurfaceVesselFloating Flag set to true if the vessel has reached its submerged height.
protected voidStoreVector(std::string _tag,ignition::math::Vector3d _vec) Store vector in the hydroWrench map if the field has been created.
Members

Constructor.

public~BuoyantObject()

Destructor.

public voidGetBuoyancyForce(const ignition::math::Pose3d & _pose,ignition::math::Vector3d & buoyancyForce,ignition::math::Vector3d & buoyancyTorque)

Returns the buoyancy force vector in the world frame.

public voidApplyBuoyancyForce()

Applies buoyancy force on link.

public voidSetVolume(double _volume)

Sets the link's submerged volume.

public doubleGetVolume()

Returns the stored link submerged volume.

public voidSetFluidDensity(double _fluidDensity)

Sets the fluid density in kg/m^3.

public doubleGetFluidDensity()

Returns the stored fluid density.

public voidSetCoB(const ignition::math::Vector3d & _centerOfBuoyancy)

Sets the position of the center of buoyancy on the body frame.

public ignition::math::Vector3dGetCoB()

Returns the stored center of buoyancy.

public voidSetGravity(double _g)

Set acceleration of gravity.

public doubleGetGravity()

Get stored acceleration of gravity.

public voidSetBoundingBox(const ignition::math::Box & _bBox)

Sets bounding box.

public voidSetStoreVector(std::string _tag)

Adds a field in the hydroWrench map.

public ignition::math::Vector3dGetStoredVector(std::string _tag)

Get vector from the hydroWrench map.

public voidSetDebugFlag(bool _debugOn)

Set debug flag to store intermediate forces and torques.

public boolIsSubmerged()

Returns true if the robot is completely submerged.

public boolIsNeutrallyBuoyant()

Returns true if the link was set to be neutrally buoyant.

public boolGetDebugFlag()

Returns the debug flag.

public voidSetNeutrallyBuoyant()

Sets this link as neutrally buoyant.

protected doublevolume

Volume of fluid displaced by the submerged object.

protected doublescalingVolume

Scaling factor for the volume.

protected doubleoffsetVolume

Offset for the volume.

protected doublefluidDensity

Fluid density.

protected doubleg

Acceleration of gravity.

protected ignition::math::Vector3dcenterOfBuoyancy

Center of buoyancy in the body frame.

protected ignition::math::BoxboundingBox

TEMP for calculation of the buoyancy force close to the surface.

protected std::map< std::string, ignition::math::Vector3d >hydroWrench

Storage for hydrodynamic and hydrostatic forces and torques for debugging purposes.

protected booldebugFlag

Debug flag, storing all intermediate forces and torques.

protected boolisSubmerged

Is submerged flag.

Pointer to the correspondent robot link.

protected boolneutrallyBuoyant

If true, the restoring force will be equal to the gravitational.

protected doublemetacentricWidth
protected doublemetacentricLength

Metacentric length of the robot, used only for surface vessels and floating objects.

protected doublewaterLevelPlaneArea

If the cross section area around water level of the surface vessel is not given, it will be computed from the object's bounding box.

protected doublesubmergedHeight

Height of the robot that is submerged (only for surface vessels)

protected boolisSurfaceVessel

Flag set to true if the information about the metacentric width and height is available.

protected boolisSurfaceVesselFloating

Flag set to true if the vessel has reached its submerged height.

protected voidStoreVector(std::string _tag,ignition::math::Vector3d _vec)

Store vector in the hydroWrench map if the field has been created.