Skip to content
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

Bug when rendering the home scenes #41

Open
MiangChen opened this issue Mar 9, 2025 · 11 comments
Open

Bug when rendering the home scenes #41

MiangChen opened this issue Mar 9, 2025 · 11 comments
Assignees

Comments

@MiangChen
Copy link

Ubuntu 20.04
IsaacSim 4.2.0

The table_scene.usd can be rendered properly:

python toolkits/grscenes_scripts/play_scene.py -f /home/ubuntu/PycharmProjects/GRUtopia/grutopia/assets/scenes/demo_scenes/franka_mocap_teleop/table_scene.usd

Image

However, when I try the scene in the commercial and home scenes, there is nothing:

 python toolkits/grscenes_scripts/play_scene.py -f /home/ubuntu/PycharmProjects/GRUtopia/grutopia/assets/scenes/GRScenes-100/home_scenes/scenes/MV7J6NIKTKJZ2AABAAAAADA8_usd/start_result_raw.usd

Image

and the error occurs:

2025-03-09 14:33:20 [7,087ms] [Error] [omni.usd] USD_MDL: in LoadModule at line 247 of ../../source/plugins/usdMdl/neuray.cpp -- 'rtx::neuraylib::MdlModuleId' for 'Materials/DayMaterial.mdl' is Invalid

2025-03-09 14:33:20 [7,087ms] [Error] [omni.usd] USD_MDL: in GetSdrFromDiscoveryResult at line 178 of ../../source/plugins/usdMdl/moduleRegistry.cpp -- Module: 'Materials/DayMaterial.mdl' with version '1' not found in 'MdlModuleRegistry::ModuleDataMap'.

2025-03-09 14:33:20 [7,087ms] [Error] [omni.hydra] Failed to create MDL shade node for prim '/Root/Looks/DayMaterial/DayMaterial'. Empty identifier: ''         and/or subIdentifier: ''
@MiangChen
Copy link
Author

MiangChen commented Mar 9, 2025

I have try the method 2 in #30 (comment)

from pxr import Usd

stage = Usd.Stage.Open("/home/ubuntu/PycharmProjects/GRUtopia/grutopia/assets/scenes/GRScenes-100/home_scenes/scenes/MV7J6NIKTKJZ2AABAAAAADA8_usd/start_result_raw.usd")
hdr_prim = stage.GetPrimAtPath("/Root/__default_setting/HDR_Sphere")
hdr_prim.SetActive(False)
stage.GetRootLayer().Save()

Image

the error disappers, but there is still nothing:

Image

@HanqingWangAI
Copy link
Collaborator

Hi @MiangChen, the black screen might be caused by the poor pose of the perspective camera. You may expand the stage panel on the right, select an object, and then press the F key to align the current camera to that object. Thus you can check whether the scene is correctly loaded.

@MiangChen
Copy link
Author

Hi @MiangChen, the black screen might be caused by the poor pose of the perspective camera. You may expand the stage panel on the right, select an object, and then press the F key to align the current camera to that object. Thus you can check whether the scene is correctly loaded.

hi, I try this, and I can see a coordinate system indicating the position of that thing, but they are not rendered properly.

2025.03.10.08.41.22.webm

@HanqingWangAI
Copy link
Collaborator

It seems that the references are broken. Can you check the existence of the referred usd files? You can find the reference path in the Property panel.

@MiangChen
Copy link
Author

MiangChen commented Mar 10, 2025

thanks, I check the reference path, and there is some error.
the origin reference path is models/layout/articulated……, so the usd and mdl files cann't be found.

Image

and I change the true usd path to ../../models/layout/articulated…… manually, then the cabinet can be found and rendered.

Image

the content in the modesl is ../../models and in the Materials is ../../Materials:

Image

but this files doesn't work for some reason, so the scenes are not rendered properly.
I will try to find the reason today.

@HanqingWangAI
Copy link
Collaborator

Hi @MiangChen , thank you for the details about the issue. It is caused due to the broken symlinks of the Materials and models folder. You can fix this by rebuilding the symlinks. Note that the simlinks are not only under the individual scene folders, there are also simlinks pointing to Materials folder for each model instance under models/{type}/{category}/{instance} for proper scene loading and rendering.

