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 [2014/02/25 08:54] – [Image canvas] admindoc:web_visualization [2014/12/07 07:16] (current) admin
Line 1: Line 1:
 ====== Web-based visualization tools ====== ====== Web-based visualization tools ======
 +~~NOTOC~~
 +\\
 +^ This page describes the 'catkinized' version of KnowRob that uses the [[http://wiki.ros.org/catkin/|catkin buildsystem]] and the pure Java-based [[http://wiki.ros.org/rosjava|rosjava]]. The older version, which was based on the rosbuild buildsystem and rosjava_jni, used a [[http://wiki.ros.org/mod_vis|local visualization canvas implemented in Java]].^
 +\\
  
  
-===== Prolog query console & query library =====+KnowRob comes with a range of web-based visualization tools for different kinds of information. All of these tools are accessible from within the knowledge base via Prolog predicates that send the data to the user's browser. When launching the KnowRob visualization canvas, a Web server is automatically started that serves the HTML pages and JavaScript files for this interface. It can be reached at http://localhost:1111. The default page only contains the 3D canvas; a more complete page with all the visualization modules below can be found at http://localhost:1111/robohow.html. Please note that the available functionality depends on the packages that are loaded. All web-based tools require a running //rosbridge// instance: 
 + 
 +<code bash> 
 +roslaunch rosbridge_server rosbridge_websocket.launch 
 +</code> 
 + 
 +{{ :doc:knowrob-web-console.png?nolink&650 |}}
  
  
 ===== Marker-based 3D visualization canvas ===== ===== Marker-based 3D visualization canvas =====
 +The block in the upper center is a 3D visualization canvas similar to the [[http://wiki.ros.org/rviz|rviz]] visualization tool in ROS. Other than rviz, it it not used to visualize the current state of the robot, but to display the results of KnowRob queries that may involve the world state at other points in time. More information on this canvas can be found [[http://knowrob.org/doc/marker_visualization|here]].
  
  
-===== Diagram visualization =====+===== Prolog query console & query library ===== 
 +The block in the upper left is a Prolog console that interacts with a KnowRob instance via the [[doc/interact_with_knowrob_via_ros|json_prolog service]]. You can send queries as you would send via the terminal by pasting them into the lower field; the upper one contains a history and query results. The queries can contain predicates that, as side-effect, update the other visualization windows. For demonstration purposes, there is a library of prepared queries that can be inserted into the query window by clicking on the entries in the 'library' block. They can then be adapted and sent to KnowRob as any other query. The query console requires the //json_prolog// service to be available, i.e. you need to start KnowRob using //roslaunch// instead of //rosrun//.
  
-===== Designator visualization ===== 
  
 +===== Chart visualization =====
 +This area can accommodate a set of charts that visualize statistical data. They are filled by [[https://github.com/code-iai/iai_common_msgs/blob/master/data_vis_msgs/msg/DataVis.msg|messages]] published on the 'data_vis_msgs' topic. More information on the use of this visualization can be found [[doc/chart_visualization|here]].
  
-===== Image canvas ===== 
  
 +===== Designator visualization =====
 +The designator visualization block displays the nested structure of designators as indented grey boxes. Designators are the main datastructure of the CRAM executive. The visualization listens to the /logged_designators topic and always displays the latest designator message received. The code for this visualization can be found in the //knowrob_cram// package.
  
  
-===== Installation =====+===== Image canvas ===== 
 +The canvas in the lower right displays images whose URL is sent as ROS messages via the /logged_images topic. When logging data during plan execution, the PR2 regularly takes snapshots of its camera image at important points in time and save them via this topic, so they will automatically be updated when a plan is executed. To use this canvas for your queries, you need to make sure that the images can be accessed either via a file:// or http:// URL, and publish the URL of the image as message on the given topic.
  
-===== Launching the system =====