def take_snapshot(self, request):
    'Retrieve a snapshot from the camera.\n\n        :param request: The service request.\n        :type request: :py:class:`axis_camera.srv.TakeSnapshotRequest`\n        :return: The response containing the image.\n        :rtype: :py:class:`axis_camera.srv.TakeSnapshotResponse`\n        :raises: :py:exc:`IOError`, :py:exc:`urllib2.URLError`\n        '
    image_data = self._api.take_snapshot()
    image = CompressedImage()
    image.header.stamp = rospy.Time.now()
    image.header.frame_id = self._frame_id
    image.format = 'jpeg'
    image.data = image_data
    response = TakeSnapshotResponse()
    response.image = image
    return response
Retrieve a snapshot from the camera.

:param request: The service request.
:type request: :py:class:`axis_camera.srv.TakeSnapshotRequest`
:return: The response containing the image.
:rtype: :py:class:`axis_camera.srv.TakeSnapshotResponse`
:raises: :py:exc:`IOError`, :py:exc:`urllib2.URLError`
def take_snapshot(self, request):
    'Retrieve a snapshot from the camera.\n\n        :param request: The service request.\n        :type request: :py:class:`axis_camera.srv.TakeSnapshotRequest`\n        :return: The response containing the image.\n        :rtype: :py:class:`axis_camera.srv.TakeSnapshotResponse`\n        :raises: :py:exc:`IOError`, :py:exc:`urllib2.URLError`\n        '
    image_data = self._api.take_snapshot()
    image = CompressedImage()
    image.header.stamp = rospy.Time.now()
    image.header.frame_id = self._frame_id
    image.format = 'jpeg'
    image.data = image_data
    response = TakeSnapshotResponse()
    response.image = image
    return response