00001 """autogenerated by genpy from sr_robot_msgs/GetSegmentedLineRequest.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 GetSegmentedLineRequest(genpy.Message):
00009 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00010 _type = "sr_robot_msgs/GetSegmentedLineRequest"
00011 _has_header = False
00012 _full_text = """
00013 """
00014 __slots__ = []
00015 _slot_types = []
00016
00017 def __init__(self, *args, **kwds):
00018 """
00019 Constructor. Any message fields that are implicitly/explicitly
00020 set to None will be assigned a default value. The recommend
00021 use is keyword arguments as this is more robust to future message
00022 changes. You cannot mix in-order arguments and keyword arguments.
00023
00024 The available fields are:
00025
00026
00027 :param args: complete set of field values, in .msg order
00028 :param kwds: use keyword arguments corresponding to message field names
00029 to set specific fields.
00030 """
00031 if args or kwds:
00032 super(GetSegmentedLineRequest, self).__init__(*args, **kwds)
00033
00034 def _get_types(self):
00035 """
00036 internal API method
00037 """
00038 return self._slot_types
00039
00040 def serialize(self, buff):
00041 """
00042 serialize message into buffer
00043 :param buff: buffer, ``StringIO``
00044 """
00045 try:
00046 pass
00047 except struct.error as se: self._check_types(se)
00048 except TypeError as te: self._check_types(te)
00049
00050 def deserialize(self, str):
00051 """
00052 unpack serialized message in str into this message instance
00053 :param str: byte array of serialized message, ``str``
00054 """
00055 try:
00056 end = 0
00057 return self
00058 except struct.error as e:
00059 raise genpy.DeserializationError(e)
00060
00061
00062 def serialize_numpy(self, buff, numpy):
00063 """
00064 serialize message with numpy array types into buffer
00065 :param buff: buffer, ``StringIO``
00066 :param numpy: numpy python module
00067 """
00068 try:
00069 pass
00070 except struct.error as se: self._check_types(se)
00071 except TypeError as te: self._check_types(te)
00072
00073 def deserialize_numpy(self, str, numpy):
00074 """
00075 unpack serialized message in str into this message instance using numpy for array types
00076 :param str: byte array of serialized message, ``str``
00077 :param numpy: numpy python module
00078 """
00079 try:
00080 end = 0
00081 return self
00082 except struct.error as e:
00083 raise genpy.DeserializationError(e)
00084
00085 _struct_I = genpy.struct_I
00086 """autogenerated by genpy from sr_robot_msgs/GetSegmentedLineResponse.msg. Do not edit."""
00087 import sys
00088 python3 = True if sys.hexversion > 0x03000000 else False
00089 import genpy
00090 import struct
00091
00092 import std_msgs.msg
00093 import sensor_msgs.msg
00094
00095 class GetSegmentedLineResponse(genpy.Message):
00096 _md5sum = "e52f6bd605c2394bdcc68a7000875e0c"
00097 _type = "sr_robot_msgs/GetSegmentedLineResponse"
00098 _has_header = False
00099 _full_text = """sensor_msgs/PointCloud2 line_cloud
00100
00101
00102 ================================================================================
00103 MSG: sensor_msgs/PointCloud2
00104 # This message holds a collection of N-dimensional points, which may
00105 # contain additional information such as normals, intensity, etc. The
00106 # point data is stored as a binary blob, its layout described by the
00107 # contents of the "fields" array.
00108
00109 # The point cloud data may be organized 2d (image-like) or 1d
00110 # (unordered). Point clouds organized as 2d images may be produced by
00111 # camera depth sensors such as stereo or time-of-flight.
00112
00113 # Time of sensor data acquisition, and the coordinate frame ID (for 3d
00114 # points).
00115 Header header
00116
00117 # 2D structure of the point cloud. If the cloud is unordered, height is
00118 # 1 and width is the length of the point cloud.
00119 uint32 height
00120 uint32 width
00121
00122 # Describes the channels and their layout in the binary data blob.
00123 PointField[] fields
00124
00125 bool is_bigendian # Is this data bigendian?
00126 uint32 point_step # Length of a point in bytes
00127 uint32 row_step # Length of a row in bytes
00128 uint8[] data # Actual point data, size is (row_step*height)
00129
00130 bool is_dense # True if there are no invalid points
00131
00132 ================================================================================
00133 MSG: std_msgs/Header
00134 # Standard metadata for higher-level stamped data types.
00135 # This is generally used to communicate timestamped data
00136 # in a particular coordinate frame.
00137 #
00138 # sequence ID: consecutively increasing ID
00139 uint32 seq
00140 #Two-integer timestamp that is expressed as:
00141 # * stamp.secs: seconds (stamp_secs) since epoch
00142 # * stamp.nsecs: nanoseconds since stamp_secs
00143 # time-handling sugar is provided by the client library
00144 time stamp
00145 #Frame this data is associated with
00146 # 0: no frame
00147 # 1: global frame
00148 string frame_id
00149
00150 ================================================================================
00151 MSG: sensor_msgs/PointField
00152 # This message holds the description of one point entry in the
00153 # PointCloud2 message format.
00154 uint8 INT8 = 1
00155 uint8 UINT8 = 2
00156 uint8 INT16 = 3
00157 uint8 UINT16 = 4
00158 uint8 INT32 = 5
00159 uint8 UINT32 = 6
00160 uint8 FLOAT32 = 7
00161 uint8 FLOAT64 = 8
00162
00163 string name # Name of field
00164 uint32 offset # Offset from start of point struct
00165 uint8 datatype # Datatype enumeration, see above
00166 uint32 count # How many elements in the field
00167
00168 """
00169 __slots__ = ['line_cloud']
00170 _slot_types = ['sensor_msgs/PointCloud2']
00171
00172 def __init__(self, *args, **kwds):
00173 """
00174 Constructor. Any message fields that are implicitly/explicitly
00175 set to None will be assigned a default value. The recommend
00176 use is keyword arguments as this is more robust to future message
00177 changes. You cannot mix in-order arguments and keyword arguments.
00178
00179 The available fields are:
00180 line_cloud
00181
00182 :param args: complete set of field values, in .msg order
00183 :param kwds: use keyword arguments corresponding to message field names
00184 to set specific fields.
00185 """
00186 if args or kwds:
00187 super(GetSegmentedLineResponse, self).__init__(*args, **kwds)
00188
00189 if self.line_cloud is None:
00190 self.line_cloud = sensor_msgs.msg.PointCloud2()
00191 else:
00192 self.line_cloud = sensor_msgs.msg.PointCloud2()
00193
00194 def _get_types(self):
00195 """
00196 internal API method
00197 """
00198 return self._slot_types
00199
00200 def serialize(self, buff):
00201 """
00202 serialize message into buffer
00203 :param buff: buffer, ``StringIO``
00204 """
00205 try:
00206 _x = self
00207 buff.write(_struct_3I.pack(_x.line_cloud.header.seq, _x.line_cloud.header.stamp.secs, _x.line_cloud.header.stamp.nsecs))
00208 _x = self.line_cloud.header.frame_id
00209 length = len(_x)
00210 if python3 or type(_x) == unicode:
00211 _x = _x.encode('utf-8')
00212 length = len(_x)
00213 buff.write(struct.pack('<I%ss'%length, length, _x))
00214 _x = self
00215 buff.write(_struct_2I.pack(_x.line_cloud.height, _x.line_cloud.width))
00216 length = len(self.line_cloud.fields)
00217 buff.write(_struct_I.pack(length))
00218 for val1 in self.line_cloud.fields:
00219 _x = val1.name
00220 length = len(_x)
00221 if python3 or type(_x) == unicode:
00222 _x = _x.encode('utf-8')
00223 length = len(_x)
00224 buff.write(struct.pack('<I%ss'%length, length, _x))
00225 _x = val1
00226 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00227 _x = self
00228 buff.write(_struct_B2I.pack(_x.line_cloud.is_bigendian, _x.line_cloud.point_step, _x.line_cloud.row_step))
00229 _x = self.line_cloud.data
00230 length = len(_x)
00231
00232 if type(_x) in [list, tuple]:
00233 buff.write(struct.pack('<I%sB'%length, length, *_x))
00234 else:
00235 buff.write(struct.pack('<I%ss'%length, length, _x))
00236 buff.write(_struct_B.pack(self.line_cloud.is_dense))
00237 except struct.error as se: self._check_types(se)
00238 except TypeError as te: self._check_types(te)
00239
00240 def deserialize(self, str):
00241 """
00242 unpack serialized message in str into this message instance
00243 :param str: byte array of serialized message, ``str``
00244 """
00245 try:
00246 if self.line_cloud is None:
00247 self.line_cloud = sensor_msgs.msg.PointCloud2()
00248 end = 0
00249 _x = self
00250 start = end
00251 end += 12
00252 (_x.line_cloud.header.seq, _x.line_cloud.header.stamp.secs, _x.line_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00253 start = end
00254 end += 4
00255 (length,) = _struct_I.unpack(str[start:end])
00256 start = end
00257 end += length
00258 if python3:
00259 self.line_cloud.header.frame_id = str[start:end].decode('utf-8')
00260 else:
00261 self.line_cloud.header.frame_id = str[start:end]
00262 _x = self
00263 start = end
00264 end += 8
00265 (_x.line_cloud.height, _x.line_cloud.width,) = _struct_2I.unpack(str[start:end])
00266 start = end
00267 end += 4
00268 (length,) = _struct_I.unpack(str[start:end])
00269 self.line_cloud.fields = []
00270 for i in range(0, length):
00271 val1 = sensor_msgs.msg.PointField()
00272 start = end
00273 end += 4
00274 (length,) = _struct_I.unpack(str[start:end])
00275 start = end
00276 end += length
00277 if python3:
00278 val1.name = str[start:end].decode('utf-8')
00279 else:
00280 val1.name = str[start:end]
00281 _x = val1
00282 start = end
00283 end += 9
00284 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00285 self.line_cloud.fields.append(val1)
00286 _x = self
00287 start = end
00288 end += 9
00289 (_x.line_cloud.is_bigendian, _x.line_cloud.point_step, _x.line_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00290 self.line_cloud.is_bigendian = bool(self.line_cloud.is_bigendian)
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.line_cloud.data = str[start:end].decode('utf-8')
00298 else:
00299 self.line_cloud.data = str[start:end]
00300 start = end
00301 end += 1
00302 (self.line_cloud.is_dense,) = _struct_B.unpack(str[start:end])
00303 self.line_cloud.is_dense = bool(self.line_cloud.is_dense)
00304 return self
00305 except struct.error as e:
00306 raise genpy.DeserializationError(e)
00307
00308
00309 def serialize_numpy(self, buff, numpy):
00310 """
00311 serialize message with numpy array types into buffer
00312 :param buff: buffer, ``StringIO``
00313 :param numpy: numpy python module
00314 """
00315 try:
00316 _x = self
00317 buff.write(_struct_3I.pack(_x.line_cloud.header.seq, _x.line_cloud.header.stamp.secs, _x.line_cloud.header.stamp.nsecs))
00318 _x = self.line_cloud.header.frame_id
00319 length = len(_x)
00320 if python3 or type(_x) == unicode:
00321 _x = _x.encode('utf-8')
00322 length = len(_x)
00323 buff.write(struct.pack('<I%ss'%length, length, _x))
00324 _x = self
00325 buff.write(_struct_2I.pack(_x.line_cloud.height, _x.line_cloud.width))
00326 length = len(self.line_cloud.fields)
00327 buff.write(_struct_I.pack(length))
00328 for val1 in self.line_cloud.fields:
00329 _x = val1.name
00330 length = len(_x)
00331 if python3 or type(_x) == unicode:
00332 _x = _x.encode('utf-8')
00333 length = len(_x)
00334 buff.write(struct.pack('<I%ss'%length, length, _x))
00335 _x = val1
00336 buff.write(_struct_IBI.pack(_x.offset, _x.datatype, _x.count))
00337 _x = self
00338 buff.write(_struct_B2I.pack(_x.line_cloud.is_bigendian, _x.line_cloud.point_step, _x.line_cloud.row_step))
00339 _x = self.line_cloud.data
00340 length = len(_x)
00341
00342 if type(_x) in [list, tuple]:
00343 buff.write(struct.pack('<I%sB'%length, length, *_x))
00344 else:
00345 buff.write(struct.pack('<I%ss'%length, length, _x))
00346 buff.write(_struct_B.pack(self.line_cloud.is_dense))
00347 except struct.error as se: self._check_types(se)
00348 except TypeError as te: self._check_types(te)
00349
00350 def deserialize_numpy(self, str, numpy):
00351 """
00352 unpack serialized message in str into this message instance using numpy for array types
00353 :param str: byte array of serialized message, ``str``
00354 :param numpy: numpy python module
00355 """
00356 try:
00357 if self.line_cloud is None:
00358 self.line_cloud = sensor_msgs.msg.PointCloud2()
00359 end = 0
00360 _x = self
00361 start = end
00362 end += 12
00363 (_x.line_cloud.header.seq, _x.line_cloud.header.stamp.secs, _x.line_cloud.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00364 start = end
00365 end += 4
00366 (length,) = _struct_I.unpack(str[start:end])
00367 start = end
00368 end += length
00369 if python3:
00370 self.line_cloud.header.frame_id = str[start:end].decode('utf-8')
00371 else:
00372 self.line_cloud.header.frame_id = str[start:end]
00373 _x = self
00374 start = end
00375 end += 8
00376 (_x.line_cloud.height, _x.line_cloud.width,) = _struct_2I.unpack(str[start:end])
00377 start = end
00378 end += 4
00379 (length,) = _struct_I.unpack(str[start:end])
00380 self.line_cloud.fields = []
00381 for i in range(0, length):
00382 val1 = sensor_msgs.msg.PointField()
00383 start = end
00384 end += 4
00385 (length,) = _struct_I.unpack(str[start:end])
00386 start = end
00387 end += length
00388 if python3:
00389 val1.name = str[start:end].decode('utf-8')
00390 else:
00391 val1.name = str[start:end]
00392 _x = val1
00393 start = end
00394 end += 9
00395 (_x.offset, _x.datatype, _x.count,) = _struct_IBI.unpack(str[start:end])
00396 self.line_cloud.fields.append(val1)
00397 _x = self
00398 start = end
00399 end += 9
00400 (_x.line_cloud.is_bigendian, _x.line_cloud.point_step, _x.line_cloud.row_step,) = _struct_B2I.unpack(str[start:end])
00401 self.line_cloud.is_bigendian = bool(self.line_cloud.is_bigendian)
00402 start = end
00403 end += 4
00404 (length,) = _struct_I.unpack(str[start:end])
00405 start = end
00406 end += length
00407 if python3:
00408 self.line_cloud.data = str[start:end].decode('utf-8')
00409 else:
00410 self.line_cloud.data = str[start:end]
00411 start = end
00412 end += 1
00413 (self.line_cloud.is_dense,) = _struct_B.unpack(str[start:end])
00414 self.line_cloud.is_dense = bool(self.line_cloud.is_dense)
00415 return self
00416 except struct.error as e:
00417 raise genpy.DeserializationError(e)
00418
00419 _struct_I = genpy.struct_I
00420 _struct_IBI = struct.Struct("<IBI")
00421 _struct_3I = struct.Struct("<3I")
00422 _struct_B = struct.Struct("<B")
00423 _struct_2I = struct.Struct("<2I")
00424 _struct_B2I = struct.Struct("<B2I")
00425 class GetSegmentedLine(object):
00426 _type = 'sr_robot_msgs/GetSegmentedLine'
00427 _md5sum = 'e52f6bd605c2394bdcc68a7000875e0c'
00428 _request_class = GetSegmentedLineRequest
00429 _response_class = GetSegmentedLineResponse