roboearth detection_result listener
Hello,
I am trying to write a Python program to listen the detection_results topic that is published by re_kinect_object_detector based on this tutorial. However, the datatype of the topics that I am subscribing to and the ones published do not seem to match up. I have tried different types after going through re_msgs and the auto-generated _DetectionResult.py in re_kinect_object_detector but nothing seems to work. Here is my code:
#!/usr/bin/env python
import roslib; roslib.load_manifest('kinect_object_tracker')
import rospy
import re_kinect_object_detector
def callback(data):
print "Got something"
#rospy.loginfo(rospy.get_name() + "I heard %s", data.data)
def listener():
rospy.init_node('getObjectPose')
rospy.Subscriber("re_kinect/detection_results", re_kinect_object_detector.DetectionResult, callback)
rospy.spin()
if __name__ == '__main__':
listener()
When I run this node, I get an error saying that DetectionResult is not a module in re_kinect_object_detector. I tried using DetectedObject from re_msgs but then re_kinect_object_detector gave me a red colored error saying:
[ERROR] [1322431132.952748877]: Client [/getObjectPose] wants topic /re_kinect/detection_results to have datatype/md5sum [re_msgs/DetectedObject/fbf421ad7ea115e18f287b539c57644a], but our version has [re_kinect_object_detector/DetectionResult/49fd3ba0170db3e28d61de95d1d6d5c8]. Dropping connection.
My question is, what is the type that I need to pass in the Subscriber call for getting the detection_results.
Thanks for your help!