00001 """autogenerated by genpy from pr2_clutter_helper/GetPointCloudRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class GetPointCloudRequest(genpy.Message):
00009 _md5sum = "13abbc87c0c0b2fc9a6d87f74375a5d7"
00010 _type = "pr2_clutter_helper/GetPointCloudRequest"
00011 _has_header = False
00012 _full_text = """string topic_name
00013 string msg_type
00014
00015 """
00016 __slots__ = ['topic_name','msg_type']
00017 _slot_types = ['string','string']
00018
00019 def __init__(self, *args, **kwds):
00020 """
00021 Constructor. Any message fields that are implicitly/explicitly
00022 set to None will be assigned a default value. The recommend
00023 use is keyword arguments as this is more robust to future message
00024 changes. You cannot mix in-order arguments and keyword arguments.
00025
00026 The available fields are:
00027 topic_name,msg_type
00028
00029 :param args: complete set of field values, in .msg order
00030 :param kwds: use keyword arguments corresponding to message field names
00031 to set specific fields.
00032 """
00033 if args or kwds:
00034 super(GetPointCloudRequest, self).__init__(*args, **kwds)
00035
00036 if self.topic_name is None:
00037 self.topic_name = ''
00038 if self.msg_type is None:
00039 self.msg_type = ''
00040 else:
00041 self.topic_name = ''
00042 self.msg_type = ''
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 _x = self.topic_name
00057 length = len(_x)
00058 if python3 or type(_x) == unicode:
00059 _x = _x.encode('utf-8')
00060 length = len(_x)
00061 buff.write(struct.pack('<I%ss'%length, length, _x))
00062 _x = self.msg_type
00063 length = len(_x)
00064 if python3 or type(_x) == unicode:
00065 _x = _x.encode('utf-8')
00066 length = len(_x)
00067 buff.write(struct.pack('<I%ss'%length, length, _x))
00068 except struct.error as se: self._check_types(se)
00069 except TypeError as te: self._check_types(te)
00070
00071 def deserialize(self, str):
00072 """
00073 unpack serialized message in str into this message instance
00074 :param str: byte array of serialized message, ``str``
00075 """
00076 try:
00077 end = 0
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 start = end
00082 end += length
00083 if python3:
00084 self.topic_name = str[start:end].decode('utf-8')
00085 else:
00086 self.topic_name = str[start:end]
00087 start = end
00088 end += 4
00089 (length,) = _struct_I.unpack(str[start:end])
00090 start = end
00091 end += length
00092 if python3:
00093 self.msg_type = str[start:end].decode('utf-8')
00094 else:
00095 self.msg_type = str[start:end]
00096 return self
00097 except struct.error as e:
00098 raise genpy.DeserializationError(e)
00099
00100
00101 def serialize_numpy(self, buff, numpy):
00102 """
00103 serialize message with numpy array types into buffer
00104 :param buff: buffer, ``StringIO``
00105 :param numpy: numpy python module
00106 """
00107 try:
00108 _x = self.topic_name
00109 length = len(_x)
00110 if python3 or type(_x) == unicode:
00111 _x = _x.encode('utf-8')
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self.msg_type
00115 length = len(_x)
00116 if python3 or type(_x) == unicode:
00117 _x = _x.encode('utf-8')
00118 length = len(_x)
00119 buff.write(struct.pack('<I%ss'%length, length, _x))
00120 except struct.error as se: self._check_types(se)
00121 except TypeError as te: self._check_types(te)
00122
00123 def deserialize_numpy(self, str, numpy):
00124 """
00125 unpack serialized message in str into this message instance using numpy for array types
00126 :param str: byte array of serialized message, ``str``
00127 :param numpy: numpy python module
00128 """
00129 try:
00130 end = 0
00131 start = end
00132 end += 4
00133 (length,) = _struct_I.unpack(str[start:end])
00134 start = end
00135 end += length
00136 if python3:
00137 self.topic_name = str[start:end].decode('utf-8')
00138 else:
00139 self.topic_name = str[start:end]
00140 start = end
00141 end += 4
00142 (length,) = _struct_I.unpack(str[start:end])
00143 start = end
00144 end += length
00145 if python3:
00146 self.msg_type = str[start:end].decode('utf-8')
00147 else:
00148 self.msg_type = str[start:end]
00149 return self
00150 except struct.error as e:
00151 raise genpy.DeserializationError(e)
00152
00153 _struct_I = genpy.struct_I
00154 """autogenerated by genpy from pr2_clutter_helper/GetPointCloudResponse.msg. Do not edit."""
00155 import sys
00156 python3 = True if sys.hexversion > 0x03000000 else False
00157 import genpy
00158 import struct
00159
00160 import geometry_msgs.msg
00161 import std_msgs.msg
00162 import sensor_msgs.msg
00163
00164 class GetPointCloudResponse(genpy.Message):
00165 _md5sum = "4217b28a903e4ad7869a83b3653110ff"
00166 _type = "pr2_clutter_helper/GetPointCloudResponse"
00167 _has_header = False
00168 _full_text = """sensor_msgs/PointCloud cloud
00169
00170
00171 ================================================================================
00172 MSG: sensor_msgs/PointCloud
00173 # This message holds a collection of 3d points, plus optional additional
00174 # information about each point.
00175
00176 # Time of sensor data acquisition, coordinate frame ID.
00177 Header header
00178
00179 # Array of 3d points. Each Point32 should be interpreted as a 3d point
00180 # in the frame given in the header.
00181 geometry_msgs/Point32[] points
00182
00183 # Each channel should have the same number of elements as points array,
00184 # and the data in each channel should correspond 1:1 with each point.
00185 # Channel names in common practice are listed in ChannelFloat32.msg.
00186 ChannelFloat32[] channels
00187
00188 ================================================================================
00189 MSG: std_msgs/Header
00190 # Standard metadata for higher-level stamped data types.
00191 # This is generally used to communicate timestamped data
00192 # in a particular coordinate frame.
00193 #
00194 # sequence ID: consecutively increasing ID
00195 uint32 seq
00196 #Two-integer timestamp that is expressed as:
00197 # * stamp.secs: seconds (stamp_secs) since epoch
00198 # * stamp.nsecs: nanoseconds since stamp_secs
00199 # time-handling sugar is provided by the client library
00200 time stamp
00201 #Frame this data is associated with
00202 # 0: no frame
00203 # 1: global frame
00204 string frame_id
00205
00206 ================================================================================
00207 MSG: geometry_msgs/Point32
00208 # This contains the position of a point in free space(with 32 bits of precision).
00209 # It is recommeded to use Point wherever possible instead of Point32.
00210 #
00211 # This recommendation is to promote interoperability.
00212 #
00213 # This message is designed to take up less space when sending
00214 # lots of points at once, as in the case of a PointCloud.
00215
00216 float32 x
00217 float32 y
00218 float32 z
00219 ================================================================================
00220 MSG: sensor_msgs/ChannelFloat32
00221 # This message is used by the PointCloud message to hold optional data
00222 # associated with each point in the cloud. The length of the values
00223 # array should be the same as the length of the points array in the
00224 # PointCloud, and each value should be associated with the corresponding
00225 # point.
00226
00227 # Channel names in existing practice include:
00228 # "u", "v" - row and column (respectively) in the left stereo image.
00229 # This is opposite to usual conventions but remains for
00230 # historical reasons. The newer PointCloud2 message has no
00231 # such problem.
00232 # "rgb" - For point clouds produced by color stereo cameras. uint8
00233 # (R,G,B) values packed into the least significant 24 bits,
00234 # in order.
00235 # "intensity" - laser or pixel intensity.
00236 # "distance"
00237
00238 # The channel name should give semantics of the channel (e.g.
00239 # "intensity" instead of "value").
00240 string name
00241
00242 # The values array should be 1-1 with the elements of the associated
00243 # PointCloud.
00244 float32[] values
00245
00246 """
00247 __slots__ = ['cloud']
00248 _slot_types = ['sensor_msgs/PointCloud']
00249
00250 def __init__(self, *args, **kwds):
00251 """
00252 Constructor. Any message fields that are implicitly/explicitly
00253 set to None will be assigned a default value. The recommend
00254 use is keyword arguments as this is more robust to future message
00255 changes. You cannot mix in-order arguments and keyword arguments.
00256
00257 The available fields are:
00258 cloud
00259
00260 :param args: complete set of field values, in .msg order
00261 :param kwds: use keyword arguments corresponding to message field names
00262 to set specific fields.
00263 """
00264 if args or kwds:
00265 super(GetPointCloudResponse, self).__init__(*args, **kwds)
00266 #message fields cannot be None, assign default values for those that are
00267 if self.cloud is None:
00268 self.cloud = sensor_msgs.msg.PointCloud()
00269 else:
00270 self.cloud = sensor_msgs.msg.PointCloud()
00271
00272 def _get_types(self):
00273 """
00274 internal API method
00275 """
00276 return self._slot_types
00277
00278 def serialize(self, buff):
00279 """
00280 serialize message into buffer
00281 :param buff: buffer, ``StringIO``
00282 """
00283 try:
00284 _x = self
00285 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00286 _x = self.cloud.header.frame_id
00287 length = len(_x)
00288 if python3 or type(_x) == unicode:
00289 _x = _x.encode('utf-8')
00290 length = len(_x)
00291 buff.write(struct.pack('<I%ss'%length, length, _x))
00292 length = len(self.cloud.points)
00293 buff.write(_struct_I.pack(length))
00294 for val1 in self.cloud.points:
00295 _x = val1
00296 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00297 length = len(self.cloud.channels)
00298 buff.write(_struct_I.pack(length))
00299 for val1 in self.cloud.channels:
00300 _x = val1.name
00301 length = len(_x)
00302 if python3 or type(_x) == unicode:
00303 _x = _x.encode('utf-8')
00304 length = len(_x)
00305 buff.write(struct.pack('<I%ss'%length, length, _x))
00306 length = len(val1.values)
00307 buff.write(_struct_I.pack(length))
00308 pattern = '<%sf'%length
00309 buff.write(struct.pack(pattern, *val1.values))
00310 except struct.error as se: self._check_types(se)
00311 except TypeError as te: self._check_types(te)
00312
00313 def deserialize(self, str):
00314 """
00315 unpack serialized message in str into this message instance
00316 :param str: byte array of serialized message, ``str``
00317 """
00318 try:
00319 if self.cloud is None:
00320 self.cloud = sensor_msgs.msg.PointCloud()
00321 end = 0
00322 _x = self
00323 start = end
00324 end += 12
00325 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00326 start = end
00327 end += 4
00328 (length,) = _struct_I.unpack(str[start:end])
00329 start = end
00330 end += length
00331 if python3:
00332 self.cloud.header.frame_id = str[start:end].decode('utf-8')
00333 else:
00334 self.cloud.header.frame_id = str[start:end]
00335 start = end
00336 end += 4
00337 (length,) = _struct_I.unpack(str[start:end])
00338 self.cloud.points = []
00339 for i in range(0, length):
00340 val1 = geometry_msgs.msg.Point32()
00341 _x = val1
00342 start = end
00343 end += 12
00344 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00345 self.cloud.points.append(val1)
00346 start = end
00347 end += 4
00348 (length,) = _struct_I.unpack(str[start:end])
00349 self.cloud.channels = []
00350 for i in range(0, length):
00351 val1 = sensor_msgs.msg.ChannelFloat32()
00352 start = end
00353 end += 4
00354 (length,) = _struct_I.unpack(str[start:end])
00355 start = end
00356 end += length
00357 if python3:
00358 val1.name = str[start:end].decode('utf-8')
00359 else:
00360 val1.name = str[start:end]
00361 start = end
00362 end += 4
00363 (length,) = _struct_I.unpack(str[start:end])
00364 pattern = '<%sf'%length
00365 start = end
00366 end += struct.calcsize(pattern)
00367 val1.values = struct.unpack(pattern, str[start:end])
00368 self.cloud.channels.append(val1)
00369 return self
00370 except struct.error as e:
00371 raise genpy.DeserializationError(e) #most likely buffer underfill
00372
00373
00374 def serialize_numpy(self, buff, numpy):
00375 """
00376 serialize message with numpy array types into buffer
00377 :param buff: buffer, ``StringIO``
00378 :param numpy: numpy python module
00379 """
00380 try:
00381 _x = self
00382 buff.write(_struct_3I.pack(_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs))
00383 _x = self.cloud.header.frame_id
00384 length = len(_x)
00385 if python3 or type(_x) == unicode:
00386 _x = _x.encode('utf-8')
00387 length = len(_x)
00388 buff.write(struct.pack('<I%ss'%length, length, _x))
00389 length = len(self.cloud.points)
00390 buff.write(_struct_I.pack(length))
00391 for val1 in self.cloud.points:
00392 _x = val1
00393 buff.write(_struct_3f.pack(_x.x, _x.y, _x.z))
00394 length = len(self.cloud.channels)
00395 buff.write(_struct_I.pack(length))
00396 for val1 in self.cloud.channels:
00397 _x = val1.name
00398 length = len(_x)
00399 if python3 or type(_x) == unicode:
00400 _x = _x.encode('utf-8')
00401 length = len(_x)
00402 buff.write(struct.pack('<I%ss'%length, length, _x))
00403 length = len(val1.values)
00404 buff.write(_struct_I.pack(length))
00405 pattern = '<%sf'%length
00406 buff.write(val1.values.tostring())
00407 except struct.error as se: self._check_types(se)
00408 except TypeError as te: self._check_types(te)
00409
00410 def deserialize_numpy(self, str, numpy):
00411 """
00412 unpack serialized message in str into this message instance using numpy for array types
00413 :param str: byte array of serialized message, ``str``
00414 :param numpy: numpy python module
00415 """
00416 try:
00417 if self.cloud is None:
00418 self.cloud = sensor_msgs.msg.PointCloud()
00419 end = 0
00420 _x = self
00421 start = end
00422 end += 12
00423 (_x.cloud.header.seq, _x.cloud.header.stamp.secs, _x.cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00424 start = end
00425 end += 4
00426 (length,) = _struct_I.unpack(str[start:end])
00427 start = end
00428 end += length
00429 if python3:
00430 self.cloud.header.frame_id = str[start:end].decode('utf-8')
00431 else:
00432 self.cloud.header.frame_id = str[start:end]
00433 start = end
00434 end += 4
00435 (length,) = _struct_I.unpack(str[start:end])
00436 self.cloud.points = []
00437 for i in range(0, length):
00438 val1 = geometry_msgs.msg.Point32()
00439 _x = val1
00440 start = end
00441 end += 12
00442 (_x.x, _x.y, _x.z,) = _struct_3f.unpack(str[start:end])
00443 self.cloud.points.append(val1)
00444 start = end
00445 end += 4
00446 (length,) = _struct_I.unpack(str[start:end])
00447 self.cloud.channels = []
00448 for i in range(0, length):
00449 val1 = sensor_msgs.msg.ChannelFloat32()
00450 start = end
00451 end += 4
00452 (length,) = _struct_I.unpack(str[start:end])
00453 start = end
00454 end += length
00455 if python3:
00456 val1.name = str[start:end].decode('utf-8')
00457 else:
00458 val1.name = str[start:end]
00459 start = end
00460 end += 4
00461 (length,) = _struct_I.unpack(str[start:end])
00462 pattern = '<%sf'%length
00463 start = end
00464 end += struct.calcsize(pattern)
00465 val1.values = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00466 self.cloud.channels.append(val1)
00467 return self
00468 except struct.error as e:
00469 raise genpy.DeserializationError(e) #most likely buffer underfill
00470
00471 _struct_I = genpy.struct_I
00472 _struct_3I = struct.Struct("<3I")
00473 _struct_3f = struct.Struct("<3f")
00474 class GetPointCloud(object):
00475 _type = 'pr2_clutter_helper/GetPointCloud'
00476 _md5sum = '9a1e4b0e1f3f9c87221bd8deaf5df60f'
00477 _request_class = GetPointCloudRequest
00478 _response_class = GetPointCloudResponse