_PDDLPlannerGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pddl_msgs/PDDLPlannerGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import pddl_msgs.msg
00008 
00009 class PDDLPlannerGoal(genpy.Message):
00010   _md5sum = "1b6744544ce1b562f4623a7875bbcad2"
00011   _type = "pddl_msgs/PDDLPlannerGoal"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 # goal
00015 pddl_msgs/PDDLDomain domain
00016 pddl_msgs/PDDLProblem problem
00017 
00018 ================================================================================
00019 MSG: pddl_msgs/PDDLDomain
00020 string name
00021 string requirements
00022 string[] types
00023 string[] constants
00024 string[] predicates
00025 pddl_msgs/PDDLAction[] actions
00026 string[] functions
00027 
00028 ================================================================================
00029 MSG: pddl_msgs/PDDLAction
00030 string name
00031 # write String in S expression like "(and foo var)"
00032 string parameters
00033 string precondition
00034 string effect
00035 string on_condition
00036 
00037 ================================================================================
00038 MSG: pddl_msgs/PDDLProblem
00039 string name          # name of problem
00040 string domain        # name of domain to use
00041 pddl_msgs/PDDLObject[] objects # how to represent type?
00042 string[] initial     # initial condition
00043 string goal          # goal conjunction
00044 
00045 ================================================================================
00046 MSG: pddl_msgs/PDDLObject
00047 # definition of PDDLObject
00048 string name
00049 string type
00050 
00051 """
00052   __slots__ = ['domain','problem']
00053   _slot_types = ['pddl_msgs/PDDLDomain','pddl_msgs/PDDLProblem']
00054 
00055   def __init__(self, *args, **kwds):
00056     """
00057     Constructor. Any message fields that are implicitly/explicitly
00058     set to None will be assigned a default value. The recommend
00059     use is keyword arguments as this is more robust to future message
00060     changes.  You cannot mix in-order arguments and keyword arguments.
00061 
00062     The available fields are:
00063        domain,problem
00064 
00065     :param args: complete set of field values, in .msg order
00066     :param kwds: use keyword arguments corresponding to message field names
00067     to set specific fields.
00068     """
00069     if args or kwds:
00070       super(PDDLPlannerGoal, self).__init__(*args, **kwds)
00071       #message fields cannot be None, assign default values for those that are
00072       if self.domain is None:
00073         self.domain = pddl_msgs.msg.PDDLDomain()
00074       if self.problem is None:
00075         self.problem = pddl_msgs.msg.PDDLProblem()
00076     else:
00077       self.domain = pddl_msgs.msg.PDDLDomain()
00078       self.problem = pddl_msgs.msg.PDDLProblem()
00079 
00080   def _get_types(self):
00081     """
00082     internal API method
00083     """
00084     return self._slot_types
00085 
00086   def serialize(self, buff):
00087     """
00088     serialize message into buffer
00089     :param buff: buffer, ``StringIO``
00090     """
00091     try:
00092       _x = self.domain.name
00093       length = len(_x)
00094       if python3 or type(_x) == unicode:
00095         _x = _x.encode('utf-8')
00096         length = len(_x)
00097       buff.write(struct.pack('<I%ss'%length, length, _x))
00098       _x = self.domain.requirements
00099       length = len(_x)
00100       if python3 or type(_x) == unicode:
00101         _x = _x.encode('utf-8')
00102         length = len(_x)
00103       buff.write(struct.pack('<I%ss'%length, length, _x))
00104       length = len(self.domain.types)
00105       buff.write(_struct_I.pack(length))
00106       for val1 in self.domain.types:
00107         length = len(val1)
00108         if python3 or type(val1) == unicode:
00109           val1 = val1.encode('utf-8')
00110           length = len(val1)
00111         buff.write(struct.pack('<I%ss'%length, length, val1))
00112       length = len(self.domain.constants)
00113       buff.write(_struct_I.pack(length))
00114       for val1 in self.domain.constants:
00115         length = len(val1)
00116         if python3 or type(val1) == unicode:
00117           val1 = val1.encode('utf-8')
00118           length = len(val1)
00119         buff.write(struct.pack('<I%ss'%length, length, val1))
00120       length = len(self.domain.predicates)
00121       buff.write(_struct_I.pack(length))
00122       for val1 in self.domain.predicates:
00123         length = len(val1)
00124         if python3 or type(val1) == unicode:
00125           val1 = val1.encode('utf-8')
00126           length = len(val1)
00127         buff.write(struct.pack('<I%ss'%length, length, val1))
00128       length = len(self.domain.actions)
00129       buff.write(_struct_I.pack(length))
00130       for val1 in self.domain.actions:
00131         _x = val1.name
00132         length = len(_x)
00133         if python3 or type(_x) == unicode:
00134           _x = _x.encode('utf-8')
00135           length = len(_x)
00136         buff.write(struct.pack('<I%ss'%length, length, _x))
00137         _x = val1.parameters
00138         length = len(_x)
00139         if python3 or type(_x) == unicode:
00140           _x = _x.encode('utf-8')
00141           length = len(_x)
00142         buff.write(struct.pack('<I%ss'%length, length, _x))
00143         _x = val1.precondition
00144         length = len(_x)
00145         if python3 or type(_x) == unicode:
00146           _x = _x.encode('utf-8')
00147           length = len(_x)
00148         buff.write(struct.pack('<I%ss'%length, length, _x))
00149         _x = val1.effect
00150         length = len(_x)
00151         if python3 or type(_x) == unicode:
00152           _x = _x.encode('utf-8')
00153           length = len(_x)
00154         buff.write(struct.pack('<I%ss'%length, length, _x))
00155         _x = val1.on_condition
00156         length = len(_x)
00157         if python3 or type(_x) == unicode:
00158           _x = _x.encode('utf-8')
00159           length = len(_x)
00160         buff.write(struct.pack('<I%ss'%length, length, _x))
00161       length = len(self.domain.functions)
00162       buff.write(_struct_I.pack(length))
00163       for val1 in self.domain.functions:
00164         length = len(val1)
00165         if python3 or type(val1) == unicode:
00166           val1 = val1.encode('utf-8')
00167           length = len(val1)
00168         buff.write(struct.pack('<I%ss'%length, length, val1))
00169       _x = self.problem.name
00170       length = len(_x)
00171       if python3 or type(_x) == unicode:
00172         _x = _x.encode('utf-8')
00173         length = len(_x)
00174       buff.write(struct.pack('<I%ss'%length, length, _x))
00175       _x = self.problem.domain
00176       length = len(_x)
00177       if python3 or type(_x) == unicode:
00178         _x = _x.encode('utf-8')
00179         length = len(_x)
00180       buff.write(struct.pack('<I%ss'%length, length, _x))
00181       length = len(self.problem.objects)
00182       buff.write(_struct_I.pack(length))
00183       for val1 in self.problem.objects:
00184         _x = val1.name
00185         length = len(_x)
00186         if python3 or type(_x) == unicode:
00187           _x = _x.encode('utf-8')
00188           length = len(_x)
00189         buff.write(struct.pack('<I%ss'%length, length, _x))
00190         _x = val1.type
00191         length = len(_x)
00192         if python3 or type(_x) == unicode:
00193           _x = _x.encode('utf-8')
00194           length = len(_x)
00195         buff.write(struct.pack('<I%ss'%length, length, _x))
00196       length = len(self.problem.initial)
00197       buff.write(_struct_I.pack(length))
00198       for val1 in self.problem.initial:
00199         length = len(val1)
00200         if python3 or type(val1) == unicode:
00201           val1 = val1.encode('utf-8')
00202           length = len(val1)
00203         buff.write(struct.pack('<I%ss'%length, length, val1))
00204       _x = self.problem.goal
00205       length = len(_x)
00206       if python3 or type(_x) == unicode:
00207         _x = _x.encode('utf-8')
00208         length = len(_x)
00209       buff.write(struct.pack('<I%ss'%length, length, _x))
00210     except struct.error as se: self._check_types(se)
00211     except TypeError as te: self._check_types(te)
00212 
00213   def deserialize(self, str):
00214     """
00215     unpack serialized message in str into this message instance
00216     :param str: byte array of serialized message, ``str``
00217     """
00218     try:
00219       if self.domain is None:
00220         self.domain = pddl_msgs.msg.PDDLDomain()
00221       if self.problem is None:
00222         self.problem = pddl_msgs.msg.PDDLProblem()
00223       end = 0
00224       start = end
00225       end += 4
00226       (length,) = _struct_I.unpack(str[start:end])
00227       start = end
00228       end += length
00229       if python3:
00230         self.domain.name = str[start:end].decode('utf-8')
00231       else:
00232         self.domain.name = str[start:end]
00233       start = end
00234       end += 4
00235       (length,) = _struct_I.unpack(str[start:end])
00236       start = end
00237       end += length
00238       if python3:
00239         self.domain.requirements = str[start:end].decode('utf-8')
00240       else:
00241         self.domain.requirements = str[start:end]
00242       start = end
00243       end += 4
00244       (length,) = _struct_I.unpack(str[start:end])
00245       self.domain.types = []
00246       for i in range(0, length):
00247         start = end
00248         end += 4
00249         (length,) = _struct_I.unpack(str[start:end])
00250         start = end
00251         end += length
00252         if python3:
00253           val1 = str[start:end].decode('utf-8')
00254         else:
00255           val1 = str[start:end]
00256         self.domain.types.append(val1)
00257       start = end
00258       end += 4
00259       (length,) = _struct_I.unpack(str[start:end])
00260       self.domain.constants = []
00261       for i in range(0, length):
00262         start = end
00263         end += 4
00264         (length,) = _struct_I.unpack(str[start:end])
00265         start = end
00266         end += length
00267         if python3:
00268           val1 = str[start:end].decode('utf-8')
00269         else:
00270           val1 = str[start:end]
00271         self.domain.constants.append(val1)
00272       start = end
00273       end += 4
00274       (length,) = _struct_I.unpack(str[start:end])
00275       self.domain.predicates = []
00276       for i in range(0, length):
00277         start = end
00278         end += 4
00279         (length,) = _struct_I.unpack(str[start:end])
00280         start = end
00281         end += length
00282         if python3:
00283           val1 = str[start:end].decode('utf-8')
00284         else:
00285           val1 = str[start:end]
00286         self.domain.predicates.append(val1)
00287       start = end
00288       end += 4
00289       (length,) = _struct_I.unpack(str[start:end])
00290       self.domain.actions = []
00291       for i in range(0, length):
00292         val1 = pddl_msgs.msg.PDDLAction()
00293         start = end
00294         end += 4
00295         (length,) = _struct_I.unpack(str[start:end])
00296         start = end
00297         end += length
00298         if python3:
00299           val1.name = str[start:end].decode('utf-8')
00300         else:
00301           val1.name = str[start:end]
00302         start = end
00303         end += 4
00304         (length,) = _struct_I.unpack(str[start:end])
00305         start = end
00306         end += length
00307         if python3:
00308           val1.parameters = str[start:end].decode('utf-8')
00309         else:
00310           val1.parameters = str[start:end]
00311         start = end
00312         end += 4
00313         (length,) = _struct_I.unpack(str[start:end])
00314         start = end
00315         end += length
00316         if python3:
00317           val1.precondition = str[start:end].decode('utf-8')
00318         else:
00319           val1.precondition = str[start:end]
00320         start = end
00321         end += 4
00322         (length,) = _struct_I.unpack(str[start:end])
00323         start = end
00324         end += length
00325         if python3:
00326           val1.effect = str[start:end].decode('utf-8')
00327         else:
00328           val1.effect = str[start:end]
00329         start = end
00330         end += 4
00331         (length,) = _struct_I.unpack(str[start:end])
00332         start = end
00333         end += length
00334         if python3:
00335           val1.on_condition = str[start:end].decode('utf-8')
00336         else:
00337           val1.on_condition = str[start:end]
00338         self.domain.actions.append(val1)
00339       start = end
00340       end += 4
00341       (length,) = _struct_I.unpack(str[start:end])
00342       self.domain.functions = []
00343       for i in range(0, length):
00344         start = end
00345         end += 4
00346         (length,) = _struct_I.unpack(str[start:end])
00347         start = end
00348         end += length
00349         if python3:
00350           val1 = str[start:end].decode('utf-8')
00351         else:
00352           val1 = str[start:end]
00353         self.domain.functions.append(val1)
00354       start = end
00355       end += 4
00356       (length,) = _struct_I.unpack(str[start:end])
00357       start = end
00358       end += length
00359       if python3:
00360         self.problem.name = str[start:end].decode('utf-8')
00361       else:
00362         self.problem.name = str[start:end]
00363       start = end
00364       end += 4
00365       (length,) = _struct_I.unpack(str[start:end])
00366       start = end
00367       end += length
00368       if python3:
00369         self.problem.domain = str[start:end].decode('utf-8')
00370       else:
00371         self.problem.domain = str[start:end]
00372       start = end
00373       end += 4
00374       (length,) = _struct_I.unpack(str[start:end])
00375       self.problem.objects = []
00376       for i in range(0, length):
00377         val1 = pddl_msgs.msg.PDDLObject()
00378         start = end
00379         end += 4
00380         (length,) = _struct_I.unpack(str[start:end])
00381         start = end
00382         end += length
00383         if python3:
00384           val1.name = str[start:end].decode('utf-8')
00385         else:
00386           val1.name = str[start:end]
00387         start = end
00388         end += 4
00389         (length,) = _struct_I.unpack(str[start:end])
00390         start = end
00391         end += length
00392         if python3:
00393           val1.type = str[start:end].decode('utf-8')
00394         else:
00395           val1.type = str[start:end]
00396         self.problem.objects.append(val1)
00397       start = end
00398       end += 4
00399       (length,) = _struct_I.unpack(str[start:end])
00400       self.problem.initial = []
00401       for i in range(0, length):
00402         start = end
00403         end += 4
00404         (length,) = _struct_I.unpack(str[start:end])
00405         start = end
00406         end += length
00407         if python3:
00408           val1 = str[start:end].decode('utf-8')
00409         else:
00410           val1 = str[start:end]
00411         self.problem.initial.append(val1)
00412       start = end
00413       end += 4
00414       (length,) = _struct_I.unpack(str[start:end])
00415       start = end
00416       end += length
00417       if python3:
00418         self.problem.goal = str[start:end].decode('utf-8')
00419       else:
00420         self.problem.goal = str[start:end]
00421       return self
00422     except struct.error as e:
00423       raise genpy.DeserializationError(e) #most likely buffer underfill
00424 
00425 
00426   def serialize_numpy(self, buff, numpy):
00427     """
00428     serialize message with numpy array types into buffer
00429     :param buff: buffer, ``StringIO``
00430     :param numpy: numpy python module
00431     """
00432     try:
00433       _x = self.domain.name
00434       length = len(_x)
00435       if python3 or type(_x) == unicode:
00436         _x = _x.encode('utf-8')
00437         length = len(_x)
00438       buff.write(struct.pack('<I%ss'%length, length, _x))
00439       _x = self.domain.requirements
00440       length = len(_x)
00441       if python3 or type(_x) == unicode:
00442         _x = _x.encode('utf-8')
00443         length = len(_x)
00444       buff.write(struct.pack('<I%ss'%length, length, _x))
00445       length = len(self.domain.types)
00446       buff.write(_struct_I.pack(length))
00447       for val1 in self.domain.types:
00448         length = len(val1)
00449         if python3 or type(val1) == unicode:
00450           val1 = val1.encode('utf-8')
00451           length = len(val1)
00452         buff.write(struct.pack('<I%ss'%length, length, val1))
00453       length = len(self.domain.constants)
00454       buff.write(_struct_I.pack(length))
00455       for val1 in self.domain.constants:
00456         length = len(val1)
00457         if python3 or type(val1) == unicode:
00458           val1 = val1.encode('utf-8')
00459           length = len(val1)
00460         buff.write(struct.pack('<I%ss'%length, length, val1))
00461       length = len(self.domain.predicates)
00462       buff.write(_struct_I.pack(length))
00463       for val1 in self.domain.predicates:
00464         length = len(val1)
00465         if python3 or type(val1) == unicode:
00466           val1 = val1.encode('utf-8')
00467           length = len(val1)
00468         buff.write(struct.pack('<I%ss'%length, length, val1))
00469       length = len(self.domain.actions)
00470       buff.write(_struct_I.pack(length))
00471       for val1 in self.domain.actions:
00472         _x = val1.name
00473         length = len(_x)
00474         if python3 or type(_x) == unicode:
00475           _x = _x.encode('utf-8')
00476           length = len(_x)
00477         buff.write(struct.pack('<I%ss'%length, length, _x))
00478         _x = val1.parameters
00479         length = len(_x)
00480         if python3 or type(_x) == unicode:
00481           _x = _x.encode('utf-8')
00482           length = len(_x)
00483         buff.write(struct.pack('<I%ss'%length, length, _x))
00484         _x = val1.precondition
00485         length = len(_x)
00486         if python3 or type(_x) == unicode:
00487           _x = _x.encode('utf-8')
00488           length = len(_x)
00489         buff.write(struct.pack('<I%ss'%length, length, _x))
00490         _x = val1.effect
00491         length = len(_x)
00492         if python3 or type(_x) == unicode:
00493           _x = _x.encode('utf-8')
00494           length = len(_x)
00495         buff.write(struct.pack('<I%ss'%length, length, _x))
00496         _x = val1.on_condition
00497         length = len(_x)
00498         if python3 or type(_x) == unicode:
00499           _x = _x.encode('utf-8')
00500           length = len(_x)
00501         buff.write(struct.pack('<I%ss'%length, length, _x))
00502       length = len(self.domain.functions)
00503       buff.write(_struct_I.pack(length))
00504       for val1 in self.domain.functions:
00505         length = len(val1)
00506         if python3 or type(val1) == unicode:
00507           val1 = val1.encode('utf-8')
00508           length = len(val1)
00509         buff.write(struct.pack('<I%ss'%length, length, val1))
00510       _x = self.problem.name
00511       length = len(_x)
00512       if python3 or type(_x) == unicode:
00513         _x = _x.encode('utf-8')
00514         length = len(_x)
00515       buff.write(struct.pack('<I%ss'%length, length, _x))
00516       _x = self.problem.domain
00517       length = len(_x)
00518       if python3 or type(_x) == unicode:
00519         _x = _x.encode('utf-8')
00520         length = len(_x)
00521       buff.write(struct.pack('<I%ss'%length, length, _x))
00522       length = len(self.problem.objects)
00523       buff.write(_struct_I.pack(length))
00524       for val1 in self.problem.objects:
00525         _x = val1.name
00526         length = len(_x)
00527         if python3 or type(_x) == unicode:
00528           _x = _x.encode('utf-8')
00529           length = len(_x)
00530         buff.write(struct.pack('<I%ss'%length, length, _x))
00531         _x = val1.type
00532         length = len(_x)
00533         if python3 or type(_x) == unicode:
00534           _x = _x.encode('utf-8')
00535           length = len(_x)
00536         buff.write(struct.pack('<I%ss'%length, length, _x))
00537       length = len(self.problem.initial)
00538       buff.write(_struct_I.pack(length))
00539       for val1 in self.problem.initial:
00540         length = len(val1)
00541         if python3 or type(val1) == unicode:
00542           val1 = val1.encode('utf-8')
00543           length = len(val1)
00544         buff.write(struct.pack('<I%ss'%length, length, val1))
00545       _x = self.problem.goal
00546       length = len(_x)
00547       if python3 or type(_x) == unicode:
00548         _x = _x.encode('utf-8')
00549         length = len(_x)
00550       buff.write(struct.pack('<I%ss'%length, length, _x))
00551     except struct.error as se: self._check_types(se)
00552     except TypeError as te: self._check_types(te)
00553 
00554   def deserialize_numpy(self, str, numpy):
00555     """
00556     unpack serialized message in str into this message instance using numpy for array types
00557     :param str: byte array of serialized message, ``str``
00558     :param numpy: numpy python module
00559     """
00560     try:
00561       if self.domain is None:
00562         self.domain = pddl_msgs.msg.PDDLDomain()
00563       if self.problem is None:
00564         self.problem = pddl_msgs.msg.PDDLProblem()
00565       end = 0
00566       start = end
00567       end += 4
00568       (length,) = _struct_I.unpack(str[start:end])
00569       start = end
00570       end += length
00571       if python3:
00572         self.domain.name = str[start:end].decode('utf-8')
00573       else:
00574         self.domain.name = str[start:end]
00575       start = end
00576       end += 4
00577       (length,) = _struct_I.unpack(str[start:end])
00578       start = end
00579       end += length
00580       if python3:
00581         self.domain.requirements = str[start:end].decode('utf-8')
00582       else:
00583         self.domain.requirements = str[start:end]
00584       start = end
00585       end += 4
00586       (length,) = _struct_I.unpack(str[start:end])
00587       self.domain.types = []
00588       for i in range(0, length):
00589         start = end
00590         end += 4
00591         (length,) = _struct_I.unpack(str[start:end])
00592         start = end
00593         end += length
00594         if python3:
00595           val1 = str[start:end].decode('utf-8')
00596         else:
00597           val1 = str[start:end]
00598         self.domain.types.append(val1)
00599       start = end
00600       end += 4
00601       (length,) = _struct_I.unpack(str[start:end])
00602       self.domain.constants = []
00603       for i in range(0, length):
00604         start = end
00605         end += 4
00606         (length,) = _struct_I.unpack(str[start:end])
00607         start = end
00608         end += length
00609         if python3:
00610           val1 = str[start:end].decode('utf-8')
00611         else:
00612           val1 = str[start:end]
00613         self.domain.constants.append(val1)
00614       start = end
00615       end += 4
00616       (length,) = _struct_I.unpack(str[start:end])
00617       self.domain.predicates = []
00618       for i in range(0, length):
00619         start = end
00620         end += 4
00621         (length,) = _struct_I.unpack(str[start:end])
00622         start = end
00623         end += length
00624         if python3:
00625           val1 = str[start:end].decode('utf-8')
00626         else:
00627           val1 = str[start:end]
00628         self.domain.predicates.append(val1)
00629       start = end
00630       end += 4
00631       (length,) = _struct_I.unpack(str[start:end])
00632       self.domain.actions = []
00633       for i in range(0, length):
00634         val1 = pddl_msgs.msg.PDDLAction()
00635         start = end
00636         end += 4
00637         (length,) = _struct_I.unpack(str[start:end])
00638         start = end
00639         end += length
00640         if python3:
00641           val1.name = str[start:end].decode('utf-8')
00642         else:
00643           val1.name = str[start:end]
00644         start = end
00645         end += 4
00646         (length,) = _struct_I.unpack(str[start:end])
00647         start = end
00648         end += length
00649         if python3:
00650           val1.parameters = str[start:end].decode('utf-8')
00651         else:
00652           val1.parameters = str[start:end]
00653         start = end
00654         end += 4
00655         (length,) = _struct_I.unpack(str[start:end])
00656         start = end
00657         end += length
00658         if python3:
00659           val1.precondition = str[start:end].decode('utf-8')
00660         else:
00661           val1.precondition = str[start:end]
00662         start = end
00663         end += 4
00664         (length,) = _struct_I.unpack(str[start:end])
00665         start = end
00666         end += length
00667         if python3:
00668           val1.effect = str[start:end].decode('utf-8')
00669         else:
00670           val1.effect = str[start:end]
00671         start = end
00672         end += 4
00673         (length,) = _struct_I.unpack(str[start:end])
00674         start = end
00675         end += length
00676         if python3:
00677           val1.on_condition = str[start:end].decode('utf-8')
00678         else:
00679           val1.on_condition = str[start:end]
00680         self.domain.actions.append(val1)
00681       start = end
00682       end += 4
00683       (length,) = _struct_I.unpack(str[start:end])
00684       self.domain.functions = []
00685       for i in range(0, length):
00686         start = end
00687         end += 4
00688         (length,) = _struct_I.unpack(str[start:end])
00689         start = end
00690         end += length
00691         if python3:
00692           val1 = str[start:end].decode('utf-8')
00693         else:
00694           val1 = str[start:end]
00695         self.domain.functions.append(val1)
00696       start = end
00697       end += 4
00698       (length,) = _struct_I.unpack(str[start:end])
00699       start = end
00700       end += length
00701       if python3:
00702         self.problem.name = str[start:end].decode('utf-8')
00703       else:
00704         self.problem.name = str[start:end]
00705       start = end
00706       end += 4
00707       (length,) = _struct_I.unpack(str[start:end])
00708       start = end
00709       end += length
00710       if python3:
00711         self.problem.domain = str[start:end].decode('utf-8')
00712       else:
00713         self.problem.domain = str[start:end]
00714       start = end
00715       end += 4
00716       (length,) = _struct_I.unpack(str[start:end])
00717       self.problem.objects = []
00718       for i in range(0, length):
00719         val1 = pddl_msgs.msg.PDDLObject()
00720         start = end
00721         end += 4
00722         (length,) = _struct_I.unpack(str[start:end])
00723         start = end
00724         end += length
00725         if python3:
00726           val1.name = str[start:end].decode('utf-8')
00727         else:
00728           val1.name = str[start:end]
00729         start = end
00730         end += 4
00731         (length,) = _struct_I.unpack(str[start:end])
00732         start = end
00733         end += length
00734         if python3:
00735           val1.type = str[start:end].decode('utf-8')
00736         else:
00737           val1.type = str[start:end]
00738         self.problem.objects.append(val1)
00739       start = end
00740       end += 4
00741       (length,) = _struct_I.unpack(str[start:end])
00742       self.problem.initial = []
00743       for i in range(0, length):
00744         start = end
00745         end += 4
00746         (length,) = _struct_I.unpack(str[start:end])
00747         start = end
00748         end += length
00749         if python3:
00750           val1 = str[start:end].decode('utf-8')
00751         else:
00752           val1 = str[start:end]
00753         self.problem.initial.append(val1)
00754       start = end
00755       end += 4
00756       (length,) = _struct_I.unpack(str[start:end])
00757       start = end
00758       end += length
00759       if python3:
00760         self.problem.goal = str[start:end].decode('utf-8')
00761       else:
00762         self.problem.goal = str[start:end]
00763       return self
00764     except struct.error as e:
00765       raise genpy.DeserializationError(e) #most likely buffer underfill
00766 
00767 _struct_I = genpy.struct_I
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


pddl_msgs
Author(s): Ryohei Ueda (ueda@jsk.t.u-tokyo.ac.jp)
autogenerated on Sat Mar 23 2013 23:39:10