ROS Service global name not defined
I am trying to make my node a ROS service which gets triggered when it receives boolean value of true, thus I have added the following to its constructor:
self.imgproc_srv = rospy.Service("/perception/request_detection", RequestDetection, self.detection_processor_srv)
here is the callback:
def detection_processor_srv(self, req):
print("It works!")
return
And of course, I have the file RequestDetection.srv
as:
bool detection_requested # our trigger to initiate the visual detection
and I imported this in my script as:
from common.srv import *
which is where I plan to keep the services.
Needless to say, I did catkin_make
as well, after all this.
Yet I receive:
NameError: global name 'RequestDetection' is not defined
What am I doing wrong?