Skip to content

Ideas for Gaussian Splatting Shader Plugin for Gazebo #1116

@anshium

Description

@anshium

This is related to the project titled, "Gaussian Splatting Shader Plugin for Gazebo". I have spent quite some time thinking about how to go about it, some nuances and some optimizations that can be done to make it render faster.

Here, I propose a method to implement this. I am very interested in working on this problem because I really like the idea of super-realistic simulations with robots. Most simulators I have worked with (PyBullet, Isaac Gym, Isaac Sim, MuJoCo, ManiSkill, and, of course, Gazebo!) have visually appealing scenes. However, achieving super-realistic simulations and directly mapping them to a real-world outdoor scene using Gaussian splats would be a really cool feature.

I would love to receive suggestions on this.

The Flow

I propose the following process flow to implement the Gaussian Splatting Shader Plugin. (plantuml link)

Image

Explanation of the Process Flow

  1. We can have the user load the SfM points (Structure from Motion, already generated using COLMAP, etc.) and take this point cloud as an input for initialization. Or, alternatively import pre-saved splats from a file.
  2. If SfM is loaded, we would extract the 3D points and Camera poses from that data and initialize the Gaussian Splats.
  3. After this, we will start the main process that would load the splat data, initialize OpenGL buffers and potentially put these on an available GPU. (I think if GPU is not available, we can either try on CPU or tell the user that the feature would only be possible to be used with a GPU setup - I am not too sure about which one would be a better option)
  4. Then, for the duration of the simulation, as the camera moves, we would use the conventional 3D Gaussian Splatting technique which involves optimizing iteratively by
    • Projecting to Camera View and
    • Adaptive Density Control
  5. Then finally using the Differentiable Tile Rasterizer to project it to the image plane, given the camera position + orientation.
  6. Cleaning GPU buffers would be an important step to do after the simulation is quit.

Optimization Techniques

  1. Level of Detail (LOD) - reduces far-away splats while keeping high detail for close splats.
  2. Frustum Culling (removing splats out of view with the current camera and FOV)

Code Structure and Organisation

This is one of the initial, crude way of implementing the above. Changes might be needed as the project progresses. (plantuml link)

Image

More points

  1. Since this technique makes the rendered scenes directly editable (because we can just modify the splats), we can also perhaps include a feature to edit a scene mid-simulation (e.g., removing a bush that comes in the way of a ground robot). This would be a cool addition.
  2. This would have to be coupled with a ROS2 package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions