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