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

Investigate weird oscillation in main #49

Closed
arjo129 opened this issue Oct 15, 2021 · 8 comments · Fixed by #89
Closed

Investigate weird oscillation in main #49

arjo129 opened this issue Oct 15, 2021 · 8 comments · Fixed by #89

Comments

@arjo129
Copy link
Member

arjo129 commented Oct 15, 2021

No description provided.

@chapulina
Copy link
Contributor

Are you referring to this?

Peek 2021-10-27 15-29

I've been looking into our collision shapes (which affect buoyancy), and I noticed that their shapes and placements are a bit unusual:

image

image

Looking at #5, it looks like these shapes have been manually picked to provide stability. In fact, I tried disabling buoyancy for just one of the fins, and that makes a huge difference for stability:

nofinbuoyancy

diff --git a/lrauv_ignition_plugins/worlds/buoyant_tethys.sdf b/lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
index e3bc998..09a1773 100644
--- a/lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
+++ b/lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
@@ -29,6 +29,11 @@
     <plugin
       filename="ignition-gazebo-buoyancy-system"
       name="ignition::gazebo::systems::Buoyancy">
+      <enable>tethys::base_link</enable>
+      <!--enable>tethys::horizontal_fins</enable-->
+      <enable>tethys::vertical_fins</enable>
+      <enable>tethys::propeller</enable>
+      <enable>tethys::buoyancy_engine</enable>
       <!-- TODO: fix behaviour near surface, see https://github.com/osrf/lrauv/issues/102
         <graded_buoyancy>
         <default_density>1000</default_density>

Should we revisit the collisions now that we have more forces involved? My first suggestion would be to reduce complexity by removing all collisions except for main_body_buoyancy. I don't think we're interested in the collisions being actually used to calculate contact, right?

@arjo129
Copy link
Member Author

arjo129 commented Oct 29, 2021

The collisions determine the buoyancy (This is why I was advocating for a separate <buoyancy> tag in sdformat...). Removing any of the collisions will destabilize the vehicle as the weight of the fins will create a torque which will not be counteracted by the main body buoyancy (I've been here before).

@chapulina
Copy link
Contributor

the weight of the fins will create a torque which will not be counteracted by the main body buoyancy

So you mean that the volume of each part has been fine-tuned so that its buoyancy offsets its weight? Or at least that this is what we're going for? If so, I'd like to write some tests and documentation to make sure we keep them this way.

@arjo129
Copy link
Member Author

arjo129 commented Oct 29, 2021 via email

@arjo129
Copy link
Member Author

arjo129 commented Oct 29, 2021 via email

@chapulina
Copy link
Contributor

the volume of each part has been fine-tuned so that its buoyancy offsets its weight?

I started poking around and I think it may not be that simple. I believe the vehicle should be statically stable with:

  • ⬆️ forces: buoyancy on all parts + neutral buoyancy engine
  • ⬇️ forces: weight of all parts, including drop-weight

If that's correct, I'd expect the vehicle to be stable (completely still?) if I remove the following plugins (which I believe only apply when the vehicle is in motion):

  • joint controllers
  • thruster
  • lift-drag
  • hydrodynamics

and all that's left are

  • buoyancy
  • buoyancy engine
  • detachable joint (holding drop weight)

I'd expect the vehicle to be stable in this configuration, but it currently sinks.

@chapulina chapulina transferred this issue from another repository Nov 2, 2021
@braanan
Copy link
Collaborator

braanan commented Nov 12, 2021

@chapulina @arjo129 Does this jittery oscillation also happen at depth or is it just on the surface? Is the buoyancy plugin accounting for partially submerged volumes etc? Thanks

@chapulina
Copy link
Contributor

Does this jittery oscillation also happen at depth or is it just on the surface? Is the buoyancy plugin accounting for partially submerged volumes etc?

We have uniform buoyancy everywhere right now, no distinction between water and air until #38 is addressed. So the depth shouldn't make a difference here.

@arjo129 arjo129 linked a pull request Nov 25, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants