$search
00001 """autogenerated by genmsg_py from PlaneArray.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import srs_env_model_msgs.msg 00007 import std_msgs.msg 00008 00009 class PlaneArray(roslib.message.Message): 00010 _md5sum = "f915b8673c2821d83cf7ad268a56dbb4" 00011 _type = "srs_env_model_msgs/PlaneArray" 00012 _has_header = True #flag to mark the presence of a Header object 00013 _full_text = """Header header 00014 PlaneDesc[] planes 00015 00016 ================================================================================ 00017 MSG: std_msgs/Header 00018 # Standard metadata for higher-level stamped data types. 00019 # This is generally used to communicate timestamped data 00020 # in a particular coordinate frame. 00021 # 00022 # sequence ID: consecutively increasing ID 00023 uint32 seq 00024 #Two-integer timestamp that is expressed as: 00025 # * stamp.secs: seconds (stamp_secs) since epoch 00026 # * stamp.nsecs: nanoseconds since stamp_secs 00027 # time-handling sugar is provided by the client library 00028 time stamp 00029 #Frame this data is associated with 00030 # 0: no frame 00031 # 1: global frame 00032 string frame_id 00033 00034 ================================================================================ 00035 MSG: srs_env_model_msgs/PlaneDesc 00036 int32 INSERT=0 # Clear old data, insert new one 00037 int32 MODIFY=1 # Modify plane 00038 int32 REMOVE=2 # Remove data 00039 00040 int32 id 00041 int32 flags 00042 geometry_msgs/Pose pose 00043 geometry_msgs/Vector3 scale 00044 00045 ================================================================================ 00046 MSG: geometry_msgs/Pose 00047 # A representation of pose in free space, composed of postion and orientation. 00048 Point position 00049 Quaternion orientation 00050 00051 ================================================================================ 00052 MSG: geometry_msgs/Point 00053 # This contains the position of a point in free space 00054 float64 x 00055 float64 y 00056 float64 z 00057 00058 ================================================================================ 00059 MSG: geometry_msgs/Quaternion 00060 # This represents an orientation in free space in quaternion form. 00061 00062 float64 x 00063 float64 y 00064 float64 z 00065 float64 w 00066 00067 ================================================================================ 00068 MSG: geometry_msgs/Vector3 00069 # This represents a vector in free space. 00070 00071 float64 x 00072 float64 y 00073 float64 z 00074 """ 00075 __slots__ = ['header','planes'] 00076 _slot_types = ['Header','srs_env_model_msgs/PlaneDesc[]'] 00077 00078 def __init__(self, *args, **kwds): 00079 """ 00080 Constructor. Any message fields that are implicitly/explicitly 00081 set to None will be assigned a default value. The recommend 00082 use is keyword arguments as this is more robust to future message 00083 changes. You cannot mix in-order arguments and keyword arguments. 00084 00085 The available fields are: 00086 header,planes 00087 00088 @param args: complete set of field values, in .msg order 00089 @param kwds: use keyword arguments corresponding to message field names 00090 to set specific fields. 00091 """ 00092 if args or kwds: 00093 super(PlaneArray, self).__init__(*args, **kwds) 00094 #message fields cannot be None, assign default values for those that are 00095 if self.header is None: 00096 self.header = std_msgs.msg._Header.Header() 00097 if self.planes is None: 00098 self.planes = [] 00099 else: 00100 self.header = std_msgs.msg._Header.Header() 00101 self.planes = [] 00102 00103 def _get_types(self): 00104 """ 00105 internal API method 00106 """ 00107 return self._slot_types 00108 00109 def serialize(self, buff): 00110 """ 00111 serialize message into buffer 00112 @param buff: buffer 00113 @type buff: StringIO 00114 """ 00115 try: 00116 _x = self 00117 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00118 _x = self.header.frame_id 00119 length = len(_x) 00120 buff.write(struct.pack('<I%ss'%length, length, _x)) 00121 length = len(self.planes) 00122 buff.write(_struct_I.pack(length)) 00123 for val1 in self.planes: 00124 _x = val1 00125 buff.write(_struct_2i.pack(_x.id, _x.flags)) 00126 _v1 = val1.pose 00127 _v2 = _v1.position 00128 _x = _v2 00129 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00130 _v3 = _v1.orientation 00131 _x = _v3 00132 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00133 _v4 = val1.scale 00134 _x = _v4 00135 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00136 except struct.error as se: self._check_types(se) 00137 except TypeError as te: self._check_types(te) 00138 00139 def deserialize(self, str): 00140 """ 00141 unpack serialized message in str into this message instance 00142 @param str: byte array of serialized message 00143 @type str: str 00144 """ 00145 try: 00146 if self.header is None: 00147 self.header = std_msgs.msg._Header.Header() 00148 end = 0 00149 _x = self 00150 start = end 00151 end += 12 00152 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00153 start = end 00154 end += 4 00155 (length,) = _struct_I.unpack(str[start:end]) 00156 start = end 00157 end += length 00158 self.header.frame_id = str[start:end] 00159 start = end 00160 end += 4 00161 (length,) = _struct_I.unpack(str[start:end]) 00162 self.planes = [] 00163 for i in range(0, length): 00164 val1 = srs_env_model_msgs.msg.PlaneDesc() 00165 _x = val1 00166 start = end 00167 end += 8 00168 (_x.id, _x.flags,) = _struct_2i.unpack(str[start:end]) 00169 _v5 = val1.pose 00170 _v6 = _v5.position 00171 _x = _v6 00172 start = end 00173 end += 24 00174 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00175 _v7 = _v5.orientation 00176 _x = _v7 00177 start = end 00178 end += 32 00179 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00180 _v8 = val1.scale 00181 _x = _v8 00182 start = end 00183 end += 24 00184 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00185 self.planes.append(val1) 00186 return self 00187 except struct.error as e: 00188 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00189 00190 00191 def serialize_numpy(self, buff, numpy): 00192 """ 00193 serialize message with numpy array types into buffer 00194 @param buff: buffer 00195 @type buff: StringIO 00196 @param numpy: numpy python module 00197 @type numpy module 00198 """ 00199 try: 00200 _x = self 00201 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00202 _x = self.header.frame_id 00203 length = len(_x) 00204 buff.write(struct.pack('<I%ss'%length, length, _x)) 00205 length = len(self.planes) 00206 buff.write(_struct_I.pack(length)) 00207 for val1 in self.planes: 00208 _x = val1 00209 buff.write(_struct_2i.pack(_x.id, _x.flags)) 00210 _v9 = val1.pose 00211 _v10 = _v9.position 00212 _x = _v10 00213 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00214 _v11 = _v9.orientation 00215 _x = _v11 00216 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00217 _v12 = val1.scale 00218 _x = _v12 00219 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00220 except struct.error as se: self._check_types(se) 00221 except TypeError as te: self._check_types(te) 00222 00223 def deserialize_numpy(self, str, numpy): 00224 """ 00225 unpack serialized message in str into this message instance using numpy for array types 00226 @param str: byte array of serialized message 00227 @type str: str 00228 @param numpy: numpy python module 00229 @type numpy: module 00230 """ 00231 try: 00232 if self.header is None: 00233 self.header = std_msgs.msg._Header.Header() 00234 end = 0 00235 _x = self 00236 start = end 00237 end += 12 00238 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00239 start = end 00240 end += 4 00241 (length,) = _struct_I.unpack(str[start:end]) 00242 start = end 00243 end += length 00244 self.header.frame_id = str[start:end] 00245 start = end 00246 end += 4 00247 (length,) = _struct_I.unpack(str[start:end]) 00248 self.planes = [] 00249 for i in range(0, length): 00250 val1 = srs_env_model_msgs.msg.PlaneDesc() 00251 _x = val1 00252 start = end 00253 end += 8 00254 (_x.id, _x.flags,) = _struct_2i.unpack(str[start:end]) 00255 _v13 = val1.pose 00256 _v14 = _v13.position 00257 _x = _v14 00258 start = end 00259 end += 24 00260 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00261 _v15 = _v13.orientation 00262 _x = _v15 00263 start = end 00264 end += 32 00265 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00266 _v16 = val1.scale 00267 _x = _v16 00268 start = end 00269 end += 24 00270 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00271 self.planes.append(val1) 00272 return self 00273 except struct.error as e: 00274 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00275 00276 _struct_I = roslib.message.struct_I 00277 _struct_4d = struct.Struct("<4d") 00278 _struct_3I = struct.Struct("<3I") 00279 _struct_2i = struct.Struct("<2i") 00280 _struct_3d = struct.Struct("<3d")