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

Using the VBS to sink causes the vehicle to translate forwards and go into a spin. #47

Open
arjo129 opened this issue Oct 13, 2021 · 7 comments

Comments

@arjo129
Copy link
Member

arjo129 commented Oct 13, 2021

How to reproduce:

In one terminal:

ign gazebo -v4 buoyant_tethys.sdf

In another:

ign topic -t  /model/tethys/buoyancy_engine/ -m ignition.msgs.Double -p "data: 0"

Expected behavior

The vehicle pitches a little bit and then sinks mostly vertically.

Current behaviour

Peek 2021-10-13 14-18
The vehicle sinks but keeps getting pushed backwards, this is likely to some weird numerical issue.

@arjo129
Copy link
Member Author

arjo129 commented Oct 13, 2021

Spinning in yaw seems to be from the Added Mass terms and Translation is from the damping terms.

@chapulina
Copy link
Contributor

The longer picture is also interesting:

image

Another thing that could be related, these are the plots for the horizontal and vertical fins. With the vehicle's movement, they wiggle a bit, pushed by external forces:

image

@arjo129
Copy link
Member Author

arjo129 commented Oct 14, 2021

I've narrowed this down to an issue of transformations. Basically by sprinkling debug statements throughout the course of the Hydrodynamics plugin I get the following:

[Dbg] [HydrodynamicsPlugin.cc:248] Pose Rotation -0 0.105406 0
[Dbg] [HydrodynamicsPlugin.cc:249] Transformed Vel 0.062581 -0 -0.066591
[Dbg] [HydrodynamicsPlugin.cc:250] Original Vel 0.055228 -0 -0.072805
[Dbg] [HydrodynamicsPlugin.cc:321] Original force-0.015606 0 2.6208
[Dbg] [HydrodynamicsPlugin.cc:322] Transformed force0.260217 0 2.60789

The hydrodynamics should produce a force which opposes the direction of motion. This is happening in the local frame correctly, however when we transform back to the global frame we get incorrect results.

@arjo129
Copy link
Member Author

arjo129 commented Oct 14, 2021

This manifests itself when going up using the Buoyancy Engine:
Upward_buoyancy

But does not manifest itself when dropping the drop weight.
drop_weight_hydro

@arjo129
Copy link
Member Author

arjo129 commented Oct 29, 2021

Force visuallizations are very telling of a problem in hydrodynamics. The Blue arrow is hydrodynamic forces. The green arrow buoyancy engine forces.
sinking_lrauv_problem

@braanan
Copy link
Collaborator

braanan commented Oct 29, 2021

HI @arjo129, almost looks like the buoyancy force is stuck in the vehicle frame and not translated into the internal frame — I'd expect the buoyancy force to always work against gravity, regardless of the vehicle's orientation. What do you think?

@arjo129
Copy link
Member Author

arjo129 commented Oct 29, 2021

I checked and its not that. The buoyancy force from the vbs is always pointing opposite gravity. Its not very clear in the video but when I print it I see that its only acting in the Z axis.The hydro on the other hand is all over the place.

@chapulina chapulina transferred this issue from another repository Nov 2, 2021
arjo129 added a commit that referenced this issue Nov 3, 2021
…ss of the baselink back and move the center of mass of the vehicle forward. This helps resolve some of the spinning in #47. It also is based on the actual positions of the robot.

The second change made is an increase in distance between the linkand the center of volume. This helps damp oscillations when running `testPitchMass.xml`.

Additionally, this commit updates the pitchmass plots to contain the Error as well as the current Pitch command.

Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129 added a commit that referenced this issue Nov 3, 2021
…ss of the baselink back and move the center of mass of the vehicle forward. This helps resolve some of the spinning in #47. It also is based on the actual positions of the robot.

The second change made is an increase in distance between the linkand the center of volume. This helps damp oscillations when running `testPitchMass.xml`.

Additionally, this commit updates the pitchmass plots to contain the Error as well as the current Pitch command.

Signed-off-by: Arjo Chakravarty <[email protected]>
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

3 participants