Both sides previous revisionPrevious revisionNext revision | Previous revision |
doc:robots_and_the_internet [2013/11/25 09:32] – [Segmentation and Interpretation of Geometric Object Models] admin | doc:robots_and_the_internet [2014/11/28 12:46] (current) – admin |
---|
====== Tutorial on "Robots and the Internet" ====== | ====== Tutorial on "Robots and the Internet" ====== |
| |
This tutorial was given at the [[http://aass.oru.se/Agora/Lucia2013/|2013 LUCIA Winter School]] on "AI and Robotics" in Örebro, Sweden. This page describes the practical examples complementing the presentation. | This tutorial was given at the [[http://aass.oru.se/Agora/Lucia2013/|2013 LUCIA Winter School]] on "AI and Robotics" in Örebro, Sweden. This page describes the practical examples complementing the presentation; the slides can be found {{:doc:robots-and-internet.pdf|here}}. |
| |
| ** This page has not been updated to the new, catkin-based version of KnowRob. Some packages used by the instructions below, such as opencyc, are not available in this version. ** |
| |
===== Installation ===== | ===== Installation ===== |
| |
===== Object Ontology generated from an Online Shop ===== | ===== Object Ontology generated from an Online Shop ===== |
| Online shops can provide valuable information about objects and their properties. The package comp_germandeli contains an OWL ontology that has been generated from the [[http://www.germandeli.com|GermanDeli online shop]], selling German products in the US. It can be loaded into KnowRob and expands the 'objects' branch of the ontology with about 7,000 additional classes. |
| |
| $ rosrun rosprolog rosprolog comp_germandeli |
| |
| ?- owl_subclass_of(A, germandeli:'Bakery'). |
| A = germandeli:'Bakery' ; |
| A = germandeli:'Apple_Strudel' ; |
| A = germandeli:'German_Apfelstrudel_10_slices_individually_wrapped' ; |
| A = germandeli:'Breads' ; |
| A = germandeli:'Assorted_Breads' ; |
| A = germandeli:'Pruente_Landbrot_500g' ; |
| A = germandeli:'Pruente_Sonnenkernbrot_Sunflowerseed_Rye_Bread_500g' ; |
| A = germandeli:'Ruhrtaler_Vollkornbrot_Rye_Bread_500g' ; |
| A = germandeli:'Ruhrtaler_Volllkornbrot_Rye_Bread_250g' ; |
| [...] |
| |
| ?- owl_subclass_of(A, germandeli:'Bakery'), owl_subclass_of(A, knowrob:'HeatSensitive'). |
| A = germandeli:'Pumpkin_Seed_Bread_475g' ; |
| A = germandeli:'Bahlsen_Comtess_Choco_Chips_Cake_400g' ; |
| A = germandeli:'Bahlsen_Comtess_Malaga_400g' ; |
| A = germandeli:'Bahlsen_Comtess_Schoko_Kokos_Genuss_400g' ; |
| A = germandeli:'Comtess_Zitronen_Kuchen_Lemon_Cake_400g' ; |
| A = germandeli:'Comtess_a_la_Banana_Split_Cake_400g' ; |
| A = germandeli:'Baumkuchen_Vollmilch_Tree_Cake_w_Milk_Chocolate' . |
| [...] |
| |
| ?- class_properties(germandeli:'Vitalis_Fruechte_Muesli_Fruit_Cereal_375g', P, O). |
| P = germandeli:productCode, |
| O = literal(type(xsd:string,'4000521642006')) ; |
| P = germandeli:brand, |
| O = literal(type(xsd:string,'Dr. Oetker')) ; |
| P = germandeli:countryOfOrigin, |
| O = literal(type(xsd:string,'Germany')) ; |
| P = germandeli:productID, |
| O = literal(type(xsd:string,oetkermuesli)) ; |
| P = knowrob:weight, |
| O = literal(type(xsd:string,'13.3oz (375g)')) ; |
| P = knowrob:purchasePrice, |
| O = literal(type(xsd:string,'6.99')) ; |
| ===== Exchanging Information via RoboEarth ===== |
| [[http://www.roboearth.org|RoboEarth]] is a web-based database for exchanging information between robots via the Internet. The content of the database can be searched using a [[http://api.roboearth.org|web interface]] as well as using a [[http://api.roboearth.org/documentation/dev|REST-style API]]. The following examples show some tools that can interact with RoboEarth; the first two are graphical editors that can up-and download information to and from RoboEarth, the latter is a query interface that directly loads the information into KnowRob. |
| ==== RoboEarth-enabled Semantic Map Editor ==== |
| |
| The [[http://knowrob.org/doc/semantic_map_editor|Semantic Map Editor]] can read and write information from/to RoboEarth. To get an impression, search for room '3002' and download the 'lucia.testmap'. |
| |
===== Exchanging Information via RoboEarth ===== | |
| |
| ==== RoboEarth-enabled Action Recipe Editor ==== |
| |
| Also the [[http://knowrob.org/doc/action_recipe_editor|Action Recipe Editor]] is able to exchange task descriptions via RoboEarth. You can download an example definition by searching for 'environment exploration' and downloading 'lucia.exploration'. |
| |
===== Remote Web-based Knowledge Processing ===== | |
| |
| ==== Querying RoboEarth from KnowRob ==== |
| |
| There is a [[http://knowrob.org/doc/exchanging_information_via_roboearth|KnowRob client for RoboEarth]] that can download and upload information directly from the knowledge base. In addition to KnowRob, you need a checkout of the current RoboEarth stack that you can install using |
| svn co https://ipvs.informatik.uni-stuttgart.de/roboearth/repos/public/tags/latest roboearth |
| rosmake re_comm |
| |
| |
| The following are some example queries for downloading an action recipe and an environment map into KnowRob. |
| $ rosrun rosprolog rosprolog re_comm |
| ?- visualisation_canvas(_), planvis_create(_). |
| |
| % Download an action recipe and add it to the visualization |
| ?- re_download_action_recipe('serve a drink', pr2:'PR2Robot1', Recipe), |
| re_generate_cpl_plan(Recipe, CplPlan), |
| planvis_load(Recipe,_). |
| |
| % Download an environment map and visualize it |
| ?- re_request_map_for([['kr:roomNumber',3002], ['kr:floorNumber','3'], |
| ['kr:streetNumber','45'], ['rdfs:label','Karlstrasse']], M), |
| owl_individual_of(Map, knowrob:'SemanticEnvironmentMap'), |
| add_object_with_children(Map, _). |
| |
| ===== Remote Web-based Knowledge Processing ===== |
| |
| The [[http://knowrob.org/doc/marker_visualization|web-based visualization canvas]] allows to interact with KnowRob via the Web by sending queries and visualizing their results. The setup is a bit complicated since Web servers are not installable purely via ROS, and opening a Prolog console to the world can be a security leak. However, for controlled environments, you can find the [[http://knowrob.org/doc/marker_visualization#installation|installation instructions]] and [[http://knowrob.org/doc/marker_visualization#example_queries|example queries]] here. |