Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:web_visualization:installation [2014/04/17 11:20] – [Serving the HTML pages] admindoc:web_visualization:installation [2014/11/28 16:56] (current) – removed admin
Line 1: Line 1:
-====== 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'' 
-  * [[http://wiki.ubuntuusers.de/Apache#Benutzerspezifisch|Set up the system]] to serve web pages from ~/public_html to %%http://localhost/~username%% 
-  * Put the contents of the [[https://github.com/code-iai/knowrob_dev/tree/master/knowrob_vis/html|'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 [[http://wiki.ros.org/resource_retriever|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>.