The source code for GzWeb is located at the osrf/gzweb GitHub repository.
The source code is composed of two main parts: Javascript code inside gzweb/gz3d
,
responsible for visualization, and C++ code inside gzweb/gzbridge
,
responsible for communicating with gzserver
.
GzWeb makes use of the JQuery mobile user interface system for GUI and the three.js library for 3D rendering.
Grunt is used for running tasks including code checking and minification:
Code check: uses JSHint for detecting potential errors in Javascript code.
Concatenation: Concatenates javascript files as follows:
gz3d.src.js
: All files under gz3d/src
gz3d.gui.js
: All files under gz3d/src
and all the necessary dependenciesgz3d.js
: The same as gz3d.gui.js
but without GUI-specific files and dependenciesMinification: Compresses the 3 files above into .min.js
versions which are more
efficient to use in production.
Make changes to Javascript source code at gzweb/gz3d/src
. You may also
edit files at gzweb/gz3d/client/js/include
, but keep in mind that these
files are copied from external projects.
The following command runs Grunt to perform code check and contatenate files:
npm run update
Verify your changes:
gzserver
is runningnpm start
localhost:8080
, or just refresh page.If you don't see anything changed after modifying the Javascript code, you might need to clear your browser cache to see the changes.
Run tests:
npm test
Generate updated documentation:
npm run docs
GzWeb communicates with gzserver
by publishing and subscribing to Gazebo topics.
Make changes to C++ source code in gzweb/gzbridge
You can compile by running:
npm run deploy
Verify your changes:
gzserver
is runningnpm start
localhost:8080
, or just refresh page.On GzWeb's issue tracker, you're able to report bugs and ask for new features. Simply create an issue and categorize it accordingly.
If you've fixed a bug or added a feature and would like your changes to be integrated into GzWeb, you can make a pull request to the repository, and the changes will be reviewed and merged.