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