00001 """autogenerated by genmsg_py from FindClusterBoundingBox2Request.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006 import sensor_msgs.msg
00007
00008 class FindClusterBoundingBox2Request(roslib.message.Message):
00009 _md5sum = "526994c9d06037106595eb6bae52d4e8"
00010 _type = "object_manipulation_msgs/FindClusterBoundingBox2Request"
00011 _has_header = False
00012 _full_text = """sensor_msgs/PointCloud2 cluster
00013
00014
00015 ================================================================================
00016 MSG: sensor_msgs/PointCloud2
00017 # This message holds a collection of N-dimensional points, which may
00018 # contain additional information such as normals, intensity, etc. The
00019 # point data is stored as a binary blob, its layout described by the
00020 # contents of the "fields" array.
00021
00022 # The point cloud data may be organized 2d (image-like) or 1d
00023 # (unordered). Point clouds organized as 2d images may be produced by
00024 # camera depth sensors such as stereo or time-of-flight.
00025
00026 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00027 # points).
00028 Header header
00029
00030 # 2D structure of the point cloud. If the cloud is unordered, height is
00031 # 1 and width is the length of the point cloud.
00032 uint32 height
00033 uint32 width
00034
00035 # Describes the channels and their layout in the binary data blob.
00036 PointField[] fields
00037
00038 bool is_bigendian # Is this data bigendian?
00039 uint32 point_step # Length of a point in bytes
00040 uint32 row_step # Length of a row in bytes
00041 uint8[] data # Actual point data, size is (row_step*height)
00042
00043 bool is_dense # True if there are no invalid points
00044
00045 ================================================================================
00046 MSG: std_msgs/Header
00047 # Standard metadata for higher-level stamped data types.
00048 # This is generally used to communicate timestamped data
00049 # in a particular coordinate frame.
00050 #
00051 # sequence ID: consecutively increasing ID
00052 uint32 seq
00053 #Two-integer timestamp that is expressed as:
00054 # * stamp.secs: seconds (stamp_secs) since epoch
00055 # * stamp.nsecs: nanoseconds since stamp_secs
00056 # time-handling sugar is provided by the client library
00057 time stamp
00058 #Frame this data is associated with
00059 # 0: no frame
00060 # 1: global frame
00061 string frame_id
00062
00063 ================================================================================
00064 MSG: sensor_msgs/PointField
00065 # This message holds the description of one point entry in the
00066 # PointCloud2 message format.
00067 uint8 INT8 = 1
00068 uint8 UINT8 = 2
00069 uint8 INT16 = 3
00070 uint8 UINT16 = 4
00071 uint8 INT32 = 5
00072 uint8 UINT32 = 6
00073 uint8 FLOAT32 = 7
00074 uint8 FLOAT64 = 8
00075
00076 string name # Name of field
00077 uint32 offset # Offset from start of point struct
00078 uint8 datatype # Datatype enumeration, see above
00079 uint32 count # How many elements in the field
00080
00081 """
00082 __slots__ = ['cluster']
00083 _slot_types = ['sensor_msgs/PointCloud2']
00084
00085 def __init__(self, *args, **kwds):
00086 """
00087 Constructor. Any message fields that are implicitly/explicitly
00088 set to None will be assigned a default value. The recommend
00089 use is keyword arguments as this is more robust to future message
00090 changes. You cannot mix in-order arguments and keyword arguments.
00091
00092 The available fields are:
00093 cluster
00094
00095 @param args: complete set of field values, in .msg order
00096 @param kwds: use keyword arguments corresponding to message field names
00097 to set specific fields.
00098 """
00099 if args or kwds:
00100 super(FindClusterBoundingBox2Request, self).__init__(*args, **kwds)
00101
00102 if self.cluster is None:
00103 self.cluster = sensor_msgs.msg.PointCloud2()
00104 else:
00105 self.cluster = sensor_msgs.msg.PointCloud2()
00106
00107 def _get_types(self):
00108 """
00109 internal API method
00110 """
00111 return self._slot_types
00112
00113 def serialize(self, buff):
00114 """
00115 serialize message into buffer
00116 @param buff: buffer
00117 @type buff: StringIO
00118 """
00119 try:
00120 _x = self
00121 buff.write(_struct_3I.pack(_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs))
00122 _x = self.cluster.header.frame_id
00123 length = len(_x)
00124 buff.write(struct.pack('<I%ss'%length, length, _x))
00125 _x = self
00126 buff.write(_struct_2I.pack(_x.cluster.height, _x.cluster.width))
00127 length = len(self.cluster.fields)
00128 buff.write(_struct_I.pack(length))
00129 for val1 in self.cluster.fields:
00130 _x = val1.name
00131 length = len(_x)
00132 buff.write(struct.pack('<I%ss'%length, length, _x))
00133 _x = val1
00134 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00135 _x = self
00136 buff.write(_struct_B2I.pack(_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step))
00137 _x = self.cluster.data
00138 length = len(_x)
00139
00140 if type(_x) in [list, tuple]:
00141 buff.write(struct.pack('<I%sB'%length, length, *_x))
00142 else:
00143 buff.write(struct.pack('<I%ss'%length, length, _x))
00144 buff.write(_struct_B.pack(self.cluster.is_dense))
00145 except struct.error as se: self._check_types(se)
00146 except TypeError as te: self._check_types(te)
00147
00148 def deserialize(self, str):
00149 """
00150 unpack serialized message in str into this message instance
00151 @param str: byte array of serialized message
00152 @type str: str
00153 """
00154 try:
00155 if self.cluster is None:
00156 self.cluster = sensor_msgs.msg.PointCloud2()
00157 end = 0
00158 _x = self
00159 start = end
00160 end += 12
00161 (_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00162 start = end
00163 end += 4
00164 (length,) = _struct_I.unpack(str[start:end])
00165 start = end
00166 end += length
00167 self.cluster.header.frame_id = str[start:end]
00168 _x = self
00169 start = end
00170 end += 8
00171 (_x.cluster.height, _x.cluster.width,) = _struct_2I.unpack(str[start:end])
00172 start = end
00173 end += 4
00174 (length,) = _struct_I.unpack(str[start:end])
00175 self.cluster.fields = []
00176 for i in range(0, length):
00177 val1 = sensor_msgs.msg.PointField()
00178 start = end
00179 end += 4
00180 (length,) = _struct_I.unpack(str[start:end])
00181 start = end
00182 end += length
00183 val1.name = str[start:end]
00184 _x = val1
00185 start = end
00186 end += 9
00187 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00188 self.cluster.fields.append(val1)
00189 _x = self
00190 start = end
00191 end += 9
00192 (_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step,) = _struct_B2I.unpack(str[start:end])
00193 self.cluster.is_bigendian = bool(self.cluster.is_bigendian)
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 start = end
00198 end += length
00199 self.cluster.data = str[start:end]
00200 start = end
00201 end += 1
00202 (self.cluster.is_dense,) = _struct_B.unpack(str[start:end])
00203 self.cluster.is_dense = bool(self.cluster.is_dense)
00204 return self
00205 except struct.error as e:
00206 raise roslib.message.DeserializationError(e)
00207
00208
00209 def serialize_numpy(self, buff, numpy):
00210 """
00211 serialize message with numpy array types into buffer
00212 @param buff: buffer
00213 @type buff: StringIO
00214 @param numpy: numpy python module
00215 @type numpy module
00216 """
00217 try:
00218 _x = self
00219 buff.write(_struct_3I.pack(_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs))
00220 _x = self.cluster.header.frame_id
00221 length = len(_x)
00222 buff.write(struct.pack('<I%ss'%length, length, _x))
00223 _x = self
00224 buff.write(_struct_2I.pack(_x.cluster.height, _x.cluster.width))
00225 length = len(self.cluster.fields)
00226 buff.write(_struct_I.pack(length))
00227 for val1 in self.cluster.fields:
00228 _x = val1.name
00229 length = len(_x)
00230 buff.write(struct.pack('<I%ss'%length, length, _x))
00231 _x = val1
00232 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00233 _x = self
00234 buff.write(_struct_B2I.pack(_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step))
00235 _x = self.cluster.data
00236 length = len(_x)
00237
00238 if type(_x) in [list, tuple]:
00239 buff.write(struct.pack('<I%sB'%length, length, *_x))
00240 else:
00241 buff.write(struct.pack('<I%ss'%length, length, _x))
00242 buff.write(_struct_B.pack(self.cluster.is_dense))
00243 except struct.error as se: self._check_types(se)
00244 except TypeError as te: self._check_types(te)
00245
00246 def deserialize_numpy(self, str, numpy):
00247 """
00248 unpack serialized message in str into this message instance using numpy for array types
00249 @param str: byte array of serialized message
00250 @type str: str
00251 @param numpy: numpy python module
00252 @type numpy: module
00253 """
00254 try:
00255 if self.cluster is None:
00256 self.cluster = sensor_msgs.msg.PointCloud2()
00257 end = 0
00258 _x = self
00259 start = end
00260 end += 12
00261 (_x.cluster.header.seq, _x.cluster.header.stamp.secs, _x.cluster.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00262 start = end
00263 end += 4
00264 (length,) = _struct_I.unpack(str[start:end])
00265 start = end
00266 end += length
00267 self.cluster.header.frame_id = str[start:end]
00268 _x = self
00269 start = end
00270 end += 8
00271 (_x.cluster.height, _x.cluster.width,) = _struct_2I.unpack(str[start:end])
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 self.cluster.fields = []
00276 for i in range(0, length):
00277 val1 = sensor_msgs.msg.PointField()
00278 start = end
00279 end += 4
00280 (length,) = _struct_I.unpack(str[start:end])
00281 start = end
00282 end += length
00283 val1.name = str[start:end]
00284 _x = val1
00285 start = end
00286 end += 9
00287 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00288 self.cluster.fields.append(val1)
00289 _x = self
00290 start = end
00291 end += 9
00292 (_x.cluster.is_bigendian, _x.cluster.point_step, _x.cluster.row_step,) = _struct_B2I.unpack(str[start:end])
00293 self.cluster.is_bigendian = bool(self.cluster.is_bigendian)
00294 start = end
00295 end += 4
00296 (length,) = _struct_I.unpack(str[start:end])
00297 start = end
00298 end += length
00299 self.cluster.data = str[start:end]
00300 start = end
00301 end += 1
00302 (self.cluster.is_dense,) = _struct_B.unpack(str[start:end])
00303 self.cluster.is_dense = bool(self.cluster.is_dense)
00304 return self
00305 except struct.error as e:
00306 raise roslib.message.DeserializationError(e)
00307
00308 _struct_I = roslib.message.struct_I
00309 _struct_IBI = struct.Struct("<IBI")
00310 _struct_3I = struct.Struct("<3I")
00311 _struct_B = struct.Struct("<B")
00312 _struct_2I = struct.Struct("<2I")
00313 _struct_B2I = struct.Struct("<B2I")
00314 """autogenerated by genmsg_py from FindClusterBoundingBox2Response.msg. Do not edit."""
00315 import roslib.message
00316 import struct
00317
00318 import geometry_msgs.msg
00319 import std_msgs.msg
00320
00321 class FindClusterBoundingBox2Response(roslib.message.Message):
00322 _md5sum = "981e2c8ffa160e77589dcf98a63a81cd"
00323 _type = "object_manipulation_msgs/FindClusterBoundingBox2Response"
00324 _has_header = False
00325 _full_text = """
00326
00327 geometry_msgs/PoseStamped pose
00328
00329
00330 geometry_msgs/Vector3 box_dims
00331
00332
00333 int32 SUCCESS=0
00334 int32 TF_ERROR=1
00335 int32 error_code
00336
00337 ================================================================================
00338 MSG: geometry_msgs/PoseStamped
00339 # A Pose with reference coordinate frame and timestamp
00340 Header header
00341 Pose pose
00342
00343 ================================================================================
00344 MSG: std_msgs/Header
00345 # Standard metadata for higher-level stamped data types.
00346 # This is generally used to communicate timestamped data
00347 # in a particular coordinate frame.
00348 #
00349 # sequence ID: consecutively increasing ID
00350 uint32 seq
00351 #Two-integer timestamp that is expressed as:
00352 # * stamp.secs: seconds (stamp_secs) since epoch
00353 # * stamp.nsecs: nanoseconds since stamp_secs
00354 # time-handling sugar is provided by the client library
00355 time stamp
00356 #Frame this data is associated with
00357 # 0: no frame
00358 # 1: global frame
00359 string frame_id
00360
00361 ================================================================================
00362 MSG: geometry_msgs/Pose
00363 # A representation of pose in free space, composed of postion and orientation.
00364 Point position
00365 Quaternion orientation
00366
00367 ================================================================================
00368 MSG: geometry_msgs/Point
00369 # This contains the position of a point in free space
00370 float64 x
00371 float64 y
00372 float64 z
00373
00374 ================================================================================
00375 MSG: geometry_msgs/Quaternion
00376 # This represents an orientation in free space in quaternion form.
00377
00378 float64 x
00379 float64 y
00380 float64 z
00381 float64 w
00382
00383 ================================================================================
00384 MSG: geometry_msgs/Vector3
00385 # This represents a vector in free space.
00386
00387 float64 x
00388 float64 y
00389 float64 z
00390 """
00391
00392 SUCCESS = 0
00393 TF_ERROR = 1
00394
00395 __slots__ = ['pose','box_dims','error_code']
00396 _slot_types = ['geometry_msgs/PoseStamped','geometry_msgs/Vector3','int32']
00397
00398 def __init__(self, *args, **kwds):
00399 """
00400 Constructor. Any message fields that are implicitly/explicitly
00401 set to None will be assigned a default value. The recommend
00402 use is keyword arguments as this is more robust to future message
00403 changes. You cannot mix in-order arguments and keyword arguments.
00404
00405 The available fields are:
00406 pose,box_dims,error_code
00407
00408 @param args: complete set of field values, in .msg order
00409 @param kwds: use keyword arguments corresponding to message field names
00410 to set specific fields.
00411 """
00412 if args or kwds:
00413 super(FindClusterBoundingBox2Response, self).__init__(*args, **kwds)
00414
00415 if self.pose is None:
00416 self.pose = geometry_msgs.msg.PoseStamped()
00417 if self.box_dims is None:
00418 self.box_dims = geometry_msgs.msg.Vector3()
00419 if self.error_code is None:
00420 self.error_code = 0
00421 else:
00422 self.pose = geometry_msgs.msg.PoseStamped()
00423 self.box_dims = geometry_msgs.msg.Vector3()
00424 self.error_code = 0
00425
00426 def _get_types(self):
00427 """
00428 internal API method
00429 """
00430 return self._slot_types
00431
00432 def serialize(self, buff):
00433 """
00434 serialize message into buffer
00435 @param buff: buffer
00436 @type buff: StringIO
00437 """
00438 try:
00439 _x = self
00440 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00441 _x = self.pose.header.frame_id
00442 length = len(_x)
00443 buff.write(struct.pack('<I%ss'%length, length, _x))
00444 _x = self
00445 buff.write(_struct_10di.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, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.error_code))
00446 except struct.error as se: self._check_types(se)
00447 except TypeError as te: self._check_types(te)
00448
00449 def deserialize(self, str):
00450 """
00451 unpack serialized message in str into this message instance
00452 @param str: byte array of serialized message
00453 @type str: str
00454 """
00455 try:
00456 if self.pose is None:
00457 self.pose = geometry_msgs.msg.PoseStamped()
00458 if self.box_dims is None:
00459 self.box_dims = geometry_msgs.msg.Vector3()
00460 end = 0
00461 _x = self
00462 start = end
00463 end += 12
00464 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00465 start = end
00466 end += 4
00467 (length,) = _struct_I.unpack(str[start:end])
00468 start = end
00469 end += length
00470 self.pose.header.frame_id = str[start:end]
00471 _x = self
00472 start = end
00473 end += 84
00474 (_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, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.error_code,) = _struct_10di.unpack(str[start:end])
00475 return self
00476 except struct.error as e:
00477 raise roslib.message.DeserializationError(e)
00478
00479
00480 def serialize_numpy(self, buff, numpy):
00481 """
00482 serialize message with numpy array types into buffer
00483 @param buff: buffer
00484 @type buff: StringIO
00485 @param numpy: numpy python module
00486 @type numpy module
00487 """
00488 try:
00489 _x = self
00490 buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00491 _x = self.pose.header.frame_id
00492 length = len(_x)
00493 buff.write(struct.pack('<I%ss'%length, length, _x))
00494 _x = self
00495 buff.write(_struct_10di.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, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.error_code))
00496 except struct.error as se: self._check_types(se)
00497 except TypeError as te: self._check_types(te)
00498
00499 def deserialize_numpy(self, str, numpy):
00500 """
00501 unpack serialized message in str into this message instance using numpy for array types
00502 @param str: byte array of serialized message
00503 @type str: str
00504 @param numpy: numpy python module
00505 @type numpy: module
00506 """
00507 try:
00508 if self.pose is None:
00509 self.pose = geometry_msgs.msg.PoseStamped()
00510 if self.box_dims is None:
00511 self.box_dims = geometry_msgs.msg.Vector3()
00512 end = 0
00513 _x = self
00514 start = end
00515 end += 12
00516 (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00517 start = end
00518 end += 4
00519 (length,) = _struct_I.unpack(str[start:end])
00520 start = end
00521 end += length
00522 self.pose.header.frame_id = str[start:end]
00523 _x = self
00524 start = end
00525 end += 84
00526 (_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, _x.box_dims.x, _x.box_dims.y, _x.box_dims.z, _x.error_code,) = _struct_10di.unpack(str[start:end])
00527 return self
00528 except struct.error as e:
00529 raise roslib.message.DeserializationError(e)
00530
00531 _struct_I = roslib.message.struct_I
00532 _struct_3I = struct.Struct("<3I")
00533 _struct_10di = struct.Struct("<10di")
00534 class FindClusterBoundingBox2(roslib.message.ServiceDefinition):
00535 _type = 'object_manipulation_msgs/FindClusterBoundingBox2'
00536 _md5sum = 'e44a593509bdc6447cb33bb20d08e973'
00537 _request_class = FindClusterBoundingBox2Request
00538 _response_class = FindClusterBoundingBox2Response