Giter Site home page Giter Site logo

Comments (7)

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


  • changed milestone from "0.2" to "0.3"

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Brian Bingham (Bitbucket: brian_bingham).


  • set assignee_account_id to "557058:6c52d6e5-77e0-41a8-8b6e-cb9462f4d5f1"
  • set assignee to "brian_bingham (Bitbucket: brian_bingham)"

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


  • changed milestone from "0.3" to "0.5"

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Brian Bingham (Bitbucket: brian_bingham).


Rhys provided a very interesting solution in the asv_wave_sim project. Going through that project, there are two significant innovations:

  1. The visualization and physics share a common wave field. This is done by having a WavefieldModelPlugin associated with the Ocean model. Two WavefieldVisualPlugins request the wave field parameters via Gazebo messages which then drives the OpenGL shader. The HydrodynamicsPlugin associated with the physical objects within the wave field access a shared WavefieldEntity pointer which is used to access a Wavefield object directly from the WavefieldModelPlugin.
  2. The buoyancy calculation is generalized to use triangle meshes as described in Jacques Kerner's two part blog describing boat physics for games - see asv_wave_sim Acknowledgments.

The WAM-V geometry (twin cylindrical hulls) is sufficiently simple that, as a first step, we might consider Rhys's synchronization of the visual and physical (1) without adding the complexity of mesh-based buoyancy (2). This might also allow us to avoid licensing issues associated with using CGAL.

Here is my notes from going through the code...


asv_wave_sim Explanation

Model: ocean_waves

The ocean_waves model includes three plugins:

  1. WavefieldModelPlugin, inherits from ModelPlugin. Instantiates a WavefieldEntity and a Wavefield object. Wave field parameters are passed to the Wavefield object. Subscribes to Gazebo message on ~/request. When receives message, responds on ~/response with wave field parameters.
  2. A WavefieldVisualPlugin for the water surface, inherits from VisualPlugin. Requests wave parameters from the WavefieldModelPlugin via Gazebo message. Uses rendering API to set input parameters to OpenGL shader GernstnerWaves.frag.
  3. Another WavefieldVisualPlugin for below the water surface. Uses the same parameters and shader.

WavefieldModelPlugin, OnUpdate

The update is throttled to a nominal 30 Hz. The WavefieldEntity is updated, which calls the Wavefield Update and UpdateGerstnerWave methods. The Wavfield UpdateGerstnerWave method modifies the underlying CGAL Surface_mesh object based on the Gerstner wave model for the water surface.

Model: box

For objects within the wave field, the HydrodynamicsPlugin, a ModelPlugin, connects the object to the wave field. The wave_model plugin parameter specifies the name of the model that includes the WavefieldModelPlugin.

HydrodynamicsPlugin, Init

Calls InitPhysics() which retrieves the specified ModelPtr by name, which then gets the a pointer to a WavefieldEntity object from within the WavefieldModelPlugin. Finally calls the WavefieldEntity GetWaveField method to return a shared pointer to the Wavefield object.

Creates a vector of HydrodynamicsLinkData objects, one for each link in the model. Each HydrodynamicsLinkData objects includes...

  • WavefieldSampler (Wavefield.hh) pointer
  • Hydrodynamics (Physics.hh) pointer
    • Private data of Hydrodynamics object includes a WavefieldSampler pointer.

HydrodynamicsPlugin, OnUpdate

Calls UpdatePhysics(), which again retrieves the Wavefield object pointer (why do this again?). Then loops through the vector of HydrodynamicsLinkData objects to...

  • Update the each Hydrodynamics.WavefieldSampler
  • Call Hydrodynamics.Update() method which (takes the Hydrodynamics.WavefieldSampler as an input argument?) calculates forces and torques on the link

The above explanation is limited - I may be missing some of the implementation.

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


  • changed milestone from "0.5" to "1.1"

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Brian Bingham (Bitbucket: brian_bingham).


PR #78 looks like a good solution moving forward. We need to update the wave-visualization branch and start working integrating into default.

from vrx.

osrf-migration avatar osrf-migration commented on July 20, 2024

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


  • changed state from "new" to "resolved"

See pull request #107.

from vrx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.