1. Louise Poubel
  2. gzweb


# Installation

Install gazebo or drcsim if you haven't done so already.


Dependencies: sudo apt-get install the following:

* libjansson-dev

* nodejs

* npm

* libboost-dev

* imagemagick

* libtinyxml-dev

* mercurial

In the terminal:

    sudo apt-get install libjansson-dev nodejs npm libboost-dev imagemagick libtinyxml-dev mercurial

# Build

The first time you build, you'll need to gather all the gazebo models and
put them in the right directory and prepare them for the web. To do this,
you'll need to source the gazebo/drcsim setup.sh files, and run a deploy script.

    # if you have drcsim then source /usr/share/drcsim/setup.sh
    . /usr/share/gazebo/setup.sh

Run the deploy script, this downloads models from the web, converts media files to web-compatible format, and generates thumbnails for the models. This step may take a few minutes.

    ./deploy.sh -m

Note the `-m` flag tells the deploy script to grab models from the model
database and any other models in your gazebo paths. For all subsequent builds,
the `-m` flag will not be needed, i.e.:


## Options

To generate thumbnails manually, run the script with the `-t` flag, i.e.:

    ./deploy.sh -t

Mobile devices:

If you'll use gzweb on mobile devices, you can create coarse versions of all models, which are lighter to load (50% of original quality). If you've already ran `./deploy.sh -m`, run just:

    ./deploy.sh -c

Or you can run both flags at the same time to create the model database and also generate coarse versions:

    ./deploy.sh -m -c

# Running gzserver, gzweb, and webgl

Start gazebo or gzserver first


Start the http and websocket servers


Open a browser that has webgl support and point it to the ip address and port
where the http server is started, by default it's on port 8080, e.g.


# Stopping gzweb server