22 #include <ros/package.h>
30 ros::service::waitForService(
"json_prolog/query", -1);
31 ros::service::waitForService(
"/rapp/rapp_mysql_wrapper/register_user_ontology_alias", -1);
32 ros::service::waitForService(
"/rapp/rapp_mysql_wrapper/get_user_ontology_alias", -1);
37 ROS_ERROR(
"rapp_knowrob_wrapper_subclass_of_topic not found");
44 ROS_ERROR(
"rapp_knowrob_wrapper_superclass_of_topic not found");
51 ROS_ERROR(
"rapp_knowrob_wrapper_issubsuperclass_of_topic not found");
58 ROS_ERROR(
"rapp_knowrob_wrapper_create_instance_topic not found");
65 ROS_ERROR(
"rapp_knowrob_wrapper_dump_ontology_topic not found");
72 ROS_ERROR(
"ontology_load_ontology_topic not found");
79 ROS_ERROR(
"ontologyuser_instances_of_class_topic not found");
86 ROS_ERROR(
"rapp_knowrob_wrapper_create_ontology_alias_topic not found");
93 ROS_ERROR(
"create_user_performance_cognitve_tests_topic not found");
100 ROS_ERROR(
"create_cognitve_tests_topic not found");
107 ROS_ERROR(
"cognitive_tests_of_type not found");
114 ROS_ERROR(
"record_user_cognitive_tests_performance not found");
121 ROS_ERROR(
"rapp_knowrob_wrapper_clear_user_cognitive_tests_performance_records not found");
128 ROS_ERROR(
"rapp_knowrob_wrapper_retract_user_ontology_alias not found");
135 ROS_ERROR(
"rapp_knowrob_wrapper_register_image_object_to_ontology not found");
140 rapp_platform_ros_communications::ontologyLoadDumpSrv::Request req;
141 rapp_platform_ros_communications::ontologyLoadDumpSrv::Response res;
143 req.file_url=std::string(
"currentOntologyVersion.owl");
145 if(res.success!=
true)
147 ROS_ERROR(
"Ontology backup was not loaded.. Continuing with empty ontology");
148 ROS_ERROR_STREAM(res.error);
152 ROS_INFO(
"Ontology backup successfully loaded");
154 ROS_INFO(
"KnowRob ROS wrapper initialized");
164 rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request& req,
165 rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response& res)
178 rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request& req,
179 rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response& res)
192 rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Request& req,
193 rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Response& res)
206 rapp_platform_ros_communications::createInstanceSrv::Request& req,
207 rapp_platform_ros_communications::createInstanceSrv::Response& res)
220 rapp_platform_ros_communications::ontologyLoadDumpSrv::Request& req,
221 rapp_platform_ros_communications::ontologyLoadDumpSrv::Response& res)
234 rapp_platform_ros_communications::ontologyLoadDumpSrv::Request& req,
235 rapp_platform_ros_communications::ontologyLoadDumpSrv::Response& res)
248 rapp_platform_ros_communications::createOntologyAliasSrv::Request& req,
249 rapp_platform_ros_communications::createOntologyAliasSrv::Response& res)
262 rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Request& req,
263 rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Response& res)
276 rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Request& req,
277 rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Response& res)
290 rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Request& req,
291 rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Response& res)
304 rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Request& req,
305 rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Response& res)
318 rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Request& req,
319 rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Response& res)
332 rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Request& req,
333 rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Response& res)
346 rapp_platform_ros_communications::retractUserOntologyAliasSrv::Request& req,
347 rapp_platform_ros_communications::retractUserOntologyAliasSrv::Response& res)
360 rapp_platform_ros_communications::registerImageObjectToOntologySrv::Request& req,
361 rapp_platform_ros_communications::registerImageObjectToOntologySrv::Response& res)
bool clear_user_cognitive_tests_performance_records_callback(rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Request &req, rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Response &res)
Serves the clear_user_cognitive_tests_performance_records ROS service callback.
bool retract_user_ontology_alias_callback(rapp_platform_ros_communications::retractUserOntologyAliasSrv::Request &req, rapp_platform_ros_communications::retractUserOntologyAliasSrv::Response &res)
Serves the retract_user_ontology_alias ROS service callback.
ros::ServiceServer subclasses_of_service_
std::string user_performance_cognitve_tests_topic_
rapp_platform_ros_communications::createInstanceSrv::Response createInstanceQuery(rapp_platform_ros_communications::createInstanceSrv::Request req)
Implements the createInstance ROS service.
ros::ServiceServer clear_user_cognitive_tests_performance_records_service_
rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Response user_instances_of_class(rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Request req)
Implements the returnUserInstancesOfClass ROS service.
std::string user_instances_of_class_topic_
bool create_cognitve_tests_callback(rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Request &req, rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Response &res)
Serves the create_cognitve_tests ROS service callback.
bool loadOntologyCallback(rapp_platform_ros_communications::ontologyLoadDumpSrv::Request &req, rapp_platform_ros_communications::ontologyLoadDumpSrv::Response &res)
Serves the loadOntology ROS service callback.
rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Response create_cognitve_tests(rapp_platform_ros_communications::createCognitiveExerciseTestSrv::Request req)
Implements the create_cognitve_tests ROS service.
rapp_platform_ros_communications::ontologyLoadDumpSrv::Response loadOntologyQuery(rapp_platform_ros_communications::ontologyLoadDumpSrv::Request req)
Implements the loadOntology ROS service.
bool record_user_cognitive_tests_performance_callback(rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Request &req, rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Response &res)
Serves the record_user_cognitive_tests_performance ROS service callback.
rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Response record_user_cognitive_tests_performance(rapp_platform_ros_communications::recordUserPerformanceCognitiveTestsSrv::Request req)
Implements the record_user_cognitive_tests_performance ROS service.
ros::ServiceServer retract_user_ontology_alias_service_
bool dumpOntologyCallback(rapp_platform_ros_communications::ontologyLoadDumpSrv::Request &req, rapp_platform_ros_communications::ontologyLoadDumpSrv::Response &res)
Serves the dumpOntology ROS service callback.
bool subclassesOfCallback(rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request &req, rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response &res)
Serves the subclassesOf ROS service callback.
rapp_platform_ros_communications::registerImageObjectToOntologySrv::Response register_image_object_to_ontology(rapp_platform_ros_communications::registerImageObjectToOntologySrv::Request req)
Implements the register_image_object_to_ontology ROS service.
std::string retract_user_ontology_alias_topic_
std::string loadOntologyServiceTopic_
std::string register_image_object_to_ontology_topic_
std::string superclasses_of_service_topic_
rapp_platform_ros_communications::createOntologyAliasSrv::Response create_ontology_alias(rapp_platform_ros_communications::createOntologyAliasSrv::Request req)
Implements the create_ontology_alias ROS service.
bool create_ontology_alias_callback(rapp_platform_ros_communications::createOntologyAliasSrv::Request &req, rapp_platform_ros_communications::createOntologyAliasSrv::Response &res)
Serves the create_ontology_alias ROS service callback.
ros::ServiceServer loadOntologyService_
rapp_platform_ros_communications::retractUserOntologyAliasSrv::Response retract_user_ontology_alias(rapp_platform_ros_communications::retractUserOntologyAliasSrv::Request req)
Implements the retract_user_ontology_alias ROS service.
bool cognitive_tests_of_type_callback(rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Request &req, rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Response &res)
Serves the cognitive_tests_of_type ROS service callback.
KnowrobWrapperCommunications()
Default constructor.
KnowrobWrapper knowrob_wrapper
std::string createInstanceServiceTopic_
std::string create_cognitve_tests_topic_
ros::ServiceServer is_subsuperclass_of_service_
rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Response clear_user_cognitive_tests_performance_records(rapp_platform_ros_communications::clearUserPerformanceCognitveTestsSrv::Request req)
Implements the clear_user_cognitive_tests_performance_records ROS service.
bool createInstanceCallback(rapp_platform_ros_communications::createInstanceSrv::Request &req, rapp_platform_ros_communications::createInstanceSrv::Response &res)
Serves the createInstance ROS service callback.
std::string dumpOntologyServiceTopic_
ros::ServiceServer superclasses_of_service_
ros::ServiceServer register_image_object_to_ontology_service_
rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response subclassesOfQuery(rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request req)
Implements the subclassesOf ROS service.
ros::ServiceServer user_performance_cognitve_tests_service_
ros::ServiceServer create_cognitve_tests_service_
ros::ServiceServer create_ontology_alias_service_
rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response superclassesOfQuery(rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request req)
Implements the superclassesOf ROS service.
bool user_performance_cognitve_tests_callback(rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Request &req, rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Response &res)
Serves the user_performance_cognitve_tests ROS service callback.
std::string clear_user_cognitive_tests_performance_records_topic_
ros::ServiceServer user_instances_of_class_service_
ros::ServiceServer record_user_cognitive_tests_performance_service_
std::string is_subsuperclass_of_service_topic_
rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Response isSubSuperclassOfQuery(rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Request req)
Implements the isSubSuperclass ROS service.
bool user_instances_of_class_callback(rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Request &req, rapp_platform_ros_communications::returnUserInstancesOfClassSrv::Response &res)
Serves the user_instances_of_class ROS service callback.
ros::ServiceServer createInstanceService_
std::string subclasses_of_service_topic_
rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Response user_performance_cognitve_tests(rapp_platform_ros_communications::userPerformanceCognitveTestsSrv::Request req)
Implements the user_performance_cognitve_tests ROS service.
rapp_platform_ros_communications::ontologyLoadDumpSrv::Response dumpOntologyQuery(rapp_platform_ros_communications::ontologyLoadDumpSrv::Request req)
Implements the dumpOntology ROS service.
std::string cognitive_tests_of_type_topic_
ros::ServiceServer cognitive_tests_of_type_service_
std::string record_user_cognitive_tests_performance_topic_
bool superclassesOfCallback(rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Request &req, rapp_platform_ros_communications::ontologySubSuperClassesOfSrv::Response &res)
Serves the superlassesOf ROS service callback.
rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Response cognitive_tests_of_type(rapp_platform_ros_communications::cognitiveTestsOfTypeSrv::Request req)
Implements the cognitive_tests_of_type ROS service.
ros::ServiceServer dumpOntologyService_
bool isSubSuperclassOfCallback(rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Request &req, rapp_platform_ros_communications::ontologyIsSubSuperClassOfSrv::Response &res)
Serves the isSubSuperclassOf ROS service callback.
std::string create_ontology_alias_topic_
bool register_image_object_to_ontology_callback(rapp_platform_ros_communications::registerImageObjectToOntologySrv::Request &req, rapp_platform_ros_communications::registerImageObjectToOntologySrv::Response &res)
Serves the register_image_object_to_ontology ROS service callback.