-
Notifications
You must be signed in to change notification settings - Fork 276
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
Feature/hydrodynamics #749
Feature/hydrodynamics #749
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good! Thanks for the tutorial and examples. I added some minor suggestions but it's very close.
if (!_ecm.Component<ignition::gazebo::components::WorldPose>( | ||
_entity)) | ||
{ | ||
_ecm.CreateComponent(_entity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, do you need to create this component and the angular velocity one? I don't see where you consume them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WorldPose
is used here: https://github.com/ignitionrobotics/ign-gazebo/pull/749/files/d3049970c7f3feac28b5c96e9d79e6ebee4d3f69#diff-1a4f185dacd3135bdd14923737f61e9be4c2c6358fd334e8c8ed5d9452f77450R244-R248 to calculate the transform between local and global frame.
* init integration setup Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add custom protobuf messages; need to fix include and lib paths Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * Thruster plugin (#10) * fix fluid density Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Finish porting force plugin Signed-off-by: Arjo Chakravarty <arjo129@gmail.com> * fix formula Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * fix propeller spinning direction Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Add plugin Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * update citation Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Style fixes Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * style fixes Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * purposely messing up, so that git will eventually stop being a git and actually correctly sync this file Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Git, stop being a git and sync this file Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * fix line length 🧹 Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * update license 🗝️ Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * whoops wrong location for 🗝️ license Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * update year. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * update year Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * add protobuf messages Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * cleanup Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add initial gps code Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Initial integration work Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Add current state to comms plugin Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Add lat long Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Add proppeller angular velocity Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Adds support for sending commands Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * add mbari operation commands to readme Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * add manual code check scripts Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * Manual style fixes Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * fix crash with fixnan, fix command fields (#17) Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * finish implementation Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * fix compile issues Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Adds plugin to model Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * fix inability to reverse. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * publish sim time in LRAUVState.Header; fix raw pointer in msg Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * fix camel case Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * remove blank lines Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * adds rudder position reporting * added more logs Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Change units to radians Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Add transform for velocity forces. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Adds hydrodynamics Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * remove unessecary debugging stuff Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * clamp thruster value to pid controller to prevent crash Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * expose robot namespace as SDF plugin parameter Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * standardize thruster plugin with Ignition style Signed-off-by: Mabel Zhang <mabel@openrobotics.org> * Added centripetal matrix back in. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Update comments Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * Update constants and set controllers to output in radians per second. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * refactor out ThrustToAngularVec function Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * refactor and fix style Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> * more refactoring Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> Co-authored-by: Mabel Zhang <mabel@openrobotics.org> Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Ashton Larkin <ashton@openrobotics.org> Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
* add enable/disable diffdrive Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * remove debug Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * do not subscribe to enable if topic is empty Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * add test Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * lint and style Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * change enable type to bool and renamed to enabled Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Carlos Agüero <caguero@openrobotics.org> Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Carlos Agüero <caguero@openrobotics.org> Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org>
* 🎈 3.8.0 (#688) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Make it so joint state publisher is quieter (#696) Signed-off-by: Michael Carroll <michael@openrobotics.org> * [BULLET] Making GetContactsFromLastStepFeature optional in Collision Features (#690) * GetContactsFromLastStepFeature made optional Signed-off-by: Tomas Lorente <jtlorente@ekumenlabs.com> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> * Add test for thermal object temperatures below 0 kelvin (#621) Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * Scenebroadcaster sensors (#698) * Add sensors to scene broadcaster Signed-off-by: Nate Koenig <nate@openrobotics.org> * Update src/systems/scene_broadcaster/SceneBroadcaster.cc Co-authored-by: Michael Carroll <michael@openrobotics.org> * Fix codecheck Signed-off-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Michael Carroll <michael@openrobotics.org> * Fix diffuse and ambient values for ackermann example (#707) Signed-off-by: Ammaar Solkar <asketch8@gmail.com> * 🎈 5.0.0 (#731) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Support configuring particle scatter ratio in particle emitter system (#674) * set particle scatter ratio through sdf Signed-off-by: Ian Chen <ichen@osrfoundation.org> * address feedback Signed-off-by: Ian Chen <ichen@osrfoundation.org> * add todo note about merging forward Signed-off-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com> * Update PlaybackScrubber description (#733) Signed-off-by: Ammaar Solkar <asketch8@gmail.com> * Iterate through changed links only in UpdateSim (#678) Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * Do not pass -Wno-unused-parameter to MSVC compiler (#716) Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it> * Use Protobuf_IMPORT_DIRS instead of PROTOBUF_IMPORT_DIRS for compatibility with Protobuf CMake config (#715) Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it> * Fix component inspector shutdown crash (#724) Signed-off-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> * Validate step size and RTF parameters (#740) Only set them if they are strictly positive. Signed-off-by: Luca Della Vedova <luca@openrobotics.org> * Fix compute_rtfs arguments (#737) Signed-off-by: Caio Amaral <caioaamaral@gmail.com> * Fixed collision visual bounding boxes (#746) Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * Fix CMakelists.txt merge Signed-off-by: Nate Koenig <nate@openrobotics.org> * ECM's ChangedState gets message with modified components (#742) * ecm's ChangedState to contain modified components Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * updated log_system test Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * removed unnecessary calls Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> * fixed particle emitter forward playback (#745) Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * Merge pull request #730 from ignitionrobotics/particle_emitter Particle emitter based on SDF * 4 7 0 prep (#755) * Prepare for 4.7.0 Signed-off-by: Nate Koenig <nate@openrobotics.org> * Added placeholder Signed-off-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Nate Koenig <nate@openrobotics.org> * Fix 'invalid animation update data' msg for actors (#754) Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * Update benchmark comparison instructions (#766) (#766) Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * [DiffDrive] add enable/disable (#772) * add enable/disable diffdrive Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * remove debug Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * do not subscribe to enable if topic is empty Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * add test Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * lint and style Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * change enable type to bool and renamed to enabled Signed-off-by: Guillaume Doisy <guillaume.doisy@wyca.fr> * Add odometry publisher system (#547) * Create Initial Odometry Publisher system plugin Add code for initial plugin that gets position from Pose component and calculates velocities based on rolling mean from displacement data. Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> * Remove Linear and Angular Velocity components Also renames frames in Odometry msg to include model name, and makes various style changes. Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> * Get World pose instead of pose of robot base frame Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> * Add documentation for variables and functions Includes minor stylistic changes. Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> * Check for valid odomTopic and update copyright year Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> * Add tests for OdometryPublisherSystem and fix velocity calculation bug Swap X and Y linear velocities when calculating odometry velocities relative to robotBaseFrame. Signed-off-by: Maganty Rushyendra <mrushyendra@yahoo.com.sg> Co-authored-by: ahcorde <ahcorde@gmail.com> * Patch particle emitter2 service (#777) * Patch particle emitter2 service Signed-off-by: Nate Koenig <nate@openrobotics.org> * Remove condition variable Signed-off-by: Nate Koenig <nate@openrobotics.org> * Set emitter frame and relative pose Signed-off-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Nate Koenig <nate@openrobotics.org> * Preparing for 4.8.0 release (#780) Signed-off-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Nate Koenig <nate@openrobotics.org> * 👩🌾 Enable Focal CI (#646) Signed-off-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Michael Carroll <michael@openrobotics.org> * [TPE] Support setting individual link velocity (#427) Signed-off-by: claireyywang <22240514+claireyywang@users.noreply.github.com> Signed-off-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Louise Poubel <louise@openrobotics.org> * Don't store duplicate ComponentTypeId in ECM (#751) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Feature/hydrodynamics (#749) Implement hydrodynamics and thruster plugin. Signed-off-by: Arjo Chakravarty <arjo@openrobotics.org> Co-authored-by: Mabel Zhang <mabel@openrobotics.org> Co-authored-by: Carlos Agüero <caguero@openrobotics.org> * Fix macOS build: components::Name in benchmark (#784) Signed-off-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org> * Fix ColladaExporter submesh index bug (#763) Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com> * 👩🌾 Fix Windows build and some warnings (#782) Signed-off-by: Louise Poubel <louise@openrobotics.org> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> * Prevent crash on Plotting plugin with mutex (#747) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Bump ign-physics version to 3.2 (#792) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Bump to ign-msgs 7.1 / sdformat 11.1, Windows fixes (#758) Signed-off-by: Louise Poubel <louise@openrobotics.org> * Util: Use public API from libsdformat for detecting non-file source (#794) Signed-off-by: Eric Cousineau <eric.cousineau@tri.global> * Fix included nested model expansion in SDF generation (#768) * fixed included nested model expansion Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * added resource path to test Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * use orig URIs & support multi level nesting Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * save fuel version when enabled Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * retrieve uri from map Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * copy included element Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * clear attributes before copying include element Signed-off-by: Jenn Nguyen <jenn@openrobotics.org> * Map canonical links to their models (#736) Signed-off-by: Ashton Larkin <ashton@openrobotics.org> * ColladaExporter, export submesh selected (#802) * Export only submesh if selected * Add test case for the PR * Attempting a unified solution Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com> Co-authored-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Michael Carroll <michael@openrobotics.org> Co-authored-by: Jose Tomas Lorente <jtlorente@ekumenlabs.com> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org> Co-authored-by: Ashton Larkin <ashton@openrobotics.org> Co-authored-by: Nate Koenig <nkoenig@users.noreply.github.com> Co-authored-by: Nate Koenig <nate@openrobotics.org> Co-authored-by: Ammaar Solkar <asketch8@gmail.com> Co-authored-by: Ian Chen <ichen@osrfoundation.org> Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com> Co-authored-by: Silvio Traversaro <pegua1@gmail.com> Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com> Co-authored-by: Luca Della Vedova <luca@openrobotics.org> Co-authored-by: Caio Amaral <caioaamaral@gmail.com> Co-authored-by: Jenn Nguyen <jenn@openrobotics.org> Co-authored-by: G.Doisy <doisyg@users.noreply.github.com> Co-authored-by: Rushyendra Maganty <mrushyendra@yahoo.com.sg> Co-authored-by: Claire Wang <22240514+claireyywang@users.noreply.github.com> Co-authored-by: Arjo Chakravarty <arjo129@gmail.com> Co-authored-by: Mabel Zhang <mabel@openrobotics.org> Co-authored-by: Carlos Agüero <caguero@openrobotics.org> Co-authored-by: Steve Peters <scpeters@openrobotics.org> Co-authored-by: Jorge Perez <j.j.perez13@hotmail.com> Co-authored-by: Eric Cousineau <eric.cousineau@tri.global> Co-authored-by: Jorge Perez <jjperez@ekumenlabs.com>
@arjo129 - opening a discussion on naming for this plugin. I understand that Thrusters are used for underwater propellers enclosed in a cylinder to propel a vehicle forward. However, thrusters are also used in the context of a spacecraft, in which case the dynamics are considerably different. What name should we give to the later case? |
Hi @Pedro-Roque thanks for pointing this out. As this has been merged and in use for several years now it would be difficult to change. I recommend opening a ticket on the issues page so that we can track this conversation. I guess this would have been better served if it was called "MaritimeThruster" instead of "Thruster". Perhaps you can call yours "SpaceThruster"? If you are using RCS then one could call it "RCSThruster". |
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Closes #
Summary
This PR adds support for hydrodynamic simulation of underwater vehicles. It does so by introducing two new plugins. The first consists of a new Hydrodynamics system and a new Thruster system. These systems are based on the equations described in Fossen's "Guidance and Control of Ocean Vehicles".
I've added an example world and tutorial giving more details of how to use the new plugins.
Test it
An example configuration is provided in the examples folder. The example uses the LiftDrag plugin to apply steering controls. It also uses the thruster plugin to propel the craft and the buoyancy plugin for buoyant force. To run the example run.
To control the rudder of the craft run the following
To apply a thrust you may run the following command
The vehicle should move in a circle.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