"""autogenerated by genpy from cpg/ModifyParametersRequest.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class ModifyParametersRequest(genpy.Message):
  _md5sum = "b77231e4a9814c4335488a7d53be3d5c"
  _type = "cpg/ModifyParametersRequest"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """float32 major_ax
float32 minor_ax
float32 coup_strength
float32 limit_cycle
float32 forward_velocity
float32 curvature
float64[] x_offset
float64[] y_offset
int32[] coupling_1
int32[] coupling_2
int32[] coupling_3
int32[] coupling_4
int32[] coupling_5
int32[] coupling_6

"""
  __slots__ = ['major_ax','minor_ax','coup_strength','limit_cycle','forward_velocity','curvature','x_offset','y_offset','coupling_1','coupling_2','coupling_3','coupling_4','coupling_5','coupling_6']
  _slot_types = ['float32','float32','float32','float32','float32','float32','float64[]','float64[]','int32[]','int32[]','int32[]','int32[]','int32[]','int32[]']

  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:
       major_ax,minor_ax,coup_strength,limit_cycle,forward_velocity,curvature,x_offset,y_offset,coupling_1,coupling_2,coupling_3,coupling_4,coupling_5,coupling_6

    :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(ModifyParametersRequest, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.major_ax is None:
        self.major_ax = 0.
      if self.minor_ax is None:
        self.minor_ax = 0.
      if self.coup_strength is None:
        self.coup_strength = 0.
      if self.limit_cycle is None:
        self.limit_cycle = 0.
      if self.forward_velocity is None:
        self.forward_velocity = 0.
      if self.curvature is None:
        self.curvature = 0.
      if self.x_offset is None:
        self.x_offset = []
      if self.y_offset is None:
        self.y_offset = []
      if self.coupling_1 is None:
        self.coupling_1 = []
      if self.coupling_2 is None:
        self.coupling_2 = []
      if self.coupling_3 is None:
        self.coupling_3 = []
      if self.coupling_4 is None:
        self.coupling_4 = []
      if self.coupling_5 is None:
        self.coupling_5 = []
      if self.coupling_6 is None:
        self.coupling_6 = []
    else:
      self.major_ax = 0.
      self.minor_ax = 0.
      self.coup_strength = 0.
      self.limit_cycle = 0.
      self.forward_velocity = 0.
      self.curvature = 0.
      self.x_offset = []
      self.y_offset = []
      self.coupling_1 = []
      self.coupling_2 = []
      self.coupling_3 = []
      self.coupling_4 = []
      self.coupling_5 = []
      self.coupling_6 = []

  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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature))
      length = len(self.x_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.pack(pattern, *self.x_offset))
      length = len(self.y_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.pack(pattern, *self.y_offset))
      length = len(self.coupling_1)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_1))
      length = len(self.coupling_2)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_2))
      length = len(self.coupling_3)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_3))
      length = len(self.coupling_4)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_4))
      length = len(self.coupling_5)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_5))
      length = len(self.coupling_6)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_6))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    try:
      end = 0
      _x = self
      start = end
      end += 24
      (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature,) = _struct_6f.unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.x_offset = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.y_offset = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_1 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_2 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_3 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_4 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_5 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_6 = struct.unpack(pattern, str[start:end])
      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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature))
      length = len(self.x_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.x_offset.tostring())
      length = len(self.y_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.y_offset.tostring())
      length = len(self.coupling_1)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_1.tostring())
      length = len(self.coupling_2)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_2.tostring())
      length = len(self.coupling_3)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_3.tostring())
      length = len(self.coupling_4)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_4.tostring())
      length = len(self.coupling_5)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_5.tostring())
      length = len(self.coupling_6)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_6.tostring())
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  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
    """
    try:
      end = 0
      _x = self
      start = end
      end += 24
      (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature,) = _struct_6f.unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.x_offset = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.y_offset = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_1 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_2 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_3 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_4 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_5 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_6 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill

_struct_I = genpy.struct_I
_struct_6f = struct.Struct("<6f")
"""autogenerated by genpy from cpg/ModifyParametersResponse.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class ModifyParametersResponse(genpy.Message):
  _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
  _type = "cpg/ModifyParametersResponse"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """

"""
  __slots__ = []
  _slot_types = []

  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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    try:
      end = 0
      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:
      pass
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  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
    """
    try:
      end = 0
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill

