osrf / gzweb

Web client for Gazebo classic simulation
http://gazebosim.org/gzweb
Other
62 stars 60 forks source link

gzweb models white or non-existent (both custom and standard) #226

Closed IanBurwell closed 1 year ago

IanBurwell commented 2 years ago

I want to use gzweb with a custom docker image I've been using for a while, as gzclient and x-passthrough are quite slow on windows (WSL technically, but still). I have followed the tutorial linked in the README and have set GAZEBO_MODEL_PATH to include my custom models. When I connect to gzweb, however, my world is completely textureless, my robot is invisible, and other models I add in seem to have a 50% chance of having textures. Where did I go wrong?

gzclient: Gazebo

gzweb: gweb1

gzweb when I add premade models: gzweb2

Only error messages I could find were of the form: errs

My system:

iche033 commented 2 years ago

looks like the missing textures are the ones distributed by gazebo. It could be that the media directory is not copied into gzweb's assets folder. One thing to check is that after sourcing the setup.sh file, make sure that gazebo's media directory is in GAZEBO_RESOURCE_PATH before running the deploy step.

One workaround is just to manually copy the media folder as suggested in: https://osrf-migration.github.io/gzweb-gh-pages/#!/osrf/gzweb/issues/61/page/1

IanBurwell commented 2 years ago

On further inspection, these were not copied over due to gweb not finding python at /usr/bin/python. I created a symlink between there and /usr/bin/python2.7 and it seems to run the scripts now. When building, I run into the below error, but most functionality seems to work. Now, however, I am getting black objects. Any ideas?

_Edit: The error was being caused by a local gazebo library, and removing that from GAZEBO_MODELS_PATH fixed it_

convert-im6.q16: unable to open image `Color.png': No such file or directory @ error/blob.c/OpenBlob/2874.
convert-im6.q16: no images defined `/Color.png' @ error/convert.c/ConvertImageCommand/3258.
error Command '['convert', 'Color.png', '/Color.png']' returned non-zero exit status 1
Traceback (most recent call last):
  File "./webify_models_v2.py", line 44, in <module>
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['convert', 'Color.png', '/Color.png']' returned non-zero exit status 1
Done

blackcabinets

iche033 commented 2 years ago

looks like some textures failed to convert / copy over to the assets directory. If you open the browser developer tools and look the console tab, it may show that resources failed to load and where gzweb expects to download them from. You can manually copy those textures over to the corresponding model folder in httpt/client/assets and restart gzweb. You can ignore the 0.png ones if they exist in the console as they are related to thumbnails.

IanBurwell commented 1 year ago

I am no longer working on the project where I had this issue. Closing for now.