Home | Tutorials | Wiki | Issues
Ask Your Question
0

Simulated robot model randomly appears in gzweb-gui

asked 2017-10-02 05:50:44 -0600

wentz gravatar image

Not sure if addressing this question here is the correct place.

I have a custom urdf model which is controlled with some ROS nodes. My plan was to use the gzweb-gui from a docker container to visualize my simulation.

So first (to test it) I installed gzweb on my local machine - Ubuntu 16, Gazebo 7 - and had to do lot of troubleshooting to get it working. Copied the meshes to /http/client/assets, changed package:// to model:// in my urdf and all that stuff and it works well. Just in 1 of 10 cases my robot model did not appear in the gzweb-gui (also in the model tree), but when i moved the robot in translate mode (in the gazebo-gui) the robot suddenly appeared in the web-gui.

To build my docker container - ubuntu 16, ROS Kinetic, Gazebo 7, gzweb - i used the prepared docker files from osrf: https://github.com/osrf/docker_images

I made the setup like on my local machine, but the robot only appears in probably 1 of 10 cases - each case is a new container of the docker image that i builded. I tried some things like restarting gazebo and gzweb, moving the robot with velocity commands, setting position of the robot via the rosservice etc. but nothing helped.

There was also one case when the model showed up in the gzweb-gui and after closing and restarting gzweb it wasnt there anymore.

Did anyone had similar problems? Is there any fix of this?? Thanks for any responses!!!

PS: I need to use gzweb, cause i want to run several docker container with simulations on a server.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-02 09:58:06 -0600

chapulina gravatar image

When you say the model didn't appear, was it only on the 3D view, or is its name also not listed on the left panel? If it's on the panel but not on 3D, this means there is a problem finding the meshes.

Are you sure the model was spawned correctly on gzserver? You can check this by running gz model -m <model name> --info.

Also, make sure you are dealing with the correct simulation. In between tries, your GzWeb could be connecting to an old container which you thought was killed, for example.

Also make sure the server is still alive, when you say "the model was there but after restarting GzWeb it disappeared", it sounds like gzserver is not responding anymore, or your new GzWeb is talking on the wrong port.

Hope this helps a bit.

edit flag offensive delete link more

Comments

Hey thanks for reply. Unfortunately i can exclude the most things. By saying "didn't appear" i meant that the model is neither in 3D view nor in model tree (ground plan is always listed in the model tree). I also checked the gazebo/default/world/stats topic to check if gzserver was still running (is there better way?). I'm running gzweb together with gazebo inside the container, and there is for sure only one container running.

wentz gravatar imagewentz ( 2017-10-04 04:35:00 -0600 )edit
wentz gravatar imagewentz ( 2017-10-04 04:36:57 -0600 )edit

Are you able to open a `gzclient` on the same machine? Does the model show up there?

chapulina gravatar imagechapulina ( 2017-10-05 10:46:36 -0600 )edit

So the last "new info" i experienced is that i'm able to see the robot in a local gzclient (with gzserver running in docker). When i move the robot in translate mode in the local gzclient the robot appears in the gzweb model tree but not in the gzweb gui. Seems the the browser has problems to get the collision/visual-model from a gzweb client that is running in docker.

wentz gravatar imagewentz ( 2017-10-16 03:02:58 -0600 )edit

On the container where you run GzWeb, do you have the model files under `http/client/assets`? They should be put there when you run deploy.

chapulina gravatar imagechapulina ( 2017-10-16 09:59:23 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-10-02 05:50:44 -0600

Seen: 517 times

Last updated: Oct 02 '17