_struct_I = genpy.struct_I
class ModifyParameters(object):
  _type          = 'cpg/ModifyParameters'
  _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
  _request_class  = ModifyParametersRequest
  _response_class = ModifyParametersResponse

be4a726ed6460408ac08b6ae7ee4ab8fd23c9c8b
<mask token>


class ModifyParametersResponse(genpy.Message):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)

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

    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
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


<mask token>


class ModifyParameters(object):
    _type = 'cpg/ModifyParameters'
    _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
    _request_class = ModifyParametersRequest
    _response_class = ModifyParametersResponse

<mask token>


class ModifyParametersRequest(genpy.Message):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>


<mask token>


class ModifyParametersResponse(genpy.Message):
    _md5sum = 'd41d8cd98f00b204e9800998ecf8427e'
    _type = 'cpg/ModifyParametersResponse'
    _has_header = False
    _full_text = '\n\n'
    __slots__ = []
    _slot_types = []

    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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)

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

    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
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


<mask token>


class ModifyParameters(object):
    _type = 'cpg/ModifyParameters'
    _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
    _request_class = ModifyParametersRequest
    _response_class = ModifyParametersResponse

<mask token>


class ModifyParametersRequest(genpy.Message):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    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:
       major_ax,minor_ax,coup_strength,limit_cycle,forward_velocity,curvature,x_offset,y_offset,coupling_1,coupling_2,coupling_3,coupling_4,coupling_5,coupling_6

    :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(ModifyParametersRequest, self).__init__(*args, **kwds)
            if self.major_ax is None:
                self.major_ax = 0.0
            if self.minor_ax is None:
                self.minor_ax = 0.0
            if self.coup_strength is None:
                self.coup_strength = 0.0
            if self.limit_cycle is None:
                self.limit_cycle = 0.0
            if self.forward_velocity is None:
                self.forward_velocity = 0.0
            if self.curvature is None:
                self.curvature = 0.0
            if self.x_offset is None:
                self.x_offset = []
            if self.y_offset is None:
                self.y_offset = []
            if self.coupling_1 is None:
                self.coupling_1 = []
            if self.coupling_2 is None:
                self.coupling_2 = []
            if self.coupling_3 is None:
                self.coupling_3 = []
            if self.coupling_4 is None:
                self.coupling_4 = []
            if self.coupling_5 is None:
                self.coupling_5 = []
            if self.coupling_6 is None:
                self.coupling_6 = []
        else:
            self.major_ax = 0.0
            self.minor_ax = 0.0
            self.coup_strength = 0.0
            self.limit_cycle = 0.0
            self.forward_velocity = 0.0
            self.curvature = 0.0
            self.x_offset = []
            self.y_offset = []
            self.coupling_1 = []
            self.coupling_2 = []
            self.coupling_3 = []
            self.coupling_4 = []
            self.coupling_5 = []
            self.coupling_6 = []

    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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.
                coup_strength, _x.limit_cycle, _x.forward_velocity, _x.
                curvature))
            length = len(self.x_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(struct.pack(pattern, *self.x_offset))
            length = len(self.y_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(struct.pack(pattern, *self.y_offset))
            length = len(self.coupling_1)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_1))
            length = len(self.coupling_2)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_2))
            length = len(self.coupling_3)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_3))
            length = len(self.coupling_4)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_4))
            length = len(self.coupling_5)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_5))
            length = len(self.coupling_6)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_6))
        except struct.error as se:
            self._check_types(struct.error("%s: '%s' when writing '%s'" % (
                type(se), str(se), str(_x))))
        except TypeError as te:
            self._check_types(ValueError("%s: '%s' when writing '%s'" % (
                type(te), str(te), str(_x))))

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            _x = self
            start = end
            end += 24
            (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x
                .forward_velocity, _x.curvature) = _struct_6f.unpack(str[
                start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.x_offset = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.y_offset = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_1 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_2 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_3 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_4 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_5 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_6 = struct.unpack(pattern, str[start:end])
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)
    <mask token>

    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
    """
        try:
            end = 0
            _x = self
            start = end
            end += 24
            (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x
                .forward_velocity, _x.curvature) = _struct_6f.unpack(str[
                start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.x_offset = numpy.frombuffer(str[start:end], dtype=numpy.
                float64, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.y_offset = numpy.frombuffer(str[start:end], dtype=numpy.
                float64, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_1 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_2 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_3 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_4 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_5 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_6 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


<mask token>


class ModifyParametersResponse(genpy.Message):
    _md5sum = 'd41d8cd98f00b204e9800998ecf8427e'
    _type = 'cpg/ModifyParametersResponse'
    _has_header = False
    _full_text = '\n\n'
    __slots__ = []
    _slot_types = []

    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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)

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

    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
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


<mask token>


class ModifyParameters(object):
    _type = 'cpg/ModifyParameters'
    _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
    _request_class = ModifyParametersRequest
    _response_class = ModifyParametersResponse

<mask token>
python3 = True if sys.hexversion > 50331648 else False
<mask token>


class ModifyParametersRequest(genpy.Message):
    _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
    _type = 'cpg/ModifyParametersRequest'
    _has_header = False
    _full_text = """float32 major_ax
float32 minor_ax
float32 coup_strength
float32 limit_cycle
float32 forward_velocity
float32 curvature
float64[] x_offset
float64[] y_offset
int32[] coupling_1
int32[] coupling_2
int32[] coupling_3
int32[] coupling_4
int32[] coupling_5
int32[] coupling_6

"""
    __slots__ = ['major_ax', 'minor_ax', 'coup_strength', 'limit_cycle',
        'forward_velocity', 'curvature', 'x_offset', 'y_offset',
        'coupling_1', 'coupling_2', 'coupling_3', 'coupling_4',
        'coupling_5', 'coupling_6']
    _slot_types = ['float32', 'float32', 'float32', 'float32', 'float32',
        'float32', 'float64[]', 'float64[]', 'int32[]', 'int32[]',
        'int32[]', 'int32[]', 'int32[]', 'int32[]']

    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:
       major_ax,minor_ax,coup_strength,limit_cycle,forward_velocity,curvature,x_offset,y_offset,coupling_1,coupling_2,coupling_3,coupling_4,coupling_5,coupling_6

    :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(ModifyParametersRequest, self).__init__(*args, **kwds)
            if self.major_ax is None:
                self.major_ax = 0.0
            if self.minor_ax is None:
                self.minor_ax = 0.0
            if self.coup_strength is None:
                self.coup_strength = 0.0
            if self.limit_cycle is None:
                self.limit_cycle = 0.0
            if self.forward_velocity is None:
                self.forward_velocity = 0.0
            if self.curvature is None:
                self.curvature = 0.0
            if self.x_offset is None:
                self.x_offset = []
            if self.y_offset is None:
                self.y_offset = []
            if self.coupling_1 is None:
                self.coupling_1 = []
            if self.coupling_2 is None:
                self.coupling_2 = []
            if self.coupling_3 is None:
                self.coupling_3 = []
            if self.coupling_4 is None:
                self.coupling_4 = []
            if self.coupling_5 is None:
                self.coupling_5 = []
            if self.coupling_6 is None:
                self.coupling_6 = []
        else:
            self.major_ax = 0.0
            self.minor_ax = 0.0
            self.coup_strength = 0.0
            self.limit_cycle = 0.0
            self.forward_velocity = 0.0
            self.curvature = 0.0
            self.x_offset = []
            self.y_offset = []
            self.coupling_1 = []
            self.coupling_2 = []
            self.coupling_3 = []
            self.coupling_4 = []
            self.coupling_5 = []
            self.coupling_6 = []

    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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.
                coup_strength, _x.limit_cycle, _x.forward_velocity, _x.
                curvature))
            length = len(self.x_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(struct.pack(pattern, *self.x_offset))
            length = len(self.y_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(struct.pack(pattern, *self.y_offset))
            length = len(self.coupling_1)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_1))
            length = len(self.coupling_2)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_2))
            length = len(self.coupling_3)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_3))
            length = len(self.coupling_4)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_4))
            length = len(self.coupling_5)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_5))
            length = len(self.coupling_6)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(struct.pack(pattern, *self.coupling_6))
        except struct.error as se:
            self._check_types(struct.error("%s: '%s' when writing '%s'" % (
                type(se), str(se), str(_x))))
        except TypeError as te:
            self._check_types(ValueError("%s: '%s' when writing '%s'" % (
                type(te), str(te), str(_x))))

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            _x = self
            start = end
            end += 24
            (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x
                .forward_velocity, _x.curvature) = _struct_6f.unpack(str[
                start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.x_offset = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.y_offset = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_1 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_2 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_3 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_4 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_5 = struct.unpack(pattern, str[start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_6 = struct.unpack(pattern, str[start:end])
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)

    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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.
                coup_strength, _x.limit_cycle, _x.forward_velocity, _x.
                curvature))
            length = len(self.x_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(self.x_offset.tostring())
            length = len(self.y_offset)
            buff.write(_struct_I.pack(length))
            pattern = '<%sd' % length
            buff.write(self.y_offset.tostring())
            length = len(self.coupling_1)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_1.tostring())
            length = len(self.coupling_2)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_2.tostring())
            length = len(self.coupling_3)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_3.tostring())
            length = len(self.coupling_4)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_4.tostring())
            length = len(self.coupling_5)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_5.tostring())
            length = len(self.coupling_6)
            buff.write(_struct_I.pack(length))
            pattern = '<%si' % length
            buff.write(self.coupling_6.tostring())
        except struct.error as se:
            self._check_types(struct.error("%s: '%s' when writing '%s'" % (
                type(se), str(se), str(_x))))
        except TypeError as te:
            self._check_types(ValueError("%s: '%s' when writing '%s'" % (
                type(te), str(te), str(_x))))

    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
    """
        try:
            end = 0
            _x = self
            start = end
            end += 24
            (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x
                .forward_velocity, _x.curvature) = _struct_6f.unpack(str[
                start:end])
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.x_offset = numpy.frombuffer(str[start:end], dtype=numpy.
                float64, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%sd' % length
            start = end
            end += struct.calcsize(pattern)
            self.y_offset = numpy.frombuffer(str[start:end], dtype=numpy.
                float64, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_1 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_2 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_3 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_4 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_5 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            start = end
            end += 4
            length, = _struct_I.unpack(str[start:end])
            pattern = '<%si' % length
            start = end
            end += struct.calcsize(pattern)
            self.coupling_6 = numpy.frombuffer(str[start:end], dtype=numpy.
                int32, count=length)
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


_struct_I = genpy.struct_I
_struct_6f = struct.Struct('<6f')
<mask token>
python3 = True if sys.hexversion > 50331648 else False
<mask token>


class ModifyParametersResponse(genpy.Message):
    _md5sum = 'd41d8cd98f00b204e9800998ecf8427e'
    _type = 'cpg/ModifyParametersResponse'
    _has_header = False
    _full_text = '\n\n'
    __slots__ = []
    _slot_types = []

    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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

    def deserialize(self, str):
        """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)

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

    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
    """
        try:
            end = 0
            return self
        except struct.error as e:
            raise genpy.DeserializationError(e)


_struct_I = genpy.struct_I


class ModifyParameters(object):
    _type = 'cpg/ModifyParameters'
    _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
    _request_class = ModifyParametersRequest
    _response_class = ModifyParametersResponse

"""autogenerated by genpy from cpg/ModifyParametersRequest.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class ModifyParametersRequest(genpy.Message):
  _md5sum = "b77231e4a9814c4335488a7d53be3d5c"
  _type = "cpg/ModifyParametersRequest"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """float32 major_ax
float32 minor_ax
float32 coup_strength
float32 limit_cycle
float32 forward_velocity
float32 curvature
float64[] x_offset
float64[] y_offset
int32[] coupling_1
int32[] coupling_2
int32[] coupling_3
int32[] coupling_4
int32[] coupling_5
int32[] coupling_6

"""
  __slots__ = ['major_ax','minor_ax','coup_strength','limit_cycle','forward_velocity','curvature','x_offset','y_offset','coupling_1','coupling_2','coupling_3','coupling_4','coupling_5','coupling_6']
  _slot_types = ['float32','float32','float32','float32','float32','float32','float64[]','float64[]','int32[]','int32[]','int32[]','int32[]','int32[]','int32[]']

  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:
       major_ax,minor_ax,coup_strength,limit_cycle,forward_velocity,curvature,x_offset,y_offset,coupling_1,coupling_2,coupling_3,coupling_4,coupling_5,coupling_6

    :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(ModifyParametersRequest, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.major_ax is None:
        self.major_ax = 0.
      if self.minor_ax is None:
        self.minor_ax = 0.
      if self.coup_strength is None:
        self.coup_strength = 0.
      if self.limit_cycle is None:
        self.limit_cycle = 0.
      if self.forward_velocity is None:
        self.forward_velocity = 0.
      if self.curvature is None:
        self.curvature = 0.
      if self.x_offset is None:
        self.x_offset = []
      if self.y_offset is None:
        self.y_offset = []
      if self.coupling_1 is None:
        self.coupling_1 = []
      if self.coupling_2 is None:
        self.coupling_2 = []
      if self.coupling_3 is None:
        self.coupling_3 = []
      if self.coupling_4 is None:
        self.coupling_4 = []
      if self.coupling_5 is None:
        self.coupling_5 = []
      if self.coupling_6 is None:
        self.coupling_6 = []
    else:
      self.major_ax = 0.
      self.minor_ax = 0.
      self.coup_strength = 0.
      self.limit_cycle = 0.
      self.forward_velocity = 0.
      self.curvature = 0.
      self.x_offset = []
      self.y_offset = []
      self.coupling_1 = []
      self.coupling_2 = []
      self.coupling_3 = []
      self.coupling_4 = []
      self.coupling_5 = []
      self.coupling_6 = []

  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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature))
      length = len(self.x_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.pack(pattern, *self.x_offset))
      length = len(self.y_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(struct.pack(pattern, *self.y_offset))
      length = len(self.coupling_1)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_1))
      length = len(self.coupling_2)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_2))
      length = len(self.coupling_3)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_3))
      length = len(self.coupling_4)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_4))
      length = len(self.coupling_5)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_5))
      length = len(self.coupling_6)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(struct.pack(pattern, *self.coupling_6))
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    try:
      end = 0
      _x = self
      start = end
      end += 24
      (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature,) = _struct_6f.unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.x_offset = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.y_offset = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_1 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_2 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_3 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_4 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_5 = struct.unpack(pattern, str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_6 = struct.unpack(pattern, str[start:end])
      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(_struct_6f.pack(_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature))
      length = len(self.x_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.x_offset.tostring())
      length = len(self.y_offset)
      buff.write(_struct_I.pack(length))
      pattern = '<%sd'%length
      buff.write(self.y_offset.tostring())
      length = len(self.coupling_1)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_1.tostring())
      length = len(self.coupling_2)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_2.tostring())
      length = len(self.coupling_3)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_3.tostring())
      length = len(self.coupling_4)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_4.tostring())
      length = len(self.coupling_5)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_5.tostring())
      length = len(self.coupling_6)
      buff.write(_struct_I.pack(length))
      pattern = '<%si'%length
      buff.write(self.coupling_6.tostring())
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  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
    """
    try:
      end = 0
      _x = self
      start = end
      end += 24
      (_x.major_ax, _x.minor_ax, _x.coup_strength, _x.limit_cycle, _x.forward_velocity, _x.curvature,) = _struct_6f.unpack(str[start:end])
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.x_offset = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%sd'%length
      start = end
      end += struct.calcsize(pattern)
      self.y_offset = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_1 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_2 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_3 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_4 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_5 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      start = end
      end += 4
      (length,) = _struct_I.unpack(str[start:end])
      pattern = '<%si'%length
      start = end
      end += struct.calcsize(pattern)
      self.coupling_6 = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill

_struct_I = genpy.struct_I
_struct_6f = struct.Struct("<6f")
"""autogenerated by genpy from cpg/ModifyParametersResponse.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct


class ModifyParametersResponse(genpy.Message):
  _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
  _type = "cpg/ModifyParametersResponse"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """

"""
  __slots__ = []
  _slot_types = []

  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:
       

    :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(ModifyParametersResponse, self).__init__(*args, **kwds)

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

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

  def deserialize(self, str):
    """
    unpack serialized message in str into this message instance
    :param str: byte array of serialized message, ``str``
    """
    try:
      end = 0
      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:
      pass
    except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
    except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))

  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
    """
    try:
      end = 0
      return self
    except struct.error as e:
      raise genpy.DeserializationError(e) #most likely buffer underfill

_struct_I = genpy.struct_I
class ModifyParameters(object):
  _type          = 'cpg/ModifyParameters'
  _md5sum = 'b77231e4a9814c4335488a7d53be3d5c'
  _request_class  = ModifyParametersRequest
  _response_class = ModifyParametersResponse
