Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:marker_visualization [2014/02/21 17:13] – Added link to datavisclient wiki page stefes | doc:marker_visualization [2015/10/19 15:06] – [Usage] daniel86 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Marker-based visualization canvas ====== | ====== Marker-based visualization canvas ====== | ||
+ | ~~NOTOC~~ | ||
+ | \\ | ||
+ | ^ This page describes the ' | ||
+ | \\ | ||
{{ : | {{ : | ||
- | Based on [[http:// | + | Based on [[http:// |
- | An example can be seen here (only from the local network): http:// | + | ===== Usage ===== |
- | **This module is currently under development | + | First, setup the rosbridge communication interface |
+ | $ roslaunch rosbridge_server rosbridge_websocket.launch | ||
+ | $ rosrun rosprolog | ||
+ | | ||
+ | Markers must be explicitly published by the user with following query ([[http:// | ||
- | ===== System overview ===== | + | % publish modified marker |
- | {{ :doc:web-visualization-architecture.png?nolink |}} | + | ?- marker_publish. |
- | **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. | + | ==== Marker Types ==== |
+ | The set of supported marker primitive types can be queried using the '' | ||
+ | The primitive types include arrow, cube, sphere, cylinder, line_strip, line_list, cube_list, sphere_list, | ||
+ | Primitive markers can be created using '' | ||
- | ===== Installation ===== | + | In addition, KnowRob supports a set of complex |
- | Setting up your computer as server for the web-based | + | * **cylinder_tf(Frame0,Frame1)**: A cylinder between 2 links |
- | * Install a web server, e.g. apache2 by '' | + | * **link(Frame)**: A marker that takes the pose of a link |
- | * [[http:// | + | * **trajectory(Frame)**: A trajectory of a link |
- | * Put the contents | + | * **trail(Frame)**: |
- | * To use CAD models for visualization, put the respective ROS packages into your global web root, usually /var/www. The %%package://xyz%% URLs describing | + | * **average_trajectory(Frame)**: The average over multiple trajectories |
+ | * **pointer(Frame0,Frame1)**: Arrow that points from Frame0 in the direction of Frame1 | ||
+ | * **object(Name)**: A marker that represents an OWL individual (including children objects) | ||
+ | * **agent(Name)**: | ||
+ | * **stickman(Name)**: | ||
- | ===== Example queries ===== | + | ==== Semantic Map Marker |
- | 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. | + | The following queries read data from a semantic map and visualize it in the browser-based visualization. |
- | $ roslaunch knowrob_vis knowrob_vis.launch | ||
- | $ rosrun rosprolog | ||
- | | ||
- | % load packages, start marker publisher | ||
- | ?- register_ros_package(knowrob_mongo), | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | % load CRAM log file | ||
- | ?- owl_parse(' | ||
- | | ||
% load and visualize semantic map | % load and visualize semantic map | ||
- | ?- owl_individual_of(A, | + | |
+ | | ||
| | ||
- | | + | % highlight all electrical household appliances |
- | ?- task_goal(T, | + | ?- owl_individual_of(A, |
- | + | ||
- | % read robot pose at this time and add to the visualization | + | |
- | ?- mng_robot_pose_at_time(pr2:' | + | |
- | | + | |
- | + | ||
- | | + | |
- | ?- owl_individual_of(A, | + | |
+ | ==== Agent Marker ==== | ||
+ | The following queries read data from a robot description, | ||
+ | and visualize it in the browser-based visualization. | ||
- | The following is to be performed from the roslog_2013_08_29_1445 folder: | + | % load and visualize |
+ | ?- owl_parse(' | ||
+ | ?- mng_robot_pose_at_time(pr2:' | ||
- | # Is some part of the right arm blocking | + | ==== Trajectory Marker ==== |
- | | + | |
- | ?- mng_obj_pose_by_desig('http://ias.cs.tum.edu/kb/cram_log.owl# | + | The following queries read data from a robot description, |
- | ?- sub_component(pr2: | + | and visualize it in the browser-based visualization. |
- | once(owl_individual_of(Part, | + | |
- | | + | |
- | | + | ?- owl_parse('package://knowrob_srdl/owl/PR2.owl' |
- | | + | ?- marker_update(trajectory('/base_link' |
- | # Is the object visible | + | ===== Visualizing 3D object meshes ===== |
- | ?- obj_visible_in_camera(log:' | + | |
- | pr2:pr2_head_mount_kinect_rgb_link, | + | KnowRob supports |
- | log:' | + | |
- | | + | <code xml> |
- | + | < | |
- | ===== Publishing diagram messages ===== | + | < |
+ | <knowrob:pathToCadModel rdf: | ||
+ | package:// | ||
+ | </ | ||
+ | </ | ||
- | Preliminary documentation: | + | The package // |
- | $ rosrun rosprolog rosprolog knowrob_vis | + | |
- | ?- diagram_canvas. | + | |
- | ?- add_diagram(id, title, type, xlabel, ylabel, [[[a, | + | |
- | This publishes | + | Inside |
- | id: id | + | |
- | type: 0 | + | |
- | title: title | + | |
- | xlabel: xlabel | + | |
- | ylabel: ylabel | + | |
- | values: | + | |
- | - | + | |
- | value1: ['a', ' | + | |
- | value2: | + | |
- | - | + | |
- | value1: | + | |
- | value2: [' | + | |
- | - | + | |
- | value1: [' | + | |
- | value2: [' | + | |
- | An example | + | Since the client |
+ | If you would like to visualize meshes contained in ROS packages in the browser, you have to put these meshes into the docroot of the webserver, i.e. as a subfolder of the directory ' | ||