Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
doc:knowrob_basics [2021/02/18 09:25] – [Loading and querying environment information] daniel86 | doc:knowrob_basics [2021/02/18 09:25] (current) – [Visualizing objects] daniel86 | ||
---|---|---|---|
Line 53: | Line 53: | ||
O = kitchen_island_left_lower_drawer_handle ; | O = kitchen_island_left_lower_drawer_handle ; | ||
[...] | [...] | ||
- | </ | ||
- | |||
- | ===== Visualizing objects ===== | ||
- | |||
- | KnowRob includes a browser-based visualization canvas that can display 3D data such as the environment map or the robot itself. The canvas is based on [[http:// | ||
- | <code bash> | ||
- | roslaunch rosbridge_server rosbridge_websocket.launch | ||
- | </ | ||
- | |||
- | You can just leave the rosbridge node running in the background while you are working on KnowRob. The following queries load a semantic environment map with a set of objects inside and push them to the 3D canvas. The result should look like the image below. | ||
- | |||
- | {{ : | ||
- | |||
- | <code prolog> | ||
- | % Load the visualization Prolog module | ||
- | ?- register_ros_package(knowrob_vis). | ||
- | |||
- | % Load an environment map to get some example objects | ||
- | ?- owl_parse(' | ||
- | |||
- | % Start the KnowRob side of the visualization canvas. This will start | ||
- | % a web server at http:// | ||
- | ?- visualisation_server. | ||
- | |||
- | % Select the map instance of type ' | ||
- | % and add it to the 3D canvas | ||
- | ?- owl_individual_of(A, | ||
- | | ||
</ | </ | ||