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

Adds support for ocean currents #800

Merged
merged 16 commits into from
May 21, 2021
Merged

Adds support for ocean currents #800

merged 16 commits into from
May 21, 2021

Conversation

arjo129
Copy link
Contributor

@arjo129 arjo129 commented May 3, 2021

Signed-off-by: Arjo Chakravarty [email protected]

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

🎉 New feature

Closes #

Summary

Adds support for ocean currents to the hydrodynamics plugin. It also adds an optional support for namespaces.

The behaviour of the <namespace> parameters is described as follows:

  ///   <namespace> - This allows the robot to have an individual namespace for
  ///     current. This is useful when you have multiple vehicles in different
  ///     locations and you wish to control the currents of each vehicle
  ///     separately. If no namespace is given then the plugin listens on
  ///     the `/ocean_current` topic for a `Vector3d` message. Otherwise it
  ///     listens on `/model/{namespace name}/ocean_current`.[String, Optional]

Test it

To test run:

ign gazebo auv_controls.sdf

And apply a really strong current:

ign topic -t /ocean_current -m ignition.msgs.Vector3d -p 'x: 10, y:0, z:0'

ocean_currents

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

arjo129 added 2 commits May 3, 2021 13:41
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129 arjo129 requested review from caguero and mabelzhang May 3, 2021 06:04
@arjo129 arjo129 requested a review from chapulina as a code owner May 3, 2021 06:04
@github-actions github-actions bot added the 🏢 edifice Ignition Edifice label May 3, 2021
arjo129 added 2 commits May 3, 2021 14:18
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
@caguero
Copy link
Contributor

caguero commented May 6, 2021

I added very minor tweaks in 20b57f9.

Copy link
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

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

My main suggestion is to also support the ability to set the current via SDF. This way, we'll cover the most common use case without having to send any additional messages. Remember to document the extra parameter as well.

arjo129 added 2 commits May 7, 2021 15:50
Signed-off-by: Arjo Chakravarty <[email protected]>
…-gazebo into arjo/ocean_currents

Signed-off-by: Arjo Chakravarty <[email protected]>
@arjo129
Copy link
Contributor Author

arjo129 commented May 7, 2021

I've added a <defaultCurrent> field.

  ///   <defaultCurrent> - A generic current.
  ///      [vector3d m/s, optional, default = [0,0,0]m/s]

Copy link
Contributor

@caguero caguero left a comment

Choose a reason for hiding this comment

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

Very minor request, other than that looks good.

src/systems/hydrodynamics/Hydrodynamics.hh Outdated Show resolved Hide resolved
arjo129 added 4 commits May 9, 2021 08:55
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Copy link
Contributor

@mabelzhang mabelzhang left a comment

Choose a reason for hiding this comment

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

Nits.

src/systems/hydrodynamics/Hydrodynamics.hh Show resolved Hide resolved
src/systems/hydrodynamics/Hydrodynamics.hh Outdated Show resolved Hide resolved
src/systems/hydrodynamics/Hydrodynamics.hh Show resolved Hide resolved
@arjo129 arjo129 requested a review from caguero May 19, 2021 01:26
@mabelzhang
Copy link
Contributor

mabelzhang commented May 19, 2021

CI looks passing. I think Windows is disabled (thanks to the awesome new CI documentation in ignitionrobotics/docs/ci.md!), and the failing tests on Mac I've seen before. The push test is complaining about PERFORMANCE_each, which... should be okay?

I haven't tried the PR itself, but we should probably add some integration tests next time (if it's possible to test with some known numbers?), to make sure we don't break stuff with new features.

(I will try it in Fortress once it's forward ported 😅 I don't have a local Edifice build at the moment.)

@arjo129
Copy link
Contributor Author

arjo129 commented May 21, 2021

DCO won't let me merge. @caguero I think you need to sign the last commit.

@arjo129 arjo129 enabled auto-merge (squash) May 21, 2021 07:18
@arjo129 arjo129 merged commit f4d2a39 into ign-gazebo5 May 21, 2021
@arjo129 arjo129 deleted the arjo/ocean_currents branch May 21, 2021 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants