_OmplPlannerDiagnostics.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ompl_ros_interface/OmplPlannerDiagnostics.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class OmplPlannerDiagnostics(genpy.Message):
00009   _md5sum = "5b3711264bf69e94abcd2caafc0c541d"
00010   _type = "ompl_ros_interface/OmplPlannerDiagnostics"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string summary
00013 string group
00014 string planner
00015 string result
00016 float64 planning_time
00017 int32 trajectory_size
00018 float64 trajectory_duration
00019 int32 state_allocator_size
00020 
00021 """
00022   __slots__ = ['summary','group','planner','result','planning_time','trajectory_size','trajectory_duration','state_allocator_size']
00023   _slot_types = ['string','string','string','string','float64','int32','float64','int32']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        summary,group,planner,result,planning_time,trajectory_size,trajectory_duration,state_allocator_size
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(OmplPlannerDiagnostics, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.summary is None:
00043         self.summary = ''
00044       if self.group is None:
00045         self.group = ''
00046       if self.planner is None:
00047         self.planner = ''
00048       if self.result is None:
00049         self.result = ''
00050       if self.planning_time is None:
00051         self.planning_time = 0.
00052       if self.trajectory_size is None:
00053         self.trajectory_size = 0
00054       if self.trajectory_duration is None:
00055         self.trajectory_duration = 0.
00056       if self.state_allocator_size is None:
00057         self.state_allocator_size = 0
00058     else:
00059       self.summary = ''
00060       self.group = ''
00061       self.planner = ''
00062       self.result = ''
00063       self.planning_time = 0.
00064       self.trajectory_size = 0
00065       self.trajectory_duration = 0.
00066       self.state_allocator_size = 0
00067 
00068   def _get_types(self):
00069     """
00070     internal API method
00071     """
00072     return self._slot_types
00073 
00074   def serialize(self, buff):
00075     """
00076     serialize message into buffer
00077     :param buff: buffer, ``StringIO``
00078     """
00079     try:
00080       _x = self.summary
00081       length = len(_x)
00082       if python3 or type(_x) == unicode:
00083         _x = _x.encode('utf-8')
00084         length = len(_x)
00085       buff.write(struct.pack('<I%ss'%length, length, _x))
00086       _x = self.group
00087       length = len(_x)
00088       if python3 or type(_x) == unicode:
00089         _x = _x.encode('utf-8')
00090         length = len(_x)
00091       buff.write(struct.pack('<I%ss'%length, length, _x))
00092       _x = self.planner
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.result
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       _x = self
00105       buff.write(_struct_didi.pack(_x.planning_time, _x.trajectory_size, _x.trajectory_duration, _x.state_allocator_size))
00106     except struct.error as se: self._check_types(se)
00107     except TypeError as te: self._check_types(te)
00108 
00109   def deserialize(self, str):
00110     """
00111     unpack serialized message in str into this message instance
00112     :param str: byte array of serialized message, ``str``
00113     """
00114     try:
00115       end = 0
00116       start = end
00117       end += 4
00118       (length,) = _struct_I.unpack(str[start:end])
00119       start = end
00120       end += length
00121       if python3:
00122         self.summary = str[start:end].decode('utf-8')
00123       else:
00124         self.summary = str[start:end]
00125       start = end
00126       end += 4
00127       (length,) = _struct_I.unpack(str[start:end])
00128       start = end
00129       end += length
00130       if python3:
00131         self.group = str[start:end].decode('utf-8')
00132       else:
00133         self.group = str[start:end]
00134       start = end
00135       end += 4
00136       (length,) = _struct_I.unpack(str[start:end])
00137       start = end
00138       end += length
00139       if python3:
00140         self.planner = str[start:end].decode('utf-8')
00141       else:
00142         self.planner = str[start:end]
00143       start = end
00144       end += 4
00145       (length,) = _struct_I.unpack(str[start:end])
00146       start = end
00147       end += length
00148       if python3:
00149         self.result = str[start:end].decode('utf-8')
00150       else:
00151         self.result = str[start:end]
00152       _x = self
00153       start = end
00154       end += 24
00155       (_x.planning_time, _x.trajectory_size, _x.trajectory_duration, _x.state_allocator_size,) = _struct_didi.unpack(str[start:end])
00156       return self
00157     except struct.error as e:
00158       raise genpy.DeserializationError(e) #most likely buffer underfill
00159 
00160 
00161   def serialize_numpy(self, buff, numpy):
00162     """
00163     serialize message with numpy array types into buffer
00164     :param buff: buffer, ``StringIO``
00165     :param numpy: numpy python module
00166     """
00167     try:
00168       _x = self.summary
00169       length = len(_x)
00170       if python3 or type(_x) == unicode:
00171         _x = _x.encode('utf-8')
00172         length = len(_x)
00173       buff.write(struct.pack('<I%ss'%length, length, _x))
00174       _x = self.group
00175       length = len(_x)
00176       if python3 or type(_x) == unicode:
00177         _x = _x.encode('utf-8')
00178         length = len(_x)
00179       buff.write(struct.pack('<I%ss'%length, length, _x))
00180       _x = self.planner
00181       length = len(_x)
00182       if python3 or type(_x) == unicode:
00183         _x = _x.encode('utf-8')
00184         length = len(_x)
00185       buff.write(struct.pack('<I%ss'%length, length, _x))
00186       _x = self.result
00187       length = len(_x)
00188       if python3 or type(_x) == unicode:
00189         _x = _x.encode('utf-8')
00190         length = len(_x)
00191       buff.write(struct.pack('<I%ss'%length, length, _x))
00192       _x = self
00193       buff.write(_struct_didi.pack(_x.planning_time, _x.trajectory_size, _x.trajectory_duration, _x.state_allocator_size))
00194     except struct.error as se: self._check_types(se)
00195     except TypeError as te: self._check_types(te)
00196 
00197   def deserialize_numpy(self, str, numpy):
00198     """
00199     unpack serialized message in str into this message instance using numpy for array types
00200     :param str: byte array of serialized message, ``str``
00201     :param numpy: numpy python module
00202     """
00203     try:
00204       end = 0
00205       start = end
00206       end += 4
00207       (length,) = _struct_I.unpack(str[start:end])
00208       start = end
00209       end += length
00210       if python3:
00211         self.summary = str[start:end].decode('utf-8')
00212       else:
00213         self.summary = str[start:end]
00214       start = end
00215       end += 4
00216       (length,) = _struct_I.unpack(str[start:end])
00217       start = end
00218       end += length
00219       if python3:
00220         self.group = str[start:end].decode('utf-8')
00221       else:
00222         self.group = str[start:end]
00223       start = end
00224       end += 4
00225       (length,) = _struct_I.unpack(str[start:end])
00226       start = end
00227       end += length
00228       if python3:
00229         self.planner = str[start:end].decode('utf-8')
00230       else:
00231         self.planner = str[start:end]
00232       start = end
00233       end += 4
00234       (length,) = _struct_I.unpack(str[start:end])
00235       start = end
00236       end += length
00237       if python3:
00238         self.result = str[start:end].decode('utf-8')
00239       else:
00240         self.result = str[start:end]
00241       _x = self
00242       start = end
00243       end += 24
00244       (_x.planning_time, _x.trajectory_size, _x.trajectory_duration, _x.state_allocator_size,) = _struct_didi.unpack(str[start:end])
00245       return self
00246     except struct.error as e:
00247       raise genpy.DeserializationError(e) #most likely buffer underfill
00248 
00249 _struct_I = genpy.struct_I
00250 _struct_didi = struct.Struct("<didi")


ompl_ros_interface
Author(s): Sachin Chitta
autogenerated on Mon Dec 2 2013 12:38:54