$search
00001 """autogenerated by genmsg_py from GetTOFImagesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetTOFImagesRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "cob_camera_sensors/GetTOFImagesRequest" 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(GetTOFImagesRequest, 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 GetTOFImagesResponse.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 GetTOFImagesResponse(roslib.message.Message): 00098 _md5sum = "245ce4e6dd0ec61a5c674c8191a91877" 00099 _type = "cob_camera_sensors/GetTOFImagesResponse" 00100 _has_header = False #flag to mark the presence of a Header object 00101 _full_text = """sensor_msgs/Image greyImage 00102 sensor_msgs/Image xyzImage 00103 00104 00105 ================================================================================ 00106 MSG: sensor_msgs/Image 00107 # This message contains an uncompressed image 00108 # (0, 0) is at top-left corner of image 00109 # 00110 00111 Header header # Header timestamp should be acquisition time of image 00112 # Header frame_id should be optical frame of camera 00113 # origin of frame should be optical center of cameara 00114 # +x should point to the right in the image 00115 # +y should point down in the image 00116 # +z should point into to plane of the image 00117 # If the frame_id here and the frame_id of the CameraInfo 00118 # message associated with the image conflict 00119 # the behavior is undefined 00120 00121 uint32 height # image height, that is, number of rows 00122 uint32 width # image width, that is, number of columns 00123 00124 # The legal values for encoding are in file src/image_encodings.cpp 00125 # If you want to standardize a new string format, join 00126 # ros-users@lists.sourceforge.net and send an email proposing a new encoding. 00127 00128 string encoding # Encoding of pixels -- channel meaning, ordering, size 00129 # taken from the list of strings in src/image_encodings.cpp 00130 00131 uint8 is_bigendian # is this data bigendian? 00132 uint32 step # Full row length in bytes 00133 uint8[] data # actual matrix data, size is (step * rows) 00134 00135 ================================================================================ 00136 MSG: std_msgs/Header 00137 # Standard metadata for higher-level stamped data types. 00138 # This is generally used to communicate timestamped data 00139 # in a particular coordinate frame. 00140 # 00141 # sequence ID: consecutively increasing ID 00142 uint32 seq 00143 #Two-integer timestamp that is expressed as: 00144 # * stamp.secs: seconds (stamp_secs) since epoch 00145 # * stamp.nsecs: nanoseconds since stamp_secs 00146 # time-handling sugar is provided by the client library 00147 time stamp 00148 #Frame this data is associated with 00149 # 0: no frame 00150 # 1: global frame 00151 string frame_id 00152 00153 """ 00154 __slots__ = ['greyImage','xyzImage'] 00155 _slot_types = ['sensor_msgs/Image','sensor_msgs/Image'] 00156 00157 def __init__(self, *args, **kwds): 00158 """ 00159 Constructor. Any message fields that are implicitly/explicitly 00160 set to None will be assigned a default value. The recommend 00161 use is keyword arguments as this is more robust to future message 00162 changes. You cannot mix in-order arguments and keyword arguments. 00163 00164 The available fields are: 00165 greyImage,xyzImage 00166 00167 @param args: complete set of field values, in .msg order 00168 @param kwds: use keyword arguments corresponding to message field names 00169 to set specific fields. 00170 """ 00171 if args or kwds: 00172 super(GetTOFImagesResponse, self).__init__(*args, **kwds) 00173 #message fields cannot be None, assign default values for those that are 00174 if self.greyImage is None: 00175 self.greyImage = sensor_msgs.msg.Image() 00176 if self.xyzImage is None: 00177 self.xyzImage = sensor_msgs.msg.Image() 00178 else: 00179 self.greyImage = sensor_msgs.msg.Image() 00180 self.xyzImage = sensor_msgs.msg.Image() 00181 00182 def _get_types(self): 00183 """ 00184 internal API method 00185 """ 00186 return self._slot_types 00187 00188 def serialize(self, buff): 00189 """ 00190 serialize message into buffer 00191 @param buff: buffer 00192 @type buff: StringIO 00193 """ 00194 try: 00195 _x = self 00196 buff.write(_struct_3I.pack(_x.greyImage.header.seq, _x.greyImage.header.stamp.secs, _x.greyImage.header.stamp.nsecs)) 00197 _x = self.greyImage.header.frame_id 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 _x = self 00201 buff.write(_struct_2I.pack(_x.greyImage.height, _x.greyImage.width)) 00202 _x = self.greyImage.encoding 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 _x = self 00206 buff.write(_struct_BI.pack(_x.greyImage.is_bigendian, _x.greyImage.step)) 00207 _x = self.greyImage.data 00208 length = len(_x) 00209 # - if encoded as a list instead, serialize as bytes instead of string 00210 if type(_x) in [list, tuple]: 00211 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00212 else: 00213 buff.write(struct.pack('<I%ss'%length, length, _x)) 00214 _x = self 00215 buff.write(_struct_3I.pack(_x.xyzImage.header.seq, _x.xyzImage.header.stamp.secs, _x.xyzImage.header.stamp.nsecs)) 00216 _x = self.xyzImage.header.frame_id 00217 length = len(_x) 00218 buff.write(struct.pack('<I%ss'%length, length, _x)) 00219 _x = self 00220 buff.write(_struct_2I.pack(_x.xyzImage.height, _x.xyzImage.width)) 00221 _x = self.xyzImage.encoding 00222 length = len(_x) 00223 buff.write(struct.pack('<I%ss'%length, length, _x)) 00224 _x = self 00225 buff.write(_struct_BI.pack(_x.xyzImage.is_bigendian, _x.xyzImage.step)) 00226 _x = self.xyzImage.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 except struct.error as se: self._check_types(se) 00234 except TypeError as te: self._check_types(te) 00235 00236 def deserialize(self, str): 00237 """ 00238 unpack serialized message in str into this message instance 00239 @param str: byte array of serialized message 00240 @type str: str 00241 """ 00242 try: 00243 if self.greyImage is None: 00244 self.greyImage = sensor_msgs.msg.Image() 00245 if self.xyzImage is None: 00246 self.xyzImage = sensor_msgs.msg.Image() 00247 end = 0 00248 _x = self 00249 start = end 00250 end += 12 00251 (_x.greyImage.header.seq, _x.greyImage.header.stamp.secs, _x.greyImage.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00252 start = end 00253 end += 4 00254 (length,) = _struct_I.unpack(str[start:end]) 00255 start = end 00256 end += length 00257 self.greyImage.header.frame_id = str[start:end] 00258 _x = self 00259 start = end 00260 end += 8 00261 (_x.greyImage.height, _x.greyImage.width,) = _struct_2I.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.greyImage.encoding = str[start:end] 00268 _x = self 00269 start = end 00270 end += 5 00271 (_x.greyImage.is_bigendian, _x.greyImage.step,) = _struct_BI.unpack(str[start:end]) 00272 start = end 00273 end += 4 00274 (length,) = _struct_I.unpack(str[start:end]) 00275 start = end 00276 end += length 00277 self.greyImage.data = str[start:end] 00278 _x = self 00279 start = end 00280 end += 12 00281 (_x.xyzImage.header.seq, _x.xyzImage.header.stamp.secs, _x.xyzImage.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00282 start = end 00283 end += 4 00284 (length,) = _struct_I.unpack(str[start:end]) 00285 start = end 00286 end += length 00287 self.xyzImage.header.frame_id = str[start:end] 00288 _x = self 00289 start = end 00290 end += 8 00291 (_x.xyzImage.height, _x.xyzImage.width,) = _struct_2I.unpack(str[start:end]) 00292 start = end 00293 end += 4 00294 (length,) = _struct_I.unpack(str[start:end]) 00295 start = end 00296 end += length 00297 self.xyzImage.encoding = str[start:end] 00298 _x = self 00299 start = end 00300 end += 5 00301 (_x.xyzImage.is_bigendian, _x.xyzImage.step,) = _struct_BI.unpack(str[start:end]) 00302 start = end 00303 end += 4 00304 (length,) = _struct_I.unpack(str[start:end]) 00305 start = end 00306 end += length 00307 self.xyzImage.data = str[start:end] 00308 return self 00309 except struct.error as e: 00310 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00311 00312 00313 def serialize_numpy(self, buff, numpy): 00314 """ 00315 serialize message with numpy array types into buffer 00316 @param buff: buffer 00317 @type buff: StringIO 00318 @param numpy: numpy python module 00319 @type numpy module 00320 """ 00321 try: 00322 _x = self 00323 buff.write(_struct_3I.pack(_x.greyImage.header.seq, _x.greyImage.header.stamp.secs, _x.greyImage.header.stamp.nsecs)) 00324 _x = self.greyImage.header.frame_id 00325 length = len(_x) 00326 buff.write(struct.pack('<I%ss'%length, length, _x)) 00327 _x = self 00328 buff.write(_struct_2I.pack(_x.greyImage.height, _x.greyImage.width)) 00329 _x = self.greyImage.encoding 00330 length = len(_x) 00331 buff.write(struct.pack('<I%ss'%length, length, _x)) 00332 _x = self 00333 buff.write(_struct_BI.pack(_x.greyImage.is_bigendian, _x.greyImage.step)) 00334 _x = self.greyImage.data 00335 length = len(_x) 00336 # - if encoded as a list instead, serialize as bytes instead of string 00337 if type(_x) in [list, tuple]: 00338 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00339 else: 00340 buff.write(struct.pack('<I%ss'%length, length, _x)) 00341 _x = self 00342 buff.write(_struct_3I.pack(_x.xyzImage.header.seq, _x.xyzImage.header.stamp.secs, _x.xyzImage.header.stamp.nsecs)) 00343 _x = self.xyzImage.header.frame_id 00344 length = len(_x) 00345 buff.write(struct.pack('<I%ss'%length, length, _x)) 00346 _x = self 00347 buff.write(_struct_2I.pack(_x.xyzImage.height, _x.xyzImage.width)) 00348 _x = self.xyzImage.encoding 00349 length = len(_x) 00350 buff.write(struct.pack('<I%ss'%length, length, _x)) 00351 _x = self 00352 buff.write(_struct_BI.pack(_x.xyzImage.is_bigendian, _x.xyzImage.step)) 00353 _x = self.xyzImage.data 00354 length = len(_x) 00355 # - if encoded as a list instead, serialize as bytes instead of string 00356 if type(_x) in [list, tuple]: 00357 buff.write(struct.pack('<I%sB'%length, length, *_x)) 00358 else: 00359 buff.write(struct.pack('<I%ss'%length, length, _x)) 00360 except struct.error as se: self._check_types(se) 00361 except TypeError as te: self._check_types(te) 00362 00363 def deserialize_numpy(self, str, numpy): 00364 """ 00365 unpack serialized message in str into this message instance using numpy for array types 00366 @param str: byte array of serialized message 00367 @type str: str 00368 @param numpy: numpy python module 00369 @type numpy: module 00370 """ 00371 try: 00372 if self.greyImage is None: 00373 self.greyImage = sensor_msgs.msg.Image() 00374 if self.xyzImage is None: 00375 self.xyzImage = sensor_msgs.msg.Image() 00376 end = 0 00377 _x = self 00378 start = end 00379 end += 12 00380 (_x.greyImage.header.seq, _x.greyImage.header.stamp.secs, _x.greyImage.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00381 start = end 00382 end += 4 00383 (length,) = _struct_I.unpack(str[start:end]) 00384 start = end 00385 end += length 00386 self.greyImage.header.frame_id = str[start:end] 00387 _x = self 00388 start = end 00389 end += 8 00390 (_x.greyImage.height, _x.greyImage.width,) = _struct_2I.unpack(str[start:end]) 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 start = end 00395 end += length 00396 self.greyImage.encoding = str[start:end] 00397 _x = self 00398 start = end 00399 end += 5 00400 (_x.greyImage.is_bigendian, _x.greyImage.step,) = _struct_BI.unpack(str[start:end]) 00401 start = end 00402 end += 4 00403 (length,) = _struct_I.unpack(str[start:end]) 00404 start = end 00405 end += length 00406 self.greyImage.data = str[start:end] 00407 _x = self 00408 start = end 00409 end += 12 00410 (_x.xyzImage.header.seq, _x.xyzImage.header.stamp.secs, _x.xyzImage.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00411 start = end 00412 end += 4 00413 (length,) = _struct_I.unpack(str[start:end]) 00414 start = end 00415 end += length 00416 self.xyzImage.header.frame_id = str[start:end] 00417 _x = self 00418 start = end 00419 end += 8 00420 (_x.xyzImage.height, _x.xyzImage.width,) = _struct_2I.unpack(str[start:end]) 00421 start = end 00422 end += 4 00423 (length,) = _struct_I.unpack(str[start:end]) 00424 start = end 00425 end += length 00426 self.xyzImage.encoding = str[start:end] 00427 _x = self 00428 start = end 00429 end += 5 00430 (_x.xyzImage.is_bigendian, _x.xyzImage.step,) = _struct_BI.unpack(str[start:end]) 00431 start = end 00432 end += 4 00433 (length,) = _struct_I.unpack(str[start:end]) 00434 start = end 00435 end += length 00436 self.xyzImage.data = str[start:end] 00437 return self 00438 except struct.error as e: 00439 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00440 00441 _struct_I = roslib.message.struct_I 00442 _struct_3I = struct.Struct("<3I") 00443 _struct_2I = struct.Struct("<2I") 00444 _struct_BI = struct.Struct("<BI") 00445 class GetTOFImages(roslib.message.ServiceDefinition): 00446 _type = 'cob_camera_sensors/GetTOFImages' 00447 _md5sum = '245ce4e6dd0ec61a5c674c8191a91877' 00448 _request_class = GetTOFImagesRequest 00449 _response_class = GetTOFImagesResponse