<filename>protocol/zzz_perception_msgs/msg/_BoundingBox.py<gh_stars>0
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from zzz_perception_msgs/BoundingBox.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import zzz_perception_msgs.msg
import geometry_msgs.msg

class BoundingBox(genpy.Message):
  _md5sum = "b86d93b46fb62aa8e76866d776c9de52"
  _type = "zzz_perception_msgs/BoundingBox"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """
# A 3D bounding box that can be positioned and rotated about its center (6 DOF). Dimensions of this box are in meters

# The position and orientation of the rigid body center
geometry_msgs/PoseWithCovariance pose

# The size of (in meters) the bounding box surrounding the object's center pose.
DimensionWithCovariance dimension
================================================================================
MSG: geometry_msgs/PoseWithCovariance
# This represents a pose in free space with uncertainty.

Pose pose

# Row-major representation of the 6x6 covariance matrix
# The orientation parameters use a fixed-axis representation.
# In order, the parameters are:
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
float64[36] covariance

================================================================================
MSG: geometry_msgs/Pose
# A representation of pose in free space, composed of position and orientation. 
Point position
Quaternion orientation

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
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

================================================================================
MSG: zzz_perception_msgs/DimensionWithCovariance
# Describing the size object in 3D space (in meters) with uncertainty

float64 length_x # width
float64 length_y # height
float64 length_z # length

# Row-major representation of the 3x3 covariance matrix
# In order, the parameters are: (length_x, length_y, length_z)
float64[9] covariance"""
  __slots__ = ['pose','dimension']
  _slot_types = ['geometry_msgs/PoseWithCovariance','zzz_perception_msgs/DimensionWithCovariance']

  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:
       pose,dimension

    :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(BoundingBox, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
    else:
      self.pose = geometry_msgs.msg.PoseWithCovariance()
      self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()

  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_7d().pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
      buff.write(_get_struct_36d().pack(*self.pose.covariance))
      _x = self
      buff.write(_get_struct_3d().pack(_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z))
      buff.write(_get_struct_9d().pack(*self.dimension.covariance))
    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``
    """
    try:
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
      end = 0
      _x = self
      start = end
      end += 56
      (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 288
      self.pose.covariance = _get_struct_36d().unpack(str[start:end])
      _x = self
      start = end
      end += 24
      (_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z,) = _get_struct_3d().unpack(str[start:end])
      start = end
      end += 72
      self.dimension.covariance = _get_struct_9d().unpack(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(_get_struct_7d().pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
      buff.write(self.pose.covariance.tostring())
      _x = self
      buff.write(_get_struct_3d().pack(_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z))
      buff.write(self.dimension.covariance.tostring())
    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
    """
    try:
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
      end = 0
      _x = self
      start = end
      end += 56
      (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 288
      self.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
      _x = self
      start = end
      end += 24
      (_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z,) = _get_struct_3d().unpack(str[start:end])
      start = end
      end += 72
      self.dimension.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
      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_36d = None
def _get_struct_36d():
    global _struct_36d
    if _struct_36d is None:
        _struct_36d = struct.Struct("<36d")
    return _struct_36d
_struct_7d = None
def _get_struct_7d():
    global _struct_7d
    if _struct_7d is None:
        _struct_7d = struct.Struct("<7d")
    return _struct_7d
_struct_9d = None
def _get_struct_9d():
    global _struct_9d
    if _struct_9d is None:
        _struct_9d = struct.Struct("<9d")
    return _struct_9d
_struct_3d = None
def _get_struct_3d():
    global _struct_3d
    if _struct_3d is None:
        _struct_3d = struct.Struct("<3d")
    return _struct_3d

<filename>protocol/zzz_perception_msgs/msg/_BoundingBox.py<gh_stars>0
# This Python file uses the following encoding: utf-8
"""autogenerated by genpy from zzz_perception_msgs/BoundingBox.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct

import zzz_perception_msgs.msg
import geometry_msgs.msg

class BoundingBox(genpy.Message):
  _md5sum = "b86d93b46fb62aa8e76866d776c9de52"
  _type = "zzz_perception_msgs/BoundingBox"
  _has_header = False #flag to mark the presence of a Header object
  _full_text = """
# A 3D bounding box that can be positioned and rotated about its center (6 DOF). Dimensions of this box are in meters

# The position and orientation of the rigid body center
geometry_msgs/PoseWithCovariance pose

# The size of (in meters) the bounding box surrounding the object's center pose.
DimensionWithCovariance dimension
================================================================================
MSG: geometry_msgs/PoseWithCovariance
# This represents a pose in free space with uncertainty.

Pose pose

# Row-major representation of the 6x6 covariance matrix
# The orientation parameters use a fixed-axis representation.
# In order, the parameters are:
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
float64[36] covariance

================================================================================
MSG: geometry_msgs/Pose
# A representation of pose in free space, composed of position and orientation. 
Point position
Quaternion orientation

================================================================================
MSG: geometry_msgs/Point
# This contains the position of a point in free space
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

================================================================================
MSG: zzz_perception_msgs/DimensionWithCovariance
# Describing the size object in 3D space (in meters) with uncertainty

float64 length_x # width
float64 length_y # height
float64 length_z # length

# Row-major representation of the 3x3 covariance matrix
# In order, the parameters are: (length_x, length_y, length_z)
float64[9] covariance"""
  __slots__ = ['pose','dimension']
  _slot_types = ['geometry_msgs/PoseWithCovariance','zzz_perception_msgs/DimensionWithCovariance']

  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:
       pose,dimension

    :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(BoundingBox, self).__init__(*args, **kwds)
      #message fields cannot be None, assign default values for those that are
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
    else:
      self.pose = geometry_msgs.msg.PoseWithCovariance()
      self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()

  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_7d().pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
      buff.write(_get_struct_36d().pack(*self.pose.covariance))
      _x = self
      buff.write(_get_struct_3d().pack(_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z))
      buff.write(_get_struct_9d().pack(*self.dimension.covariance))
    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``
    """
    try:
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
      end = 0
      _x = self
      start = end
      end += 56
      (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 288
      self.pose.covariance = _get_struct_36d().unpack(str[start:end])
      _x = self
      start = end
      end += 24
      (_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z,) = _get_struct_3d().unpack(str[start:end])
      start = end
      end += 72
      self.dimension.covariance = _get_struct_9d().unpack(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(_get_struct_7d().pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w))
      buff.write(self.pose.covariance.tostring())
      _x = self
      buff.write(_get_struct_3d().pack(_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z))
      buff.write(self.dimension.covariance.tostring())
    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
    """
    try:
      if self.pose is None:
        self.pose = geometry_msgs.msg.PoseWithCovariance()
      if self.dimension is None:
        self.dimension = zzz_perception_msgs.msg.DimensionWithCovariance()
      end = 0
      _x = self
      start = end
      end += 56
      (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w,) = _get_struct_7d().unpack(str[start:end])
      start = end
      end += 288
      self.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
      _x = self
      start = end
      end += 24
      (_x.dimension.length_x, _x.dimension.length_y, _x.dimension.length_z,) = _get_struct_3d().unpack(str[start:end])
      start = end
      end += 72
      self.dimension.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=9)
      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_36d = None
def _get_struct_36d():
    global _struct_36d
    if _struct_36d is None:
        _struct_36d = struct.Struct("<36d")
    return _struct_36d
_struct_7d = None
def _get_struct_7d():
    global _struct_7d
    if _struct_7d is None:
        _struct_7d = struct.Struct("<7d")
    return _struct_7d
_struct_9d = None
def _get_struct_9d():
    global _struct_9d
    if _struct_9d is None:
        _struct_9d = struct.Struct("<9d")
    return _struct_9d
_struct_3d = None
def _get_struct_3d():
    global _struct_3d
    if _struct_3d is None:
        _struct_3d = struct.Struct("<3d")
    return _struct_3d

# This Python file uses the following encoding: utf-8 autogenerated by genpy from zzz_perception_msgs/BoundingBox.msg. Do not edit. #flag to mark the presence of a Header object # A 3D bounding box that can be positioned and rotated about its center (6 DOF). Dimensions of this box are in meters  # The position and orientation of the rigid body center geometry_msgs/PoseWithCovariance pose  # The size of (in meters) the bounding box surrounding the object's center pose. DimensionWithCovariance dimension ================================================================================ MSG: geometry_msgs/PoseWithCovariance # This represents a pose in free space with uncertainty.  Pose pose  # Row-major representation of the 6x6 covariance matrix # The orientation parameters use a fixed-axis representation. # In order, the parameters are: # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis) float64[36] covariance  ================================================================================ MSG: geometry_msgs/Pose # A representation of pose in free space, composed of position and orientation.  Point position Quaternion orientation  ================================================================================ MSG: geometry_msgs/Point # This contains the position of a point in free space 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  ================================================================================ MSG: zzz_perception_msgs/DimensionWithCovariance # Describing the size object in 3D space (in meters) with uncertainty  float64 length_x # width float64 length_y # height float64 length_z # length  # Row-major representation of the 3x3 covariance matrix # In order, the parameters are: (length_x, length_y, length_z) float64[9] covariance 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:        pose,dimension      :param args: complete set of field values, in .msg order     :param kwds: use keyword arguments corresponding to message field names     to set specific fields. #message fields cannot be None, assign default values for those that are internal API method serialize message into buffer     :param buff: buffer, ``StringIO`` unpack serialized message in str into this message instance     :param str: byte array of serialized message, ``str`` #most likely buffer underfill serialize message with numpy array types into buffer     :param buff: buffer, ``StringIO``     :param numpy: numpy python module 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 #most likely buffer underfill