_body_getaabb.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/body_getaabbRequest.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 body_getaabbRequest(genpy.Message):
00009   _md5sum = "10fe673987681b8f34c92bca56d3c517"
00010   _type = "openraveros/body_getaabbRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 int32 bodyid
00016 
00017 """
00018   __slots__ = ['bodyid']
00019   _slot_types = ['int32']
00020 
00021   def __init__(self, *args, **kwds):
00022     """
00023     Constructor. Any message fields that are implicitly/explicitly
00024     set to None will be assigned a default value. The recommend
00025     use is keyword arguments as this is more robust to future message
00026     changes.  You cannot mix in-order arguments and keyword arguments.
00027 
00028     The available fields are:
00029        bodyid
00030 
00031     :param args: complete set of field values, in .msg order
00032     :param kwds: use keyword arguments corresponding to message field names
00033     to set specific fields.
00034     """
00035     if args or kwds:
00036       super(body_getaabbRequest, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.bodyid is None:
00039         self.bodyid = 0
00040     else:
00041       self.bodyid = 0
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, ``StringIO``
00053     """
00054     try:
00055       buff.write(_struct_i.pack(self.bodyid))
00056     except struct.error as se: self._check_types(se)
00057     except TypeError as te: self._check_types(te)
00058 
00059   def deserialize(self, str):
00060     """
00061     unpack serialized message in str into this message instance
00062     :param str: byte array of serialized message, ``str``
00063     """
00064     try:
00065       end = 0
00066       start = end
00067       end += 4
00068       (self.bodyid,) = _struct_i.unpack(str[start:end])
00069       return self
00070     except struct.error as e:
00071       raise genpy.DeserializationError(e) #most likely buffer underfill
00072 
00073 
00074   def serialize_numpy(self, buff, numpy):
00075     """
00076     serialize message with numpy array types into buffer
00077     :param buff: buffer, ``StringIO``
00078     :param numpy: numpy python module
00079     """
00080     try:
00081       buff.write(_struct_i.pack(self.bodyid))
00082     except struct.error as se: self._check_types(se)
00083     except TypeError as te: self._check_types(te)
00084 
00085   def deserialize_numpy(self, str, numpy):
00086     """
00087     unpack serialized message in str into this message instance using numpy for array types
00088     :param str: byte array of serialized message, ``str``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       end = 0
00093       start = end
00094       end += 4
00095       (self.bodyid,) = _struct_i.unpack(str[start:end])
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 _struct_I = genpy.struct_I
00101 _struct_i = struct.Struct("<i")
00102 """autogenerated by genpy from openraveros/body_getaabbResponse.msg. Do not edit."""
00103 import sys
00104 python3 = True if sys.hexversion > 0x03000000 else False
00105 import genpy
00106 import struct
00107 
00108 import openraveros.msg
00109 
00110 class body_getaabbResponse(genpy.Message):
00111   _md5sum = "422f919969f4130535a3445c8575ee9e"
00112   _type = "openraveros/body_getaabbResponse"
00113   _has_header = False #flag to mark the presence of a Header object
00114   _full_text = """AABB box
00115 
00116 
00117 ================================================================================
00118 MSG: openraveros/AABB
00119 # axis-aligned bounding box
00120 float32[3] center
00121 
00122 # half widths
00123 float32[3] extents
00124 
00125 """
00126   __slots__ = ['box']
00127   _slot_types = ['openraveros/AABB']
00128 
00129   def __init__(self, *args, **kwds):
00130     """
00131     Constructor. Any message fields that are implicitly/explicitly
00132     set to None will be assigned a default value. The recommend
00133     use is keyword arguments as this is more robust to future message
00134     changes.  You cannot mix in-order arguments and keyword arguments.
00135 
00136     The available fields are:
00137        box
00138 
00139     :param args: complete set of field values, in .msg order
00140     :param kwds: use keyword arguments corresponding to message field names
00141     to set specific fields.
00142     """
00143     if args or kwds:
00144       super(body_getaabbResponse, self).__init__(*args, **kwds)
00145       #message fields cannot be None, assign default values for those that are
00146       if self.box is None:
00147         self.box = openraveros.msg.AABB()
00148     else:
00149       self.box = openraveros.msg.AABB()
00150 
00151   def _get_types(self):
00152     """
00153     internal API method
00154     """
00155     return self._slot_types
00156 
00157   def serialize(self, buff):
00158     """
00159     serialize message into buffer
00160     :param buff: buffer, ``StringIO``
00161     """
00162     try:
00163       buff.write(_struct_3f.pack(*self.box.center))
00164       buff.write(_struct_3f.pack(*self.box.extents))
00165     except struct.error as se: self._check_types(se)
00166     except TypeError as te: self._check_types(te)
00167 
00168   def deserialize(self, str):
00169     """
00170     unpack serialized message in str into this message instance
00171     :param str: byte array of serialized message, ``str``
00172     """
00173     try:
00174       if self.box is None:
00175         self.box = openraveros.msg.AABB()
00176       end = 0
00177       start = end
00178       end += 12
00179       self.box.center = _struct_3f.unpack(str[start:end])
00180       start = end
00181       end += 12
00182       self.box.extents = _struct_3f.unpack(str[start:end])
00183       return self
00184     except struct.error as e:
00185       raise genpy.DeserializationError(e) #most likely buffer underfill
00186 
00187 
00188   def serialize_numpy(self, buff, numpy):
00189     """
00190     serialize message with numpy array types into buffer
00191     :param buff: buffer, ``StringIO``
00192     :param numpy: numpy python module
00193     """
00194     try:
00195       buff.write(self.box.center.tostring())
00196       buff.write(self.box.extents.tostring())
00197     except struct.error as se: self._check_types(se)
00198     except TypeError as te: self._check_types(te)
00199 
00200   def deserialize_numpy(self, str, numpy):
00201     """
00202     unpack serialized message in str into this message instance using numpy for array types
00203     :param str: byte array of serialized message, ``str``
00204     :param numpy: numpy python module
00205     """
00206     try:
00207       if self.box is None:
00208         self.box = openraveros.msg.AABB()
00209       end = 0
00210       start = end
00211       end += 12
00212       self.box.center = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3)
00213       start = end
00214       end += 12
00215       self.box.extents = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3)
00216       return self
00217     except struct.error as e:
00218       raise genpy.DeserializationError(e) #most likely buffer underfill
00219 
00220 _struct_I = genpy.struct_I
00221 _struct_3f = struct.Struct("<3f")
00222 class body_getaabb(object):
00223   _type          = 'openraveros/body_getaabb'
00224   _md5sum = '2ae8c767300201f12040e0d3eb82cd2a'
00225   _request_class  = body_getaabbRequest
00226   _response_class = body_getaabbResponse
 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:37