00001 """autogenerated by genpy from object_manipulation_msgs/ClusterBoundingBox.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import geometry_msgs.msg
00008 import std_msgs.msg
00009
00010 class ClusterBoundingBox(genpy.Message):
00011 _md5sum = "9bf2b7a44ad666dc3a6a2bbc21782dad"
00012 _type = "object_manipulation_msgs/ClusterBoundingBox"
00013 _has_header = False
00014 _full_text = """# contains a bounding box, which is essentially a box somewhere in space
00015 # used here ususally for the outlier-invariant bounding box of a cluster of points
00016
00017 #the pose of the box frame
00018 geometry_msgs/PoseStamped pose_stamped
00019
00020 #the dimensions of the box
00021 geometry_msgs/Vector3 dimensions
00022
00023 ================================================================================
00024 MSG: geometry_msgs/PoseStamped
00025 # A Pose with reference coordinate frame and timestamp
00026 Header header
00027 Pose pose
00028
00029 ================================================================================
00030 MSG: std_msgs/Header
00031 # Standard metadata for higher-level stamped data types.
00032 # This is generally used to communicate timestamped data
00033 # in a particular coordinate frame.
00034 #
00035 # sequence ID: consecutively increasing ID
00036 uint32 seq
00037 #Two-integer timestamp that is expressed as:
00038 # * stamp.secs: seconds (stamp_secs) since epoch
00039 # * stamp.nsecs: nanoseconds since stamp_secs
00040 # time-handling sugar is provided by the client library
00041 time stamp
00042 #Frame this data is associated with
00043 # 0: no frame
00044 # 1: global frame
00045 string frame_id
00046
00047 ================================================================================
00048 MSG: geometry_msgs/Pose
00049 # A representation of pose in free space, composed of postion and orientation.
00050 Point position
00051 Quaternion orientation
00052
00053 ================================================================================
00054 MSG: geometry_msgs/Point
00055 # This contains the position of a point in free space
00056 float64 x
00057 float64 y
00058 float64 z
00059
00060 ================================================================================
00061 MSG: geometry_msgs/Quaternion
00062 # This represents an orientation in free space in quaternion form.
00063
00064 float64 x
00065 float64 y
00066 float64 z
00067 float64 w
00068
00069 ================================================================================
00070 MSG: geometry_msgs/Vector3
00071 # This represents a vector in free space.
00072
00073 float64 x
00074 float64 y
00075 float64 z
00076 """
00077 __slots__ = ['pose_stamped','dimensions']
00078 _slot_types = ['geometry_msgs/PoseStamped','geometry_msgs/Vector3']
00079
00080 def __init__(self, *args, **kwds):
00081 """
00082 Constructor. Any message fields that are implicitly/explicitly
00083 set to None will be assigned a default value. The recommend
00084 use is keyword arguments as this is more robust to future message
00085 changes. You cannot mix in-order arguments and keyword arguments.
00086
00087 The available fields are:
00088 pose_stamped,dimensions
00089
00090 :param args: complete set of field values, in .msg order
00091 :param kwds: use keyword arguments corresponding to message field names
00092 to set specific fields.
00093 """
00094 if args or kwds:
00095 super(ClusterBoundingBox, self).__init__(*args, **kwds)
00096
00097 if self.pose_stamped is None:
00098 self.pose_stamped = geometry_msgs.msg.PoseStamped()
00099 if self.dimensions is None:
00100 self.dimensions = geometry_msgs.msg.Vector3()
00101 else:
00102 self.pose_stamped = geometry_msgs.msg.PoseStamped()
00103 self.dimensions = geometry_msgs.msg.Vector3()
00104
00105 def _get_types(self):
00106 """
00107 internal API method
00108 """
00109 return self._slot_types
00110
00111 def serialize(self, buff):
00112 """
00113 serialize message into buffer
00114 :param buff: buffer, ``StringIO``
00115 """
00116 try:
00117 _x = self
00118 buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs))
00119 _x = self.pose_stamped.header.frame_id
00120 length = len(_x)
00121 if python3 or type(_x) == unicode:
00122 _x = _x.encode('utf-8')
00123 length = len(_x)
00124 buff.write(struct.pack('<I%ss'%length, length, _x))
00125 _x = self
00126 buff.write(_struct_10d.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.dimensions.x, _x.dimensions.y, _x.dimensions.z))
00127 except struct.error as se: self._check_types(se)
00128 except TypeError as te: self._check_types(te)
00129
00130 def deserialize(self, str):
00131 """
00132 unpack serialized message in str into this message instance
00133 :param str: byte array of serialized message, ``str``
00134 """
00135 try:
00136 if self.pose_stamped is None:
00137 self.pose_stamped = geometry_msgs.msg.PoseStamped()
00138 if self.dimensions is None:
00139 self.dimensions = geometry_msgs.msg.Vector3()
00140 end = 0
00141 _x = self
00142 start = end
00143 end += 12
00144 (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00145 start = end
00146 end += 4
00147 (length,) = _struct_I.unpack(str[start:end])
00148 start = end
00149 end += length
00150 if python3:
00151 self.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00152 else:
00153 self.pose_stamped.header.frame_id = str[start:end]
00154 _x = self
00155 start = end
00156 end += 80
00157 (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.dimensions.x, _x.dimensions.y, _x.dimensions.z,) = _struct_10d.unpack(str[start:end])
00158 return self
00159 except struct.error as e:
00160 raise genpy.DeserializationError(e)
00161
00162
00163 def serialize_numpy(self, buff, numpy):
00164 """
00165 serialize message with numpy array types into buffer
00166 :param buff: buffer, ``StringIO``
00167 :param numpy: numpy python module
00168 """
00169 try:
00170 _x = self
00171 buff.write(_struct_3I.pack(_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs))
00172 _x = self.pose_stamped.header.frame_id
00173 length = len(_x)
00174 if python3 or type(_x) == unicode:
00175 _x = _x.encode('utf-8')
00176 length = len(_x)
00177 buff.write(struct.pack('<I%ss'%length, length, _x))
00178 _x = self
00179 buff.write(_struct_10d.pack(_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.dimensions.x, _x.dimensions.y, _x.dimensions.z))
00180 except struct.error as se: self._check_types(se)
00181 except TypeError as te: self._check_types(te)
00182
00183 def deserialize_numpy(self, str, numpy):
00184 """
00185 unpack serialized message in str into this message instance using numpy for array types
00186 :param str: byte array of serialized message, ``str``
00187 :param numpy: numpy python module
00188 """
00189 try:
00190 if self.pose_stamped is None:
00191 self.pose_stamped = geometry_msgs.msg.PoseStamped()
00192 if self.dimensions is None:
00193 self.dimensions = geometry_msgs.msg.Vector3()
00194 end = 0
00195 _x = self
00196 start = end
00197 end += 12
00198 (_x.pose_stamped.header.seq, _x.pose_stamped.header.stamp.secs, _x.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00199 start = end
00200 end += 4
00201 (length,) = _struct_I.unpack(str[start:end])
00202 start = end
00203 end += length
00204 if python3:
00205 self.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00206 else:
00207 self.pose_stamped.header.frame_id = str[start:end]
00208 _x = self
00209 start = end
00210 end += 80
00211 (_x.pose_stamped.pose.position.x, _x.pose_stamped.pose.position.y, _x.pose_stamped.pose.position.z, _x.pose_stamped.pose.orientation.x, _x.pose_stamped.pose.orientation.y, _x.pose_stamped.pose.orientation.z, _x.pose_stamped.pose.orientation.w, _x.dimensions.x, _x.dimensions.y, _x.dimensions.z,) = _struct_10d.unpack(str[start:end])
00212 return self
00213 except struct.error as e:
00214 raise genpy.DeserializationError(e)
00215
00216 _struct_I = genpy.struct_I
00217 _struct_3I = struct.Struct("<3I")
00218 _struct_10d = struct.Struct("<10d")