NVlabs / sim-web-visualizer

Web Based Visualizer for Simulation Environments
MIT License
287 stars 9 forks source link

404: not found #1

Closed tianhaowuhz closed 1 year ago

tianhaowuhz commented 1 year ago

Hi, I am recently try to use this visualizer, however, no matter where I run the jupyter notebook example of "train_isaacgym_remote_server.ipynb". When click the web url, it will always get "404 not found". Is there something I need to set up? Thank you!

yzqin commented 1 year ago

Hi @tianhaowuhz,

Could you please inform me about your specific scenario? I'm curious to know if you are executing this example on a local machine or a remote server. If it's the latter, you may need to adjust the IP address in the subsequent cell to reflect the IP of your machine where Isaac Gym is operational. For troubleshooting purposes, you can directly access the URL in your browser: http://YOUR_IP_ADDRESS:7000/static/.

# Modify the IP if the jupyter server is not localhost
machine_ip = "127.0.0.1"
web_visualizer.jupyter_cell(url=f"http://{machine_ip}:7000/static/", height=400)

Thanks.

tianhaowuhz commented 1 year ago

I am currently trying to run on local machine. I also test for a more simple example. visualize of URDF. Following the README, I first run "meshcat-server", then run "python render_urdf.py". However, when I try to open the link of "web_url", it shows like this. Screenshot from 2023-08-18 09-15-44 Screenshot from 2023-08-18 09-16-00

yzqin commented 1 year ago

From the details you've shared, a potential cause for the issue could be the absence of the recursive command during the repo installation, leading to the non-installation of the meshcat repo. You can confirm this by checking if the sim-web-visualier/3rd_party/meshcat-python/src/meshcat/viewer directory is either empty or non-existent.

If this is indeed the problem, you can rectify it by reinstalling the package. Start by running git submodule update --init --recursive followed by pip install ..

tianhaowuhz commented 1 year ago

I do find there is no viewer in meshcat-python. However, if I git submodule recursive, the version of the submodule seems not exists. "Fetched in submodule path '3rd_party/meshcat-python', but it did not contain 49471b6866f86be3cd1ea4b8a9b6aeb43be00b69. Direct fetching of that commit failed. "

yzqin commented 1 year ago

Hi @tianhaowuhz ,

Thanks for your information. I just found that the submodule is broken by a recent update to the submodule. This issue is fixed just now e3ca5b25577565542b5425c6fb0744c412987b2b

Please let me know whether you still have the same issue after this update.

Regards, Yuzhe

tianhaowuhz commented 1 year ago

Thank you for your update, I can now successfuly install. However, the same issue still happens.

yzqin commented 1 year ago

Hi @tianhaowuhz , for additional troubleshooting, please try these commands:

conda create -n visualizer_debug_env python=3.8
conda activate visualizer_debug_env
git clone https://github.com/NVlabs/sim-web-visualizer
cd sim-web-visualizer/
git submodule update --init --recursive
pip3 install .
meshcat-server

Subsequently, please open your web browser and verify if the 404 error persists.

The issue might be due to residual cache or unclean uninstallations from your previous environment. Creating a new conda environment could possibly rectify this problem.

tianhaowuhz commented 1 year ago

Thank you for your solution, I have successfully run the code on the local. Howver, when I try to run on remote server, it shows following message image Do you might know the solution to this? Thank you!

tianhaowuhz commented 1 year ago

Thank you for your solution, I have successfully run the code on the local. Howver, when I try to run on remote server, it shows following message image Do you might know the solution to this? Thank you!

I found this might relate to vscode, the origin url has "static", the url after vscode forward port loose this part, and cause such problem.

yzqin commented 1 year ago

Hi @tianhaowuhz ,

Thanks for your update. Maybe I can list this url issue as a common issue in the README so that other people can also get to know about that.

tianhaowuhz commented 1 year ago

Sure. But I still not figure out how to vis web in remote server, I previous thought this is issue with "static" is because when I access the same url without "static" in local machine produce the same issue (e.g., Can "Upgrade" only to "WebSocket"). However, while testing on the server, again, I met the 404 error, even after I reinstall the environment. About the "YOUR_SERVERL_URL" as you mentioned, is this referred to the ip address of the server obtained by "ifconfig" or something else, I am sorry I am not familiar with this.

tianhaowuhz commented 1 year ago

I finally got it worked on server. I think the prolbem is still relate to the following reason, simply reinstall the environment seems will not cover the file that installed without correct file. I only make it work by reset the system on the server. However, if following the readme to install the tools, it will work fine on remote server and local. And either use vscode or ssh to forward port is ok, just need to remember to add "/static/" at the end.

From the details you've shared, a potential cause for the issue could be the absence of the recursive command during the repo installation, leading to the non-installation of the meshcat repo. You can confirm this by checking if the sim-web-visualier/3rd_party/meshcat-python/src/meshcat/viewer directory is either empty or non-existent.

If this is indeed the problem, you can rectify it by reinstalling the package. Start by running git submodule update --init --recursive followed by pip install ..