def delete_object_image(self, req):
"""Handles DeleteObjectImage service requests.
Args:
req: DeleteObjectImageRequest message.
Returns:
DeleteObjectImageResponse.
"""
response = interop.srv.DeleteObjectImageResponse()
try:
self.objects_dir.delete_object_image(req.id)
except (KeyError, IOError) as e:
rospy.logerr("Could not delete object image: {}".format(e))
response.success = False
except Exception as e:
rospy.logfatal(e)
response.success = False
else:
response.success = True
return response
评论列表
文章目录