How to retrieve object name by providing object id?
Hi, I have run pr2_pick_and_place_demos and got object_id for a cup.
After retrieving the object id, I want to know the name of the detected object in data base, I found that there's a service handling this kind of request(which is stated here.)
But I cannot find this service with "rosservice list"(obviously it is not launched), I want to ask if anyone knows how to start this service so that I can request the name with this snippet of code.
Edit:
(The code below works if you create a package named getObjectName and depend this package on household_objects_database_msgs)
#!/usr/bin/env python
import roslib;
roslib.load_manifest('getObjectName') #For loading srv in household_objects_database_msgs
import rospy
from household_objects_database_msgs.srv import *
rospy.wait_for_service('/objects_database_node/get_model_description')
get_object_name=rospy.ServiceProxy('objects_database_node/get_model_description',GetModelDescription)
resp = get_object_name(18744) #Object id is 18744
print resp
Thanks in advance.