• Mayank Mittal's avatar
    Adds utilities for rough terrain generation (#20) · 24782318
    Mayank Mittal authored
    # Description
    
    <!--
    Thank you for your interest in sending a pull request. Please make sure
    to check the contribution guidelines.
    
    Link: https://isaac-orbit.github.io/orbit/source/refs/contributing.html
    -->
    
    This PR ports in the functions for procedurally generating different
    terrains. The terrains can be generated as heightfields (2.5 D elevation
    map) or meshes (through `trimesh`).
    
    There are two separate classes:
    * `TerrainGenerator`: This class only procedurally generates terrains
    based on the passed sub-terrain configuration. It creates the trimesh
    object and contains the origins of each terrain in the mesh.
    Additionally, it performs caching of the sub-terrain meshes based on
    their configuration. By default, caching is disabled since most
    developers will change not only the config, but also the function.
    * `TerrainImporter`: This class mainly deals with importing terrains
    from different possible sources and adding them to the simulator. In
    addition to importing terrains, it also stores them into a dictionary
    called `warp_meshes` that later can be used for ray-casting. The types
    of terrain sources are as follows:
    * `import_ground_plane`: creates a grid plane which is default in
    isaacsim/orbit.
        * `import_mesh`: takes a trimesh object
        * `import_usd`: takes a USD file and adds reference to it
    
    <!-- As a practice, it is recommended to open an issue to have
    discussions on the proposed pull request.
    This makes it easier for the community to keep track of what is being
    developed or added, and if a given feature
    is demanded by more than one party. -->
    
    ## Type of change
    
    <!-- As you go through the list, delete the ones that are not
    applicable. -->
    
    - New feature (non-breaking change which adds functionality)
    
    ## Screenshots
    
    
    ![terrains](https://github.com/isaac-orbit/orbit/assets/12863862/05f889d0-b98e-4063-a810-89d9116c2dfe)
    
    <!--
    Example:
    
    | Before | After |
    | ------ | ----- |
    | _gif/png before_ | _gif/png after_ |
    
    To upload images to a PR -- simply drag and drop an image while in edit
    mode and it should upload the image directly. You can then paste that
    source into the above before/after sections.
    -->
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./orbit.sh --format`
    - [x] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [x] I have added tests that prove my fix is effective or that my
    feature works
    - [x] I have updated the changelog and the corresponding version in the
    extension's `config/extension.toml` file
    
    <!--
    As you go through the checklist above, you can mark something as done by
    putting an x character in it
    
    For example,
    - [x] I have done this task
    - [ ] I have not done this task
    -->
    24782318
Name
Last commit
Last update
..
_static Loading commit data...
api Loading commit data...
features Loading commit data...
refs Loading commit data...
setup Loading commit data...
tutorials Loading commit data...
tutorials_envs Loading commit data...