Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buoyancy is not included when the physics is set to "surface" #5

Open
mzhouURI opened this issue Mar 9, 2024 · 3 comments
Open

Buoyancy is not included when the physics is set to "surface" #5

mzhouURI opened this issue Mar 9, 2024 · 3 comments

Comments

@mzhouURI
Copy link

mzhouURI commented Mar 9, 2024

Hi Patryk

Thanks for creating a ROS2 wrapper for stonefish.

I was recently testing our vehicle in stonefish with this ros2 wrapper.
But I encounter a small issue with it.

Description:
I tried to create a cylinder with physics being "surface" and buoyant set to "true".
But seems like the buoyancy is not computed in this case.

The surface body(with buoyant set to true) was previously used to mimic buoyancy foams placed inside the AUV. So they only provide buoyancy instead of hydrodynamic forces.

Maybe, it is due to some recent updates in stonefish, such that the buoyancy is only computed for floating and submerged bodies?

To replicate this problem, you can add a dynamic body in the scenario file as follows.
Our density for the foam is 370kg/m^3.
When physics="surface", the cylinder will sink.
If phyiscs="submerged", the cylinder will float, however, hydrodynamic force will be included.

	<dynamic name="Cyl" type="cylinder" physics="surface" buoyant="true">
    	  <dimensions radius="1.0" height="2.0"/>
    	  <origin xyz="4.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
    	  <material name="Foam"/>
    	  <look name="yellow"/>
    	  <world_transform xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
	</dynamic>

Thank you very much in advance.

MIngxi

@Michele1996
Copy link

Michele1996 commented Jan 8, 2025

Hello Mr Zhou,
I don't know if you already solved the issue but with reference to :https://stonefish.readthedocs.io/en/latest/bodies.html#physics-mode

  • surface mode: no aerodynamic or hydrodynamic forces computed
  • floating mode: buoyancy and hydrodynamic drag is computed, no added mass effect

If you put "floating" it will work

@mzhouURI
Copy link
Author

mzhouURI commented Jan 8, 2025

Hi Michele,

I changed the setting to FLOATING and it works.

The reason I want to include buoyancy for SURFACE is to create additional buoyancy to the robot without adding added mass or hydrodynamic drag.
This is analogous to adding foams in the flooding section of an AUV.

I think this was available in older version of stonefish but was changed recently.
Maybe it is possible to keep this feature?

Regards,
Mingxi

@Michele1996
Copy link

No problem, I'll have a look at that and come back to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants