This is an old revision of the document!


Installing the Web-based visualization tools

The installation of a Web-based visualization is slightly more complex than for other packages since changes outside of the ROS environment are required.

Serving the HTML pages

The visualizations are realized as HTML pages and JavaScript files that need to be served to the browser. Due to restrictions of the common browsers that are to avoid phishing attacks, it is difficult to load some files from the local filesystem and others from remote servers. We therefore need to serve the HTML and JS files via a Web server. This requires the following steps:

  • Install a web server, e.g. apache2 by sudo apt-get install apache2
  • Set up the system to serve web pages from ~/public_html to http://localhost/~username
  • Put the contents of the 'html' folder in knowrob_marker_vis into the ~/public_html folder.
  • Alternatively, you can put the files into the global docroot at /var/www/* if you have access to this directory.

Visualizing object meshes

Inside the ROS ecosystem, resources like binary files can be described using different kinds of URLs like file://, http:// or package://, which specifies the path relative to a ROS package. These URLs can be resolved using the resource_retriever tool. Since the webserver does not access to the whole file system, this mechanism does not work any more if requests are made from a website. The ros3djs library therefore rewrites package:// URLs to point to the docroot of the website. For example, meshes in the package pr2_description are now searched for at http://localhost/pr2_description.

In order to visualize meshes contained in ROS packages, these meshes therefore have to be put into the docroot of the webserver, which is usually /var/www/<pkg_name>.

Reading logged robot pose data

If you want to reason about logged robot pose data, you will need to set up your system as described here. This includes the installation of a MongoDB database and the setup of the KnowRob modules for interacting with it.