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