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