Comments (7)
Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
- changed milestone from "0.2" to "0.3"
from vrx.
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.
Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
- changed milestone from "0.3" to "0.5"
from vrx.
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:
- 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.
- 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:
- 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. - 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. - 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.
Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
- changed milestone from "0.5" to "1.1"
from vrx.
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.
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)
- How to change buoyancy configuration to make my model float HOT 3
- [ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: No module named 'sdformat13' HOT 1
- Linear velocity HOT 2
- the webpage https://github.com/osrf/vrx/wiki/propulsion_characteristics_tutorial is still empty HOT 2
- Fuel world download failed HOT 3
- can't run vrx HOT 2
- What kind of surface water features are available in this framework ? HOT 1
- Error while following tutorials thruster_component_config. HOT 1
- Question of teleop_twist_keyboard HOT 1
- How can I create more WAM-Vs HOT 3
- How to obtain the wamv's real-time position HOT 1
- joint unit HOT 1
- Increasing the Maximum Velocity of USV HOT 3
- Issue about stereo camera info
- Integrating Fathometer
- QOS
- Segmentation Fault in libUSVWind.so Shared Library
- World file did not launch for ignition fortress and ROS2 Galactic ?
- what are the units of the data published?
- Spawning multiple robots in the same aquatic environment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vrx.