_env_triangulate.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/env_triangulateRequest.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 env_triangulateRequest(genpy.Message):
00009   _md5sum = "6db44b3e885ea57195d58a7fb97daf25"
00010   _type = "openraveros/env_triangulateRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 
00016 
00017 uint8 inclusive
00018 int32[] bodyids
00019 
00020 """
00021   __slots__ = ['inclusive','bodyids']
00022   _slot_types = ['uint8','int32[]']
00023 
00024   def __init__(self, *args, **kwds):
00025     """
00026     Constructor. Any message fields that are implicitly/explicitly
00027     set to None will be assigned a default value. The recommend
00028     use is keyword arguments as this is more robust to future message
00029     changes.  You cannot mix in-order arguments and keyword arguments.
00030 
00031     The available fields are:
00032        inclusive,bodyids
00033 
00034     :param args: complete set of field values, in .msg order
00035     :param kwds: use keyword arguments corresponding to message field names
00036     to set specific fields.
00037     """
00038     if args or kwds:
00039       super(env_triangulateRequest, self).__init__(*args, **kwds)
00040       #message fields cannot be None, assign default values for those that are
00041       if self.inclusive is None:
00042         self.inclusive = 0
00043       if self.bodyids is None:
00044         self.bodyids = []
00045     else:
00046       self.inclusive = 0
00047       self.bodyids = []
00048 
00049   def _get_types(self):
00050     """
00051     internal API method
00052     """
00053     return self._slot_types
00054 
00055   def serialize(self, buff):
00056     """
00057     serialize message into buffer
00058     :param buff: buffer, ``StringIO``
00059     """
00060     try:
00061       buff.write(_struct_B.pack(self.inclusive))
00062       length = len(self.bodyids)
00063       buff.write(_struct_I.pack(length))
00064       pattern = '<%si'%length
00065       buff.write(struct.pack(pattern, *self.bodyids))
00066     except struct.error as se: self._check_types(se)
00067     except TypeError as te: self._check_types(te)
00068 
00069   def deserialize(self, str):
00070     """
00071     unpack serialized message in str into this message instance
00072     :param str: byte array of serialized message, ``str``
00073     """
00074     try:
00075       end = 0
00076       start = end
00077       end += 1
00078       (self.inclusive,) = _struct_B.unpack(str[start:end])
00079       start = end
00080       end += 4
00081       (length,) = _struct_I.unpack(str[start:end])
00082       pattern = '<%si'%length
00083       start = end
00084       end += struct.calcsize(pattern)
00085       self.bodyids = struct.unpack(pattern, str[start:end])
00086       return self
00087     except struct.error as e:
00088       raise genpy.DeserializationError(e) #most likely buffer underfill
00089 
00090 
00091   def serialize_numpy(self, buff, numpy):
00092     """
00093     serialize message with numpy array types into buffer
00094     :param buff: buffer, ``StringIO``
00095     :param numpy: numpy python module
00096     """
00097     try:
00098       buff.write(_struct_B.pack(self.inclusive))
00099       length = len(self.bodyids)
00100       buff.write(_struct_I.pack(length))
00101       pattern = '<%si'%length
00102       buff.write(self.bodyids.tostring())
00103     except struct.error as se: self._check_types(se)
00104     except TypeError as te: self._check_types(te)
00105 
00106   def deserialize_numpy(self, str, numpy):
00107     """
00108     unpack serialized message in str into this message instance using numpy for array types
00109     :param str: byte array of serialized message, ``str``
00110     :param numpy: numpy python module
00111     """
00112     try:
00113       end = 0
00114       start = end
00115       end += 1
00116       (self.inclusive,) = _struct_B.unpack(str[start:end])
00117       start = end
00118       end += 4
00119       (length,) = _struct_I.unpack(str[start:end])
00120       pattern = '<%si'%length
00121       start = end
00122       end += struct.calcsize(pattern)
00123       self.bodyids = numpy.frombuffer(str[start:end], dtype=numpy.int32, count=length)
00124       return self
00125     except struct.error as e:
00126       raise genpy.DeserializationError(e) #most likely buffer underfill
00127 
00128 _struct_I = genpy.struct_I
00129 _struct_B = struct.Struct("<B")
00130 """autogenerated by genpy from openraveros/env_triangulateResponse.msg. Do not edit."""
00131 import sys
00132 python3 = True if sys.hexversion > 0x03000000 else False
00133 import genpy
00134 import struct
00135 
00136 
00137 class env_triangulateResponse(genpy.Message):
00138   _md5sum = "e91978ce1cb625f399c855b2f221d016"
00139   _type = "openraveros/env_triangulateResponse"
00140   _has_header = False #flag to mark the presence of a Header object
00141   _full_text = """
00142 
00143 float32[] points
00144 
00145 
00146 uint32[] indices
00147 
00148 
00149 """
00150   __slots__ = ['points','indices']
00151   _slot_types = ['float32[]','uint32[]']
00152 
00153   def __init__(self, *args, **kwds):
00154     """
00155     Constructor. Any message fields that are implicitly/explicitly
00156     set to None will be assigned a default value. The recommend
00157     use is keyword arguments as this is more robust to future message
00158     changes.  You cannot mix in-order arguments and keyword arguments.
00159 
00160     The available fields are:
00161        points,indices
00162 
00163     :param args: complete set of field values, in .msg order
00164     :param kwds: use keyword arguments corresponding to message field names
00165     to set specific fields.
00166     """
00167     if args or kwds:
00168       super(env_triangulateResponse, self).__init__(*args, **kwds)
00169       #message fields cannot be None, assign default values for those that are
00170       if self.points is None:
00171         self.points = []
00172       if self.indices is None:
00173         self.indices = []
00174     else:
00175       self.points = []
00176       self.indices = []
00177 
00178   def _get_types(self):
00179     """
00180     internal API method
00181     """
00182     return self._slot_types
00183 
00184   def serialize(self, buff):
00185     """
00186     serialize message into buffer
00187     :param buff: buffer, ``StringIO``
00188     """
00189     try:
00190       length = len(self.points)
00191       buff.write(_struct_I.pack(length))
00192       pattern = '<%sf'%length
00193       buff.write(struct.pack(pattern, *self.points))
00194       length = len(self.indices)
00195       buff.write(_struct_I.pack(length))
00196       pattern = '<%sI'%length
00197       buff.write(struct.pack(pattern, *self.indices))
00198     except struct.error as se: self._check_types(se)
00199     except TypeError as te: self._check_types(te)
00200 
00201   def deserialize(self, str):
00202     """
00203     unpack serialized message in str into this message instance
00204     :param str: byte array of serialized message, ``str``
00205     """
00206     try:
00207       end = 0
00208       start = end
00209       end += 4
00210       (length,) = _struct_I.unpack(str[start:end])
00211       pattern = '<%sf'%length
00212       start = end
00213       end += struct.calcsize(pattern)
00214       self.points = struct.unpack(pattern, str[start:end])
00215       start = end
00216       end += 4
00217       (length,) = _struct_I.unpack(str[start:end])
00218       pattern = '<%sI'%length
00219       start = end
00220       end += struct.calcsize(pattern)
00221       self.indices = struct.unpack(pattern, str[start:end])
00222       return self
00223     except struct.error as e:
00224       raise genpy.DeserializationError(e) #most likely buffer underfill
00225 
00226 
00227   def serialize_numpy(self, buff, numpy):
00228     """
00229     serialize message with numpy array types into buffer
00230     :param buff: buffer, ``StringIO``
00231     :param numpy: numpy python module
00232     """
00233     try:
00234       length = len(self.points)
00235       buff.write(_struct_I.pack(length))
00236       pattern = '<%sf'%length
00237       buff.write(self.points.tostring())
00238       length = len(self.indices)
00239       buff.write(_struct_I.pack(length))
00240       pattern = '<%sI'%length
00241       buff.write(self.indices.tostring())
00242     except struct.error as se: self._check_types(se)
00243     except TypeError as te: self._check_types(te)
00244 
00245   def deserialize_numpy(self, str, numpy):
00246     """
00247     unpack serialized message in str into this message instance using numpy for array types
00248     :param str: byte array of serialized message, ``str``
00249     :param numpy: numpy python module
00250     """
00251     try:
00252       end = 0
00253       start = end
00254       end += 4
00255       (length,) = _struct_I.unpack(str[start:end])
00256       pattern = '<%sf'%length
00257       start = end
00258       end += struct.calcsize(pattern)
00259       self.points = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=length)
00260       start = end
00261       end += 4
00262       (length,) = _struct_I.unpack(str[start:end])
00263       pattern = '<%sI'%length
00264       start = end
00265       end += struct.calcsize(pattern)
00266       self.indices = numpy.frombuffer(str[start:end], dtype=numpy.uint32, count=length)
00267       return self
00268     except struct.error as e:
00269       raise genpy.DeserializationError(e) #most likely buffer underfill
00270 
00271 _struct_I = genpy.struct_I
00272 class env_triangulate(object):
00273   _type          = 'openraveros/env_triangulate'
00274   _md5sum = 'c64616dbb65b7ef4d69d3665fd6169b1'
00275   _request_class  = env_triangulateRequest
00276   _response_class = env_triangulateResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


openraveros
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:15:38