-
Notifications
You must be signed in to change notification settings - Fork 34
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
Migrate to Ignition Gazebo #15
Comments
ProgressThis section will be periodically updated to track progress on this issue. wave visualsWIP on branch https://github.com/srmainwaring/asv_wave_sim/tree/feature/ign-garden-wip Initial version of static FFT generated waves:
Update 1Investigated a number of options for dynamic meshes in Ignition with the Ogre2 render engine
ign-dynamic-fftw_v1.mov
Update 2Single OceanTile with dynamic FFT waves and averaged normals using a modified version of ign-dynamic-fftw_v2.movUpdate 3wave shadersIgnition Garden has support for custom shaders using the There are a number of places where changes are required. The following may not be exhaustive:
A proper solution is to modify ignition-gazebo to support multiple visual plugin elements. In the interim a work-around is to re-implement the Fix-it list
Update 4A number of changes in order to support PBS materials. Custom shaders are still not working, but improved visuals are available using PBS materials which supply the bump map and environment map (the mixture of shallow and deep colours is not available with this approach). ign-garden-waves-720p.mov
Next Steps
|
Initial working versionThere are initial versions of all three plugins which allow objects of various shapes to interact with the wave field. There is much to be improved, but the bulk of the conceptual work required to migrate to Ignition is in place. waves model pluginThe waves model system plugin holds a wavefield object and its parameters. The entity component system makes it simpler to manage these objects than in legacy Gazebo. A new component for the wavefield is used to store a weak pointer to the wavefield and then this is registered with a new entity. It can then be retrieved by name from the ECM. This approach appears to work quite well, and eliminates the need for a separate wavefield entity object derived from the physics base model. Outstanding tasks
hydrodynamics pluginThe hydrodynamics system plugin is also substantially reworked from the original. It uses the ECM to retrieve the wavefield component registered by the wave model plugin. Outstanding tasks
|
Scaling to larger environmentsship_and_quadplane_v1_720p.movFor larger models (ships) the ocean will need to be scaled accordingly, while retaining sufficient detail to make the local wave field interesting. Investigate the following:
Some of the ideas listed above are investigated in this ogre-next branch: ogre-next - feature/v2-2-osrf-mac-ocean-compute2 Using textures to store the displacement, normal and tangent maps the trochoid wave example may be extended to a 10km x 10km region using 512m x 512m tiles. In this example the textures are updated in CPU and uploaded to GPU. The underlying vertex structure is a 128 x 128 segment Ogre plane repeated 2*10+1 times in each direction (i.e. 441 tiles). ogre-next-trochoid-texmaps.mov |
FFT generated wave textures with 256m x 256m tiles and 200 x 200 grid segments using 256 x 256 FFT samples. There are some repetition artefacts which are mitigated to some extent by the tile size and viewpoint. ogre_ocean_materials_fft.mov |
New Feature
This issue is to track the migration of the wave simulation and hydrodynamics plugins to Ignition (Garden).
Desired behaviour
The wave visuals and physics behaviour are available in Ignition using the
ogre2
render engine. There should be support for both Linux and macOS (the latter using Metal graphics API).Implementation suggestion
The model and visual plugins from legacy Gazebo will be replaced with system plugins in Ignition. As before three plugins are required:
wave visuals
The wave visuals are perhaps the most challenging change as they require migration to the Ogre2 render engine and integration into the ignition-rendering framework. As with legacy Gazebo, there is no direct support for modifying meshes at run time, with the exception perhaps of the
DynamicRenderable
objects for Ogre and Ogre2 which sit outside the main mesh frameworks fromignition-common
andignition-rendering
.The proposed approach is to first create visuals for a static wave field, which can be done staying within the available mesh and rendering framework and will use the vertex generation from the existing
OceanTile
. Static waves will allow the following to be migrated:wave physics
hydrodynamics physics
Other changes
The migration to Ignition requires such a significant change, it could be regarded as a complete reworking of the library. Other changes that may be included as sub-issues are:
Progress
The text was updated successfully, but these errors were encountered: