_AffineTransformMatrix.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/AffineTransformMatrix.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 AffineTransformMatrix(genpy.Message):
00009   _md5sum = "b6d267a537fed4f51a8178fe3c372483"
00010   _type = "openraveros/AffineTransformMatrix"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# column ordered 3x4 affine transformation, ie: the arrangement in memory is:
00013 # where the upper 3x3 matrix is orthonormal
00014 # [0] [3] [6] [9]
00015 # [1] [4] [7] [10]
00016 # [2] [5] [8] [11]
00017 float32[12] m
00018 
00019 """
00020   __slots__ = ['m']
00021   _slot_types = ['float32[12]']
00022 
00023   def __init__(self, *args, **kwds):
00024     """
00025     Constructor. Any message fields that are implicitly/explicitly
00026     set to None will be assigned a default value. The recommend
00027     use is keyword arguments as this is more robust to future message
00028     changes.  You cannot mix in-order arguments and keyword arguments.
00029 
00030     The available fields are:
00031        m
00032 
00033     :param args: complete set of field values, in .msg order
00034     :param kwds: use keyword arguments corresponding to message field names
00035     to set specific fields.
00036     """
00037     if args or kwds:
00038       super(AffineTransformMatrix, self).__init__(*args, **kwds)
00039       #message fields cannot be None, assign default values for those that are
00040       if self.m is None:
00041         self.m = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
00042     else:
00043       self.m = [0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.]
00044 
00045   def _get_types(self):
00046     """
00047     internal API method
00048     """
00049     return self._slot_types
00050 
00051   def serialize(self, buff):
00052     """
00053     serialize message into buffer
00054     :param buff: buffer, ``StringIO``
00055     """
00056     try:
00057       buff.write(_struct_12f.pack(*self.m))
00058     except struct.error as se: self._check_types(se)
00059     except TypeError as te: self._check_types(te)
00060 
00061   def deserialize(self, str):
00062     """
00063     unpack serialized message in str into this message instance
00064     :param str: byte array of serialized message, ``str``
00065     """
00066     try:
00067       end = 0
00068       start = end
00069       end += 48
00070       self.m = _struct_12f.unpack(str[start:end])
00071       return self
00072     except struct.error as e:
00073       raise genpy.DeserializationError(e) #most likely buffer underfill
00074 
00075 
00076   def serialize_numpy(self, buff, numpy):
00077     """
00078     serialize message with numpy array types into buffer
00079     :param buff: buffer, ``StringIO``
00080     :param numpy: numpy python module
00081     """
00082     try:
00083       buff.write(self.m.tostring())
00084     except struct.error as se: self._check_types(se)
00085     except TypeError as te: self._check_types(te)
00086 
00087   def deserialize_numpy(self, str, numpy):
00088     """
00089     unpack serialized message in str into this message instance using numpy for array types
00090     :param str: byte array of serialized message, ``str``
00091     :param numpy: numpy python module
00092     """
00093     try:
00094       end = 0
00095       start = end
00096       end += 48
00097       self.m = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=12)
00098       return self
00099     except struct.error as e:
00100       raise genpy.DeserializationError(e) #most likely buffer underfill
00101 
00102 _struct_I = genpy.struct_I
00103 _struct_12f = struct.Struct("<12f")
 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