$search
00001 """autogenerated by genmsg_py from GetFieldOfViewRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 00007 class GetFieldOfViewRequest(roslib.message.Message): 00008 _md5sum = "38354f48c68a4e6e5cf263de67b97586" 00009 _type = "cob_3d_mapping_msgs/GetFieldOfViewRequest" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """string target_frame 00012 time stamp 00013 00014 """ 00015 __slots__ = ['target_frame','stamp'] 00016 _slot_types = ['string','time'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 target_frame,stamp 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(GetFieldOfViewRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.target_frame is None: 00036 self.target_frame = '' 00037 if self.stamp is None: 00038 self.stamp = roslib.rostime.Time() 00039 else: 00040 self.target_frame = '' 00041 self.stamp = roslib.rostime.Time() 00042 00043 def _get_types(self): 00044 """ 00045 internal API method 00046 """ 00047 return self._slot_types 00048 00049 def serialize(self, buff): 00050 """ 00051 serialize message into buffer 00052 @param buff: buffer 00053 @type buff: StringIO 00054 """ 00055 try: 00056 _x = self.target_frame 00057 length = len(_x) 00058 buff.write(struct.pack('<I%ss'%length, length, _x)) 00059 _x = self 00060 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs)) 00061 except struct.error as se: self._check_types(se) 00062 except TypeError as te: self._check_types(te) 00063 00064 def deserialize(self, str): 00065 """ 00066 unpack serialized message in str into this message instance 00067 @param str: byte array of serialized message 00068 @type str: str 00069 """ 00070 try: 00071 if self.stamp is None: 00072 self.stamp = roslib.rostime.Time() 00073 end = 0 00074 start = end 00075 end += 4 00076 (length,) = _struct_I.unpack(str[start:end]) 00077 start = end 00078 end += length 00079 self.target_frame = str[start:end] 00080 _x = self 00081 start = end 00082 end += 8 00083 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00084 self.stamp.canon() 00085 return self 00086 except struct.error as e: 00087 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00088 00089 00090 def serialize_numpy(self, buff, numpy): 00091 """ 00092 serialize message with numpy array types into buffer 00093 @param buff: buffer 00094 @type buff: StringIO 00095 @param numpy: numpy python module 00096 @type numpy module 00097 """ 00098 try: 00099 _x = self.target_frame 00100 length = len(_x) 00101 buff.write(struct.pack('<I%ss'%length, length, _x)) 00102 _x = self 00103 buff.write(_struct_2I.pack(_x.stamp.secs, _x.stamp.nsecs)) 00104 except struct.error as se: self._check_types(se) 00105 except TypeError as te: self._check_types(te) 00106 00107 def deserialize_numpy(self, str, numpy): 00108 """ 00109 unpack serialized message in str into this message instance using numpy for array types 00110 @param str: byte array of serialized message 00111 @type str: str 00112 @param numpy: numpy python module 00113 @type numpy: module 00114 """ 00115 try: 00116 if self.stamp is None: 00117 self.stamp = roslib.rostime.Time() 00118 end = 0 00119 start = end 00120 end += 4 00121 (length,) = _struct_I.unpack(str[start:end]) 00122 start = end 00123 end += length 00124 self.target_frame = str[start:end] 00125 _x = self 00126 start = end 00127 end += 8 00128 (_x.stamp.secs, _x.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00129 self.stamp.canon() 00130 return self 00131 except struct.error as e: 00132 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00133 00134 _struct_I = roslib.message.struct_I 00135 _struct_2I = struct.Struct("<2I") 00136 """autogenerated by genmsg_py from GetFieldOfViewResponse.msg. Do not edit.""" 00137 import roslib.message 00138 import struct 00139 00140 import geometry_msgs.msg 00141 import cob_3d_mapping_msgs.msg 00142 import std_msgs.msg 00143 00144 class GetFieldOfViewResponse(roslib.message.Message): 00145 _md5sum = "26975d3cc04f3662907b4a9ad86bb61b" 00146 _type = "cob_3d_mapping_msgs/GetFieldOfViewResponse" 00147 _has_header = False #flag to mark the presence of a Header object 00148 _full_text = """PointArray fov 00149 00150 00151 ================================================================================ 00152 MSG: cob_3d_mapping_msgs/PointArray 00153 # DEPRECATED: An array of poses with a header for global reference. 00154 00155 Header header 00156 00157 geometry_msgs/Point[] points 00158 00159 ================================================================================ 00160 MSG: std_msgs/Header 00161 # Standard metadata for higher-level stamped data types. 00162 # This is generally used to communicate timestamped data 00163 # in a particular coordinate frame. 00164 # 00165 # sequence ID: consecutively increasing ID 00166 uint32 seq 00167 #Two-integer timestamp that is expressed as: 00168 # * stamp.secs: seconds (stamp_secs) since epoch 00169 # * stamp.nsecs: nanoseconds since stamp_secs 00170 # time-handling sugar is provided by the client library 00171 time stamp 00172 #Frame this data is associated with 00173 # 0: no frame 00174 # 1: global frame 00175 string frame_id 00176 00177 ================================================================================ 00178 MSG: geometry_msgs/Point 00179 # This contains the position of a point in free space 00180 float64 x 00181 float64 y 00182 float64 z 00183 00184 """ 00185 __slots__ = ['fov'] 00186 _slot_types = ['cob_3d_mapping_msgs/PointArray'] 00187 00188 def __init__(self, *args, **kwds): 00189 """ 00190 Constructor. Any message fields that are implicitly/explicitly 00191 set to None will be assigned a default value. The recommend 00192 use is keyword arguments as this is more robust to future message 00193 changes. You cannot mix in-order arguments and keyword arguments. 00194 00195 The available fields are: 00196 fov 00197 00198 @param args: complete set of field values, in .msg order 00199 @param kwds: use keyword arguments corresponding to message field names 00200 to set specific fields. 00201 """ 00202 if args or kwds: 00203 super(GetFieldOfViewResponse, self).__init__(*args, **kwds) 00204 #message fields cannot be None, assign default values for those that are 00205 if self.fov is None: 00206 self.fov = cob_3d_mapping_msgs.msg.PointArray() 00207 else: 00208 self.fov = cob_3d_mapping_msgs.msg.PointArray() 00209 00210 def _get_types(self): 00211 """ 00212 internal API method 00213 """ 00214 return self._slot_types 00215 00216 def serialize(self, buff): 00217 """ 00218 serialize message into buffer 00219 @param buff: buffer 00220 @type buff: StringIO 00221 """ 00222 try: 00223 _x = self 00224 buff.write(_struct_3I.pack(_x.fov.header.seq, _x.fov.header.stamp.secs, _x.fov.header.stamp.nsecs)) 00225 _x = self.fov.header.frame_id 00226 length = len(_x) 00227 buff.write(struct.pack('<I%ss'%length, length, _x)) 00228 length = len(self.fov.points) 00229 buff.write(_struct_I.pack(length)) 00230 for val1 in self.fov.points: 00231 _x = val1 00232 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 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.fov is None: 00244 self.fov = cob_3d_mapping_msgs.msg.PointArray() 00245 end = 0 00246 _x = self 00247 start = end 00248 end += 12 00249 (_x.fov.header.seq, _x.fov.header.stamp.secs, _x.fov.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 start = end 00254 end += length 00255 self.fov.header.frame_id = str[start:end] 00256 start = end 00257 end += 4 00258 (length,) = _struct_I.unpack(str[start:end]) 00259 self.fov.points = [] 00260 for i in range(0, length): 00261 val1 = geometry_msgs.msg.Point() 00262 _x = val1 00263 start = end 00264 end += 24 00265 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00266 self.fov.points.append(val1) 00267 return self 00268 except struct.error as e: 00269 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00270 00271 00272 def serialize_numpy(self, buff, numpy): 00273 """ 00274 serialize message with numpy array types into buffer 00275 @param buff: buffer 00276 @type buff: StringIO 00277 @param numpy: numpy python module 00278 @type numpy module 00279 """ 00280 try: 00281 _x = self 00282 buff.write(_struct_3I.pack(_x.fov.header.seq, _x.fov.header.stamp.secs, _x.fov.header.stamp.nsecs)) 00283 _x = self.fov.header.frame_id 00284 length = len(_x) 00285 buff.write(struct.pack('<I%ss'%length, length, _x)) 00286 length = len(self.fov.points) 00287 buff.write(_struct_I.pack(length)) 00288 for val1 in self.fov.points: 00289 _x = val1 00290 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00291 except struct.error as se: self._check_types(se) 00292 except TypeError as te: self._check_types(te) 00293 00294 def deserialize_numpy(self, str, numpy): 00295 """ 00296 unpack serialized message in str into this message instance using numpy for array types 00297 @param str: byte array of serialized message 00298 @type str: str 00299 @param numpy: numpy python module 00300 @type numpy: module 00301 """ 00302 try: 00303 if self.fov is None: 00304 self.fov = cob_3d_mapping_msgs.msg.PointArray() 00305 end = 0 00306 _x = self 00307 start = end 00308 end += 12 00309 (_x.fov.header.seq, _x.fov.header.stamp.secs, _x.fov.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00310 start = end 00311 end += 4 00312 (length,) = _struct_I.unpack(str[start:end]) 00313 start = end 00314 end += length 00315 self.fov.header.frame_id = str[start:end] 00316 start = end 00317 end += 4 00318 (length,) = _struct_I.unpack(str[start:end]) 00319 self.fov.points = [] 00320 for i in range(0, length): 00321 val1 = geometry_msgs.msg.Point() 00322 _x = val1 00323 start = end 00324 end += 24 00325 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00326 self.fov.points.append(val1) 00327 return self 00328 except struct.error as e: 00329 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00330 00331 _struct_I = roslib.message.struct_I 00332 _struct_3I = struct.Struct("<3I") 00333 _struct_3d = struct.Struct("<3d") 00334 class GetFieldOfView(roslib.message.ServiceDefinition): 00335 _type = 'cob_3d_mapping_msgs/GetFieldOfView' 00336 _md5sum = '7b215930b688058d682ed90318df2dbd' 00337 _request_class = GetFieldOfViewRequest 00338 _response_class = GetFieldOfViewResponse