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