• Nicola Loi's avatar
    Fixes infinite loop in repeated_objects_terrain: respawn only wrong object samples (#1612) · 7ed94ce5
    Nicola Loi authored
    # Description
    
    Currently, the
    [`repeated_objects_terrain`](https://github.com/isaac-sim/IsaacLab/blob/v1.4.0/source/extensions/omni.isaac.lab/omni/isaac/lab/terrains/trimesh/mesh_terrains.py#L721)
    function attempts to respawn all *N* required objects if even a single
    object lies within the central platform. However, the probability of
    successfully spawning *all objects* outside the central platform depends
    on the object density (i.e., the number of required objects relative to
    the terrain size) and the size of the central platform. For high object
    densities, this probability quickly approaches zero, causing the
    function to enter an infinite respawn loop.
    
    This PR addresses the issue by respawning only the objects that lie
    within the central platform during each loop, while leaving objects
    outside the platform untouched. This leads to faster terrain generation
    and prevents the worst-case scenario of getting stuck in an infinite
    respawn loop when object density is high.
    
    ## Type of change
    
    <!-- As you go through the list, delete the ones that are not
    applicable. -->
    
    - Bug fix (non-breaking change which fixes an issue)
    
    
    ## Checklist
    
    - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
    `./isaaclab.sh --format`
    - [ ] I have made corresponding changes to the documentation
    - [x] My changes generate no new warnings
    - [ ] 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
    - [x] I have added my name to the `CONTRIBUTORS.md` or my name already
    exists there
    
    <!--
    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
    -->
    
    ---------
    Signed-off-by: 's avatarNicola Loi <nicolaloi@outlook.com>
    7ed94ce5
Name
Last commit
Last update
..
omni.isaac.lab Loading commit data...
omni.isaac.lab_assets Loading commit data...
omni.isaac.lab_tasks Loading commit data...