-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Allows for custom TerrainGenerator
without modifications of the TerrainImporter
#2487
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
base: main
Are you sure you want to change the base?
Allows for custom TerrainGenerator
without modifications of the TerrainImporter
#2487
Conversation
@@ -108,6 +113,8 @@ def __init__(self, cfg: TerrainGeneratorCfg, device: str = "cpu"): | |||
self.device = device | |||
|
|||
# set common values to all sub-terrains config | |||
from .height_field import HfTerrainBaseCfg # prevent circular import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm how is the circular import happening? Is there a smarter way to avoid this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure because we do a instance checking of a configclass, this usually doesn't work. But open for suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't like the circular import but if you tried other ways and there's no way around then it is what it is :)
NIT: Could you add https://github.com/isaac-sim/IsaacLab/blob/main/docs/source/api/lab/isaaclab.terrains.rst |
@pascal-roth can you please update the changelog as well? Then we can merge this. |
Description
Currently, the
TerrainGenerator
class is hardcoded in theTerrainImporter
. This class resolves this issue and allows for custom implementations.TODO: adjust changelog and versoning after review
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there