Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:marker_visualization [2014/06/05 11:38] – external edit 127.0.0.1 | doc:marker_visualization [2015/10/19 15:07] (current) – [Marker-based visualization canvas] 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:// | + | ===== Marker Types ===== |
| - | **This module is currently under development | + | 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 '' | ||
| + | In addition, KnowRob supports a set of complex marker types. | ||
| + | * **cylinder_tf(Frame0, | ||
| + | * **link(Frame)**: | ||
| + | * **trajectory(Frame)**: | ||
| + | * **trail(Frame)**: | ||
| + | * **average_trajectory(Frame)**: | ||
| + | * **pointer(Frame0, | ||
| + | * **object(Name)**: | ||
| + | * **agent(Name)**: | ||
| + | * **stickman(Name)**: | ||
| + | ===== Usage ===== | ||
| - | ===== System overview ===== | + | First, setup the rosbridge communication interface and initialiaze the `knowrob_vis` package. |
| - | {{ : | + | |
| - | **Note:** Though | + | $ roslaunch rosbridge_server rosbridge_websocket.launch |
| + | $ rosrun rosprolog | ||
| + | |||
| + | Markers must be explicitly published by the user with following query ([[http:// | ||
| + | % publish modified marker | ||
| + | ?- marker_publish. | ||
| - | ===== 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. | + | ==== Semantic Map Marker ==== |
| + | |||
| + | 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, knowrob:'SemanticEnvironmentMap' | + | ?- owl_parse(' |
| - | + | ?- owl_individual_of(A, knowrob:'SemanticEnvironmentMap' | |
| - | % read start time of grasp action from MongoDB | + | |
| - | ?- task_goal(T, 'GRASP' | + | |
| | | ||
| - | | + | % highlight all electrical household appliances |
| - | ?- mng_robot_pose_at_time(pr2:' | + | ?- owl_individual_of(A, |
| - | | + | |
| - | + | ||
| - | | + | |
| - | ?- 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 | + | % load and visualize the pr2 robot for given timepoint T |
| + | ?- owl_parse(' | ||
| + | ?- mng_robot_pose_at_time(pr2:' | ||
| + | |||
| + | ==== Trajectory Marker ==== | ||
| + | |||
| + | The following | ||
| + | and visualize it in the browser-based visualization. | ||
| + | |||
| + | % load and visualize the base link of the pr2 robot for given timerange (T0,T1) | ||
| + | ?- owl_parse(' | ||
| + | ?- marker_update(trajectory('/ | ||
| + | ===== Visualizing 3D object meshes ===== | ||
| + | |||
| + | KnowRob supports the visualization of objects using 3D surface meshes in the STL or Collada file formats. These meshes can either be attached | ||
| + | |||
| + | <code xml> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | The package // | ||
| + | |||
| + | Inside the ROS filesystem, resources such as binary files can be described using different kinds of URLs: The common file:%%//%% and http:%%//%% URLs, and the package: | ||
| + | |||
| + | Since the client of a webserver cannot access the whole file system, this mechanism does not work as such if requests are made from a website. The ros3djs library therefore rewrites package: | ||
| + | |||
| + | 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 ' | ||
| - | # Is some part of the right arm blocking the view on the object? | ||
| - | ?- register_ros_package(mod_srdl), | ||
| - | ?- mng_obj_pose_by_desig(' | ||
| - | ?- sub_component(pr2: | ||
| - | | ||
| - | | ||
| - | | ||
| - | |||
| - | # Is the object visible in the camera, given the camera' | ||
| - | ?- obj_visible_in_camera(log:' | ||
| - | | ||
| - | | ||
| - | true . | ||
| - | | ||
| ===== Links ===== | ===== Links ===== | ||

