This is an old revision of the document!


Marker-based visualization canvas

Based on rviz Markers, this visualization module can display the current or past belief states in the rviz visualizer as well as in the ros3djs web-based visualization.

An example can be seen here (only from the local network): http://tenorth.ai.loc/~tenorth/test-vis.html

This module is currently under development and not publicly available.

System overview

Note: Though the visualization looks much like a standard web page, it's more similar to a web-based rviz. This means that there is still a single ROS graph and a single KnowRob instance in the background that is shared among all website visitors.

Example queries

The following queries read data from the semantic map and from the logged data and visualize it in the browser-based visualization. The robot pose at time 1377780296 is read from the MongoDB using the tfMemory extension.

$ roslaunch knowrob_vis knowrob_vis.launch
$ rosrun rosprolog  rosprolog knowrob_vis

% load packages, start marker publisher
?- register_ros_package(knowrob_mongo), 
   register_ros_package(mod_srdl), 
   register_ros_package(mod_execution_trace), 
   visualisation_canvas.

% load CRAM log file
?- owl_parse('pick-and-place-no-details.owl', false, false, true).

% load and visualize semantic map
?- owl_individual_of(A, knowrob:'SemanticEnvironmentMap'), add_object_with_children(A).

% read start time of grasp action from MongoDB
?- task_goal(T, 'GRASP'), task_start(T, St).

% read robot pose at this time and add to the visualization
?- mng_robot_pose_at_time(pr2:'PR2Robot1', '/map', $St, Pose),
   add_object_with_children(pr2:'PR2Robot1', $St).

% highlight all cameras that are part of the SRDL model of the robot
?- owl_individual_of(A, srdl2comp:'Camera'), highlight_object(A, @(true), 0, 255, 255, 255).

The following is to be performed from the roslog_2013_08_29_1445 folder:

# Is some part of the right arm blocking the view on the object?
?- register_ros_package(mod_srdl), owl_parse('perceive-no-details.owl', false, false, true).
?- mng_obj_pose_by_desig('http://ias.cs.tum.edu/kb/cram_log.owl#VisualPerception_Z9fXhEae_object_0', Pose).
?- sub_component(pr2:pr2_right_arm, Part), 
   once(owl_individual_of(Part, srdl2comp:'UrdfLink')),
   obj_blocked_by_in_camera(log:'VisualPerception_Z9fXhEae_object_0', Part, 
   pr2:pr2_head_mount_kinect_rgb_link, log:'timepoint_1377780296').
   
# Is the object visible in the camera, given the camera's field of view?
?- obj_visible_in_camera(log:'VisualPerception_Z9fXhEae_object_0', 
                         pr2:pr2_head_mount_kinect_rgb_link,
                         log:'timepoint_1377780271').
true .