_PlaneDesc.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_env_model_msgs/PlaneDesc.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 geometry_msgs.msg
00008 
00009 class PlaneDesc(genpy.Message):
00010   _md5sum = "e9bdfaad29753b34e7f3824b23ba5b04"
00011   _type = "srs_env_model_msgs/PlaneDesc"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """int32 INSERT=0        # Clear old data, insert new one
00014 int32 MODIFY=1  # Modify plane
00015 int32 REMOVE=2  # Remove data
00016 
00017 int32 id
00018 int32 flags 
00019 geometry_msgs/Pose pose
00020 geometry_msgs/Vector3 scale
00021 
00022 ================================================================================
00023 MSG: geometry_msgs/Pose
00024 # A representation of pose in free space, composed of postion and orientation. 
00025 Point position
00026 Quaternion orientation
00027 
00028 ================================================================================
00029 MSG: geometry_msgs/Point
00030 # This contains the position of a point in free space
00031 float64 x
00032 float64 y
00033 float64 z
00034 
00035 ================================================================================
00036 MSG: geometry_msgs/Quaternion
00037 # This represents an orientation in free space in quaternion form.
00038 
00039 float64 x
00040 float64 y
00041 float64 z
00042 float64 w
00043 
00044 ================================================================================
00045 MSG: geometry_msgs/Vector3
00046 # This represents a vector in free space. 
00047 
00048 float64 x
00049 float64 y
00050 float64 z
00051 """
00052   # Pseudo-constants
00053   INSERT = 0
00054   MODIFY = 1
00055   REMOVE = 2
00056 
00057   __slots__ = ['id','flags','pose','scale']
00058   _slot_types = ['int32','int32','geometry_msgs/Pose','geometry_msgs/Vector3']
00059 
00060   def __init__(self, *args, **kwds):
00061     """
00062     Constructor. Any message fields that are implicitly/explicitly
00063     set to None will be assigned a default value. The recommend
00064     use is keyword arguments as this is more robust to future message
00065     changes.  You cannot mix in-order arguments and keyword arguments.
00066 
00067     The available fields are:
00068        id,flags,pose,scale
00069 
00070     :param args: complete set of field values, in .msg order
00071     :param kwds: use keyword arguments corresponding to message field names
00072     to set specific fields.
00073     """
00074     if args or kwds:
00075       super(PlaneDesc, self).__init__(*args, **kwds)
00076       #message fields cannot be None, assign default values for those that are
00077       if self.id is None:
00078         self.id = 0
00079       if self.flags is None:
00080         self.flags = 0
00081       if self.pose is None:
00082         self.pose = geometry_msgs.msg.Pose()
00083       if self.scale is None:
00084         self.scale = geometry_msgs.msg.Vector3()
00085     else:
00086       self.id = 0
00087       self.flags = 0
00088       self.pose = geometry_msgs.msg.Pose()
00089       self.scale = geometry_msgs.msg.Vector3()
00090 
00091   def _get_types(self):
00092     """
00093     internal API method
00094     """
00095     return self._slot_types
00096 
00097   def serialize(self, buff):
00098     """
00099     serialize message into buffer
00100     :param buff: buffer, ``StringIO``
00101     """
00102     try:
00103       _x = self
00104       buff.write(_struct_2i10d.pack(_x.id, _x.flags, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00105     except struct.error as se: self._check_types(se)
00106     except TypeError as te: self._check_types(te)
00107 
00108   def deserialize(self, str):
00109     """
00110     unpack serialized message in str into this message instance
00111     :param str: byte array of serialized message, ``str``
00112     """
00113     try:
00114       if self.pose is None:
00115         self.pose = geometry_msgs.msg.Pose()
00116       if self.scale is None:
00117         self.scale = geometry_msgs.msg.Vector3()
00118       end = 0
00119       _x = self
00120       start = end
00121       end += 88
00122       (_x.id, _x.flags, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_2i10d.unpack(str[start:end])
00123       return self
00124     except struct.error as e:
00125       raise genpy.DeserializationError(e) #most likely buffer underfill
00126 
00127 
00128   def serialize_numpy(self, buff, numpy):
00129     """
00130     serialize message with numpy array types into buffer
00131     :param buff: buffer, ``StringIO``
00132     :param numpy: numpy python module
00133     """
00134     try:
00135       _x = self
00136       buff.write(_struct_2i10d.pack(_x.id, _x.flags, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00137     except struct.error as se: self._check_types(se)
00138     except TypeError as te: self._check_types(te)
00139 
00140   def deserialize_numpy(self, str, numpy):
00141     """
00142     unpack serialized message in str into this message instance using numpy for array types
00143     :param str: byte array of serialized message, ``str``
00144     :param numpy: numpy python module
00145     """
00146     try:
00147       if self.pose is None:
00148         self.pose = geometry_msgs.msg.Pose()
00149       if self.scale is None:
00150         self.scale = geometry_msgs.msg.Vector3()
00151       end = 0
00152       _x = self
00153       start = end
00154       end += 88
00155       (_x.id, _x.flags, _x.pose.position.x, _x.pose.position.y, _x.pose.position.z, _x.pose.orientation.x, _x.pose.orientation.y, _x.pose.orientation.z, _x.pose.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_2i10d.unpack(str[start:end])
00156       return self
00157     except struct.error as e:
00158       raise genpy.DeserializationError(e) #most likely buffer underfill
00159 
00160 _struct_I = genpy.struct_I
00161 _struct_2i10d = struct.Struct("<2i10d")


srs_env_model_msgs
Author(s): Vit Stancl (stancl@fit.vutbr.cz), Michal Spanel (spanel@fit.vutbr.cz)
autogenerated on Sun Jan 5 2014 11:49:14