# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from moveit_msgs/ChangeDriftDimensionsRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import geometry_msgs.msg

class ChangeDriftDimensionsRequest(genpy.Message):
  _md5sum = "4a5ce44f94cdee672e699df89b1ebaf1"
  _type = "moveit_msgs/ChangeDriftDimensionsRequest"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """# For use with moveit_jog_arm Cartesian planner
#
# Allow the robot to drift along these dimensions in a smooth but unregulated way.
# Give 'true' to enable drift in the direction, 'false' to disable.
# For example, may allow wrist rotation by drift_x_rotation == true.
bool drift_x_translation
bool drift_y_translation
bool drift_z_translation
bool drift_x_rotation
bool drift_y_rotation
bool drift_z_rotation

# Not implemented as of Jan 2020 (for now assumed to be the identity matrix). In the future it will allow us to transform
# from the jog control frame to a unique drift frame, so the robot can drift along off-principal axes
geometry_msgs/Transform transform_jog_frame_to_drift_frame

================================================================================
MSG: geometry_msgs/Transform
# This represents the transform between two coordinate frames in free space.

Vector3 translation
Quaternion rotation

================================================================================
MSG: geometry_msgs/Vector3
# This represents a vector in free space. 
# It is only meant to represent a direction. Therefore, it does not
# make sense to apply a translation to it (e.g., when applying a 
# generic rigid transformation to a Vector3, tf2 will only apply the
# rotation). If you want your data to be translatable too, use the
# geometry_msgs/Point message instead.

float64 x
float64 y
float64 z
================================================================================
MSG: geometry_msgs/Quaternion
# This represents an orientation in free space in quaternion form.

float64 x
float64 y
float64 z
float64 w
"""
  __slots__ = ['drift_x_translation','drift_y_translation','drift_z_translation','drift_x_rotation','drift_y_rotation','drift_z_rotation','transform_jog_frame_to_drift_frame']
  _slot_types = ['bool','bool','bool','bool','bool','bool','geometry_msgs/Transform']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       drift_x_translation,drift_y_translation,drift_z_translation,drift_x_rotation,drift_y_rotation,drift_z_rotation,transform_jog_frame_to_drift_frame

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(ChangeDriftDimensionsRequest, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.drift_x_translation is None:
        self.drift_x_translation = False
      if self.drift_y_translation is None:
        self.drift_y_translation = False
      if self.drift_z_translation is None:
        self.drift_z_translation = False
      if self.drift_x_rotation is None:
        self.drift_x_rotation = False
      if self.drift_y_rotation is None:
        self.drift_y_rotation = False
      if self.drift_z_rotation is None:
        self.drift_z_rotation = False
      if self.transform_jog_frame_to_drift_frame is None:
        self.transform_jog_frame_to_drift_frame = geometry_msgs.msg.Transform()
    else:
      self.drift_x_translation = False
      self.drift_y_translation = False
      self.drift_z_translation = False
      self.drift_x_rotation = False
      self.drift_y_rotation = False
      self.drift_z_rotation = False
      self.transform_jog_frame_to_drift_frame = geometry_msgs.msg.Transform()

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self
      buff.write(_get_struct_6B7d().pack(_x.drift_x_translation, _x.drift_y_translation, _x.drift_z_translation, _x.drift_x_rotation, _x.drift_y_rotation, _x.drift_z_rotation, _x.transform_jog_frame_to_drift_frame.translation.x, _x.transform_jog_frame_to_drift_frame.translation.y, _x.transform_jog_frame_to_drift_frame.translation.z, _x.transform_jog_frame_to_drift_frame.rotation.x, _x.transform_jog_frame_to_drift_frame.rotation.y, _x.transform_jog_frame_to_drift_frame.rotation.z, _x.transform_jog_frame_to_drift_frame.rotation.w))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      if self.transform_jog_frame_to_drift_frame is None:
        self.transform_jog_frame_to_drift_frame = geometry_msgs.msg.Transform()
      end = 0
      _x = self
      start = end
      end += 62
      (_x.drift_x_translation, _x.drift_y_translation, _x.drift_z_translation, _x.drift_x_rotation, _x.drift_y_rotation, _x.drift_z_rotation, _x.transform_jog_frame_to_drift_frame.translation.x, _x.transform_jog_frame_to_drift_frame.translation.y, _x.transform_jog_frame_to_drift_frame.translation.z, _x.transform_jog_frame_to_drift_frame.rotation.x, _x.transform_jog_frame_to_drift_frame.rotation.y, _x.transform_jog_frame_to_drift_frame.rotation.z, _x.transform_jog_frame_to_drift_frame.rotation.w,) = _get_struct_6B7d().unpack(str[start:end])
      self.drift_x_translation = bool(self.drift_x_translation)
      self.drift_y_translation = bool(self.drift_y_translation)
      self.drift_z_translation = bool(self.drift_z_translation)
      self.drift_x_rotation = bool(self.drift_x_rotation)
      self.drift_y_rotation = bool(self.drift_y_rotation)
      self.drift_z_rotation = bool(self.drift_z_rotation)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self
      buff.write(_get_struct_6B7d().pack(_x.drift_x_translation, _x.drift_y_translation, _x.drift_z_translation, _x.drift_x_rotation, _x.drift_y_rotation, _x.drift_z_rotation, _x.transform_jog_frame_to_drift_frame.translation.x, _x.transform_jog_frame_to_drift_frame.translation.y, _x.transform_jog_frame_to_drift_frame.translation.z, _x.transform_jog_frame_to_drift_frame.rotation.x, _x.transform_jog_frame_to_drift_frame.rotation.y, _x.transform_jog_frame_to_drift_frame.rotation.z, _x.transform_jog_frame_to_drift_frame.rotation.w))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      if self.transform_jog_frame_to_drift_frame is None:
        self.transform_jog_frame_to_drift_frame = geometry_msgs.msg.Transform()
      end = 0
      _x = self
      start = end
      end += 62
      (_x.drift_x_translation, _x.drift_y_translation, _x.drift_z_translation, _x.drift_x_rotation, _x.drift_y_rotation, _x.drift_z_rotation, _x.transform_jog_frame_to_drift_frame.translation.x, _x.transform_jog_frame_to_drift_frame.translation.y, _x.transform_jog_frame_to_drift_frame.translation.z, _x.transform_jog_frame_to_drift_frame.rotation.x, _x.transform_jog_frame_to_drift_frame.rotation.y, _x.transform_jog_frame_to_drift_frame.rotation.z, _x.transform_jog_frame_to_drift_frame.rotation.w,) = _get_struct_6B7d().unpack(str[start:end])
      self.drift_x_translation = bool(self.drift_x_translation)
      self.drift_y_translation = bool(self.drift_y_translation)
      self.drift_z_translation = bool(self.drift_z_translation)
      self.drift_x_rotation = bool(self.drift_x_rotation)
      self.drift_y_rotation = bool(self.drift_y_rotation)
      self.drift_z_rotation = bool(self.drift_z_rotation)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_6B7d = None
def _get_struct_6B7d():
    global _struct_6B7d
    if _struct_6B7d is None:
        _struct_6B7d = struct.Struct("<6B7d")
    return _struct_6B7d
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from moveit_msgs/ChangeDriftDimensionsResponse.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class ChangeDriftDimensionsResponse(genpy.Message):
  _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15"
  _type = "moveit_msgs/ChangeDriftDimensionsResponse"
  _has_header = False  # flag to mark the presence of a Header object
  _full_text = """bool success

"""
  __slots__ = ['success']
  _slot_types = ['bool']

  def __init__(self, *args, **kwds):
    """
    Constructor. Any message fields that are implicitly/explicitly
    set to None will be assigned a default value. The recommend
    use is keyword arguments as this is more robust to future message
    changes.  You cannot mix in-order arguments and keyword arguments.

    The available fields are:
       success

    :param args: complete set of field values, in .msg order
    :param kwds: use keyword arguments corresponding to message field names
    to set specific fields.
    """
    if args or kwds:
      super(ChangeDriftDimensionsResponse, self).__init__(*args, **kwds)
      # message fields cannot be None, assign default values for those that are
      if self.success is None:
        self.success = False
    else:
      self.success = False

  def _get_types(self):
    """
    internal API method
    """
    return self._slot_types

  def serialize(self, buff):
    """
    serialize message into buffer
    :param buff: buffer, ``StringIO``
    """
    try:
      _x = self.success
      buff.write(_get_struct_B().pack(_x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 1
      (self.success,) = _get_struct_B().unpack(str[start:end])
      self.success = bool(self.success)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill


  def serialize_numpy(self, buff, numpy):
    """
    serialize message with numpy array types into buffer
    :param buff: buffer, ``StringIO``
    :param numpy: numpy python module
    """
    try:
      _x = self.success
      buff.write(_get_struct_B().pack(_x))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self)))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self)))))

  def deserialize_numpy(self, str, numpy):
    """
    unpack serialized message in str into this message instance using numpy for array types
    :param str: byte array of serialized message, ``str``
    :param numpy: numpy python module
    """
    codecs.lookup_error("rosmsg").msg_type = self._type
    try:
      end = 0
      start = end
      end += 1
      (self.success,) = _get_struct_B().unpack(str[start:end])
      self.success = bool(self.success)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e)  # most likely buffer underfill

_struct_I = genpy.struct_I
def _get_struct_I():
    global _struct_I
    return _struct_I
_struct_B = None
def _get_struct_B():
    global _struct_B
    if _struct_B is None:
        _struct_B = struct.Struct("<B")
    return _struct_B
class ChangeDriftDimensions(object):
  _type          = 'moveit_msgs/ChangeDriftDimensions'
  _md5sum = '0d34c8d563fea2efff65829c37132a15'
  _request_class  = ChangeDriftDimensionsRequest
  _response_class = ChangeDriftDimensionsResponse
