• attachment:missing_objects_query.cpp of Events/CoTeSys-ROS-School/Day6

Attachment 'missing_objects_query.cpp'

Download

   1 #include <string>
   2 #include <iostream>
   3 
   4 #include <ros/ros.h>
   5 #include <ros/node_handle.h>
   6 #include <json_prolog/prolog.h>
   7 
   8 using namespace std;
   9 using namespace json_prolog;
  10 
  11 int main(int argc, char *argv[])
  12 {
  13   ros::init(argc, argv, "main");
  14 
  15   Prolog pl;
  16 
  17   //TODO Create a string "q" with the Prolog query
  18   
  19   
  20   PrologQueryProxy bdgs = pl.query(q);
  21   for(PrologQueryProxy::iterator it=bdgs.begin(); it != bdgs.end(); it++)
  22   {
  23     PrologBindings bdg = *it;
  24     ROS_INFO_STREAM("PerceivedObj = "<< bdg["PerceivedObj"]);
  25     ROS_INFO_STREAM("MissingObj = "<< bdg["MissingObj"]);
  26     ROS_INFO_STREAM("MissingTypes = "<< bdg["MissingTypes"]);
  27   }
  28   return 0;
  29 }

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2010-11-06 08:06:25, 3.6 KB) [[attachment:missing_objects.cpp]]
  • [get | view] (2010-11-06 08:11:19, 0.6 KB) [[attachment:missing_objects_query.cpp]]
  • [get | view] (2010-11-06 17:01:29, 2.5 KB) [[attachment:missing_objects_query_solution.cpp]]
  • [get | view] (2010-11-06 17:01:38, 4.6 KB) [[attachment:missing_objects_solution.cpp]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.