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

Add surface to buoyancy engine. (retarget fortress) #1298

Merged
merged 7 commits into from
Jan 19, 2022

Conversation

arjo129
Copy link
Contributor

@arjo129 arjo129 commented Jan 18, 2022

🎉 New feature

Summary

The buoyancy engine should stop working when it crosses the water surface.
This PR adds a <surface> tag which stops the buoyancy engine from exerting
an upward force when the vehicle is surfacing.

Test it

To test it run:

ign gazebo buoyancy_engine.sdf

You will see two boxes. The box on the right doesn't have a surface set whereas
the box on the left does. When commanded t go up, the box on the left will rise
till it breaches and then start oscillating around the surface. On the other
hand the box on the right will rise forever as no surface is set.

buoyancy_engine

Enter the following in a separate terminal:

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

The boxes will float up. Note that the box on the left will start oscillating
once it breaches the surface.

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

The boxes will go down.
To see the current volume enter:

ign topic -t  /model/buoyant_box/buoyancy_engine/current_volume -e

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
The buoyancy engine should stop working when it crosses the water surface. This PR adds a `<surface>` tag which stops the buoyancy engine from exerting an upward force when the vehicle is surfacing.

Signed-off-by: Arjo Chakravarty <[email protected]>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jan 18, 2022
@arjo129 arjo129 mentioned this pull request Jan 18, 2022
8 tasks
@arjo129 arjo129 self-assigned this Jan 18, 2022
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #1298 (b30cdcf) into ign-gazebo6 (9cd15fc) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           ign-gazebo6    #1298      +/-   ##
===============================================
+ Coverage        62.24%   62.25%   +0.01%     
===============================================
  Files              278      278              
  Lines            23197    23208      +11     
===============================================
+ Hits             14438    14449      +11     
  Misses            8759     8759              
Impacted Files Coverage Δ
src/systems/buoyancy_engine/BuoyancyEngine.cc 87.36% <100.00%> (+1.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9cd15fc...b30cdcf. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the minor comments addressed

examples/worlds/buoyancy_engine.sdf Outdated Show resolved Hide resolved
examples/worlds/buoyancy_engine.sdf Outdated Show resolved Hide resolved
examples/worlds/buoyancy_engine.sdf Outdated Show resolved Hide resolved
src/systems/buoyancy_engine/BuoyancyEngine.cc Outdated Show resolved Hide resolved
src/systems/buoyancy_engine/BuoyancyEngine.cc Outdated Show resolved Hide resolved
src/systems/buoyancy_engine/BuoyancyEngine.cc Outdated Show resolved Hide resolved
src/systems/buoyancy_engine/BuoyancyEngine.cc Outdated Show resolved Hide resolved
test/integration/buoyancy_engine.cc Outdated Show resolved Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 merged commit 05b9232 into ign-gazebo6 Jan 19, 2022
@arjo129 arjo129 deleted the arjo/surface/6/buoyancy_engine branch January 19, 2022 06:41
@chapulina
Copy link
Contributor

Ouch, didn't notice that the new test is failing on Windows. I'll skip it on #1297

chapulina added a commit that referenced this pull request Jan 20, 2022
@chapulina chapulina mentioned this pull request Jan 20, 2022
7 tasks
arjo129 added a commit to osrf/lrauv that referenced this pull request Jan 24, 2022
This should address #38.  It requires the following upstream fixes and relevant forward ports:

* gazebosim/gz-sim#1297
* gazebosim/gz-sim#1298

⚠️ Do not merge till the CI goes from ❌ to :heavy_checkmark:

Signed-off-by: Arjo Chakravarty <[email protected]>
@osrf-triage
Copy link

This pull request has been mentioned on Gazebo Community. There might be relevant details there:

https://community.gazebosim.org/t/new-ignition-releases-2022-03-01-citadel-edifice-fortress/1313/1

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

Successfully merging this pull request may close these issues.

3 participants