import.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 import world_canvas_msgs.srv
00005 
00006 
00007 if __name__ == '__main__':
00008     rospy.init_node('import')
00009     
00010     file = rospy.get_param('~file')
00011 
00012     rospy.loginfo("Waiting for yaml_import service...")
00013     rospy.wait_for_service('yaml_import')
00014 
00015     rospy.loginfo("Import annotations from file '%s'", file)
00016     import_srv = rospy.ServiceProxy('yaml_import', world_canvas_msgs.srv.YAMLImport)
00017     response = import_srv(file)
00018 
00019     if response.result == True:
00020         rospy.loginfo("Database successfully imported from file '%s'", file)
00021     else:
00022         rospy.logerr("Import database failed; %s", response.message)
00023 


world_canvas_server
Author(s): Jorge Santos Simón
autogenerated on Thu Jun 6 2019 21:25:06