@HanqingWangAI
Copy link
Collaborator

Hi @tianshihan818 , can you provide a script for automatic symlink fixing?

@MiangChen
Copy link
Author

MiangChen commented Mar 11, 2025

Hi @MiangChen , thank you for the details about the issue. It is caused due to the broken symlinks of the Materials and models folder. You can fix this by rebuilding the symlinks. Note that the simlinks are not only under the individual scene folders, there are also simlinks pointing to Materials folder for each model instance under models/{type}/{category}/{instance} for proper scene loading and rendering.

Hi @tianshihan818 , can you provide a script for automatic symlink fixing?

tks, looking forward to the script for repair. I can help test the effect later if necessary.

@tianshihan818
Copy link
Collaborator

@MiangChen Hello! Thanks for your feedback! You could try this script to fix/recreate the symlinks inside the scenes folder:

import os


def create_symlinks(scenes_folder):
    if not os.path.exists(scenes_folder):
        raise FileNotFoundError(f"scenes_folder {scenes_folder} not found!")
    
    models_dir = os.path.abspath(os.path.join(scenes_folder, 'models'))
    scenes_dir = os.path.abspath(os.path.join(scenes_folder, 'scenes'))
    materials_dir = os.path.abspath(os.path.join(scenes_folder, 'Materials'))

    # create "Materials" symlink in models_dir
    for root, _, files in os.walk(models_dir):
        for _ in files:
            link_path = os.path.join(root, "Materials")
            materials_dir_relpath = os.path.relpath(materials_dir, root)
            if not os.path.islink(link_path):
                os.symlink(materials_dir_relpath, link_path)
    
    # create "Materials" and "models" symlink in scenes_dir
    for root, _, files in os.walk(scenes_dir):
        for _ in files:
            materials_link_path = os.path.join(root, "Materials")
            models_link_path = os.path.join(root, "models")
            materials_dir_relpath = os.path.relpath(materials_dir, root)
            models_dir_relpath = os.path.relpath(models_dir, root)
            if not os.path.islink(materials_link_path):
                os.symlink(materials_dir_relpath, materials_link_path)
            if not os.path.islink(models_link_path):
                os.symlink(models_dir_relpath, models_link_path)


SCENES_FOLDER = 'commercial_scenes'
create_symlinks(SCENES_FOLDER)

@m-muaz
Copy link

m-muaz commented Mar 12, 2025

Hi @HanqingWangAI, I am facing somewhat similar issue. When I try to play the table scene given in demo franka scene dir via the command

python toolkits/grscenes_scripts/preprocess.py -f /root/Documents/grutopia_assets/scenes/demo_scenes/franka_mocap_teleop/table_scene.usd -i

Then streaming client does not display anything and the logs I see on terminal are the following:

Image

I also tried to load the usd file through this method (#41 (comment)) but then I get this error:

Image

Is there anything I am doing wrong here?@MiangChen can you guide me as how you are able to play the scene? Any help will be appreciated!

(P.S: I downloaded the assets at a different directory but I ran the python grutopia/set_assets.py to set the assets location and I also added the link to scene materials in the bashrc file (pic attached below)

Image

@MiangChen
Copy link
Author

MiangChen commented Mar 13, 2025

hi, @m-muaz I try your command in my terminal, and the error is No preprocess method specified!

python toolkits/grscenes_scripts/preprocess.py -f /home/ubuntu/PycharmProjects/GRUtopia/grutopia/assets/scenes/demo_scenes/franka_mocap_teleop/table_scene.usd` 

Image

I try to add a parameter -i , and there is still error:

Image

So I try another command

python toolkits/grscenes_scripts/play_scene.py -f /home/ubuntu/PycharmProjects/GRUtopia/grutopia/assets/scenes/demo_scenes/franka_mocap_teleop/table_scene.usd

Although there would be some red error saying "No space left on device", don't worry, just wait, and then you can see the demo scene.

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants