gz-sim
gz-sim copied to clipboard
Adding thrust coefficient calculation
Signed-off-by: Marco A. Gutierrez [email protected]
🎉 New feature
Work towards https://github.com/osrf/lrauv/issues/225
Summary
Thrust coefficient in Thruster plugin can only be set to a fixed number, by default 1. This PR adds a calculation that makes it depend on the velocity of the vehicle. The calculation implemented here is based Fossen's equations described in "Guidance and Control of Ocean Vehicles".
Test it
Checklist
- [x] Signed all commits for DCO
- [ ] Added tests
- [ ] Added example and/or tutorial
- [x] Updated documentation (as needed)
- [ ] Updated migration guide (as needed)
- [ ] Consider updating Python bindings (if the library has them)
- [x]
codecheck
passed (See contributing) - [x] 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.
Codecov Report
Merging #1652 (b051ef0) into ign-gazebo6 (69e7757) will increase coverage by
0.03%
. The diff coverage is85.18%
.
@@ Coverage Diff @@
## ign-gazebo6 #1652 +/- ##
===============================================
+ Coverage 64.69% 64.73% +0.03%
===============================================
Files 321 321
Lines 26062 26155 +93
===============================================
+ Hits 16862 16931 +69
- Misses 9200 9224 +24
Impacted Files | Coverage Δ | |
---|---|---|
src/systems/thruster/Thruster.cc | 89.50% <85.18%> (-0.87%) |
:arrow_down: |
src/SimulationRunner.cc | 90.93% <0.00%> (-0.96%) |
:arrow_down: |
src/gui/plugins/scene_manager/GzSceneManager.cc | 17.58% <0.00%> (-0.60%) |
:arrow_down: |
.../systems/triggered_publisher/TriggeredPublisher.cc | 83.28% <0.00%> (-0.38%) |
:arrow_down: |
.../systems/triggered_publisher/TriggeredPublisher.hh | 100.00% <0.00%> (ø) |
|
src/rendering/RenderUtil.cc | 39.01% <0.00%> (+0.11%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:man_farmer: Hi there!
I was taking a look at this issue on the buildfarm and I noticed we have a new gcc warning.
- Gcc warning:
comparing floating point with == or != is unsafe [-Wfloat-equal] 247 | if (_calculateCoefficient && angularVelocity != 0) | ^
On thruster.cc:247.
Do you mind taking a look at how to solve/supress it? Thanks
Do you mind taking a look at how to solve/supress it? Thanks
I think that @ahcorde arrived to this https://github.com/gazebosim/gz-sim/pull/1754