IsaacLab icon indicating copy to clipboard operation
IsaacLab copied to clipboard

[Question] Adding friction properties to terrain imported from .obj file

Open saichand44 opened this issue 8 months ago • 1 comments

Hi,

For my project, I am using a non-planar surface (generated using python script + blender). I have successfully converted the .obj file to .usd using MeshConverterCfg.

non_planar_terrain_path = f"{ROBORACER_ASSETS_DATA_DIR}/terrains/bump_track.obj"
usd_filename = non_planar_terrain_path.split("/")[-1].split(".")[0]
dest_usd_path = f"{ROBORACER_ASSETS_DATA_DIR}/terrains/{usd_filename}/"

NON_PLANAR_TERRAIN_CFG = MeshConverterCfg(
    mass_props=None,
    rigid_props=None,
    collision_props=sim_utils.CollisionPropertiesCfg(collision_enabled=True),
    asset_path=non_planar_terrain_path,
    force_usd_conversion=True,
    usd_dir=dest_usd_path,
    usd_file_name=usd_filename,
    make_instanceable=True,
    collision_approximation="meshSimplification",
    translation=(0.0, 0.0, 0.0),
    rotation=(0.5, 0.5, -0.5, -0.5),
    scale=(1.0, 1.0, 1.0),
)

Then, I used it with TerrainImporterCfg using the following command

    terrain = TerrainImporterCfg(
        prim_path="/World/NonPlanarSurface",
        terrain_type = "usd",
        usd_path=NON_PLANAR_TERRAIN_CFG.usd_dir + NON_PLANAR_TERRAIN_CFG.usd_file_name + ".usd",

        # This parameter is used only when the terrain_type is “generator” or “plane”.
        physics_material=sim_utils.RigidBodyMaterialCfg(
            friction_combine_mode="average",
            restitution_combine_mode="average",
            static_friction=1.0,
            dynamic_friction=1.0,
        ),
        debug_vis=True
    )

But from the documentation of TerrainImporterCfg, I found that physics_material is only applicable when terrain_type is “generator” or “plane”.

I want to avoid defining the friction properties in Isaac Sim GUI or blender; instead, I want to define them within the Python script I currently use for Isaac Sim. I would appreciate if I can get some direction on this.

saichand44 avatar Apr 21 '25 19:04 saichand44

Thanks for posting this question. The properties would have to be defined in the USD file. We area aware of the advantage of doing this programatically, and the team will review this as a proposal towards a possible enhancement in the future.

RandomOakForest avatar Apr 25 '25 22:04 RandomOakForest