24 from image_classification
import ImageClassification
25 from ontology_class_bridge
import OntologyClassBridge
26 from image_registration_to_ontology
import ImageRegistrationToOntology
28 from rapp_platform_ros_communications.srv
import (
29 imageClassificationSrv,
30 imageClassificationSrvResponse,
31 ontologyClassBridgeSrv,
32 ontologyClassBridgeSrvResponse,
33 registerImageToOntologySrv,
34 registerImageToOntologySrvResponse
37 from rapp_platform_ros_communications.msg
import (
41 from std_msgs.msg
import (
55 self.
serv_topic = rospy.get_param(
'rapp_knowrob_wrapper_create_ontology_alias')
57 rospy.logerror(
"rapp_knowrob_wrapper_create_ontology_alias param not found")
60 self.
serv_topic = rospy.get_param(
'rapp_knowrob_wrapper_register_image_object_to_ontology')
62 rospy.logerror(
"rapp_knowrob_wrapper_register_image_object_to_ontology param not found")
66 self.
serv_topic = rospy.get_param(
"rapp_caffe_wrapper_image_classification")
68 rospy.logerror(
"rapp_caffe_wrapper_image_classification")
71 self.
serv_topic = rospy.get_param(
"rapp_caffe_wrapper_get_ontology_class_equivalent")
73 rospy.logerror(
"rapp_caffe_wrapper_get_ontology_class_equivalent")
76 self.
serv_topic = rospy.get_param(
"rapp_caffe_wrapper_register_image_to_ontology")
78 rospy.logerror(
"rapp_caffe_wrapper_register_image_to_ontology")
85 res = imageClassificationSrvResponse()
87 res=it.classifyImage(req)
94 res = ontologyClassBridgeSrvResponse()
96 res=it.getOntologyClassEquivalent(req)
103 res = registerImageToOntologySrvResponse()
105 res=it.registerImage(req)
The RappCaffeWrapper ros node.
def ontologyClassBridgeDataHandler
The ontologyClassBridgeSrv service callback.
Contains the necessary functions for translating caffe classes to ontology classes.
Contains the necessary functions for registering images to the ontology.
def __init__
Default contructor.
def imageClassificationDataHandler
The imageClassificationSrv service callback.
Contains the necessary functions for classifying an images and requesting registration to the ontolog...
def registerImageToOntologyDataHandler
The registerImageToOntologySrv service callback.