missing_objects_query.cpp
Go to the documentation of this file.
00001 #include <string>
00002 #include <iostream>
00003 
00004 #include <ros/ros.h>
00005 #include <ros/node_handle.h>
00006 #include <json_prolog/prolog.h>
00007 
00008 using namespace std;
00009 using namespace json_prolog;
00010 
00011 int main(int argc, char *argv[])
00012 {
00013   ros::init(argc, argv, "main");
00014 
00015   Prolog pl;
00016 
00018   // Get Percepts from Table 1 - happens in another thread
00019   // TODO: Where?
00021 
00023   // Insert to Knowrob - happens in another thread
00024   // TODO: Where?
00026 
00028   // Query knowrob
00030   string q = "comp_misinobj:comp_missingObjectTypes(PerceivedObj, MissingObj, MissingTypes)";
00031   
00032   PrologQueryProxy bdgs = pl.query(q);
00033   for(PrologQueryProxy::iterator it=bdgs.begin(); it != bdgs.end(); it++)
00034   {
00035     PrologBindings bdg = *it;
00036     ROS_INFO_STREAM("PerceivedObj = "<< bdg["PerceivedObj"]);
00037     ROS_INFO_STREAM("MissingObj = "<< bdg["MissingObj"]);
00038     ROS_INFO_STREAM("MissingTypes = "<< bdg["MissingTypes"]);
00039   }
00040 
00042   //Navigate to Table 2
00044 
00046   // Get Percepts from Table 2 - happens in another thread
00047   // TODO: Where?
00049 
00051   // Fetch Object
00052   // TODO: How? Service, Actionlib?
00054 
00056   // Navigate to Table 1
00058   
00060   // Find empty surface
00062 
00064   // Put down the objects
00066   return 0;
00067 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


missing_objects_tutorial
Author(s): Dejan Pangercic
autogenerated on Thu May 23 2013 14:38:37