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