Q: I’m having a lot of troubles doing the following in ROS: I would like to subscribe to a fakeARpublisher and resend a pose information through a service. In short, I did a script that it is subscribed to a topic and at the same time acts like a server for a service called LocalizePart. The code is given below:
A: Hello,
I had formatted your code got something like this:
Finally, I’ve reproduced your problem and concluded that to solve it you only have to import the server response library.
ROS creates 3 classes for each service message: Service definition, Request message and Response message. You should take a look here: http://wiki.ros.org/rospy/Overview/Services
Following the code I’ve posted, I had just to replace this:
from myworkcell.srv import LocalizePart
with this:
from myworkcell.srv import LocalizePart, LocalizePartResponse
I hope it can help you!
0 Comments