$search
00001 """autogenerated by genmsg_py from EstimateRectAltRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import std_msgs.msg 00007 00008 class EstimateRectAltRequest(roslib.message.Message): 00009 _md5sum = "41dc0657d2e4a9be24c3e1b3d65b81b3" 00010 _type = "srs_env_model_percp/EstimateRectAltRequest" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """ 00013 00014 00015 Header header 00016 00017 00018 00019 geometry_msgs/Pose pose 00020 00021 00022 00023 00024 00025 00026 geometry_msgs/Point bounding_box_lwh 00027 00028 ================================================================================ 00029 MSG: std_msgs/Header 00030 # Standard metadata for higher-level stamped data types. 00031 # This is generally used to communicate timestamped data 00032 # in a particular coordinate frame. 00033 # 00034 # sequence ID: consecutively increasing ID 00035 uint32 seq 00036 #Two-integer timestamp that is expressed as: 00037 # * stamp.secs: seconds (stamp_secs) since epoch 00038 # * stamp.nsecs: nanoseconds since stamp_secs 00039 # time-handling sugar is provided by the client library 00040 time stamp 00041 #Frame this data is associated with 00042 # 0: no frame 00043 # 1: global frame 00044 string frame_id 00045 00046 ================================================================================ 00047 MSG: geometry_msgs/Pose 00048 # A representation of pose in free space, composed of postion and orientation. 00049 Point position 00050 Quaternion orientation 00051 00052 ================================================================================ 00053 MSG: geometry_msgs/Point 00054 # This contains the position of a point in free space 00055 float64 x 00056 float64 y 00057 float64 z 00058 00059 ================================================================================ 00060 MSG: geometry_msgs/Quaternion 00061 # This represents an orientation in free space in quaternion form. 00062 00063 float64 x 00064 float64 y 00065 float64 z 00066 float64 w 00067 00068 """ 00069 __slots__ = ['header','pose','bounding_box_lwh'] 00070 _slot_types = ['Header','geometry_msgs/Pose','geometry_msgs/Point'] 00071 00072 def __init__(self, *args, **kwds): 00073 """ 00074 Constructor. Any message fields that are implicitly/explicitly 00075 set to None will be assigned a default value. The recommend 00076 use is keyword arguments as this is more robust to future message 00077 changes. You cannot mix in-order arguments and keyword arguments. 00078 00079 The available fields are: 00080 header,pose,bounding_box_lwh 00081 00082 @param args: complete set of field values, in .msg order 00083 @param kwds: use keyword arguments corresponding to message field names 00084 to set specific fields. 00085 """ 00086 if args or kwds: 00087 super(EstimateRectAltRequest, self).__init__(*args, **kwds) 00088 #message fields cannot be None, assign default values for those that are 00089 if self.header is None: 00090 self.header = std_msgs.msg._Header.Header() 00091 if self.pose is None: 00092 self.pose = geometry_msgs.msg.Pose() 00093 if self.bounding_box_lwh is None: 00094 self.bounding_box_lwh = geometry_msgs.msg.Point() 00095 else: 00096 self.header = std_msgs.msg._Header.Header() 00097 self.pose = geometry_msgs.msg.Pose() 00098 self.bounding_box_lwh = geometry_msgs.msg.Point() 00099 00100 def _get_types(self): 00101 """ 00102 internal API method 00103 """ 00104 return self._slot_types 00105 00106 def serialize(self, buff): 00107 """ 00108 serialize message into buffer 00109 @param buff: buffer 00110 @type buff: StringIO 00111 """ 00112 try: 00113 _x = self 00114 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00115 _x = self.header.frame_id 00116 length = len(_x) 00117 buff.write(struct.pack('<I%ss'%length, length, _x)) 00118 _x = self 00119 buff.write(_struct_10d.pack(_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.bounding_box_lwh.x, _x.bounding_box_lwh.y, _x.bounding_box_lwh.z)) 00120 except struct.error as se: self._check_types(se) 00121 except TypeError as te: self._check_types(te) 00122 00123 def deserialize(self, str): 00124 """ 00125 unpack serialized message in str into this message instance 00126 @param str: byte array of serialized message 00127 @type str: str 00128 """ 00129 try: 00130 if self.header is None: 00131 self.header = std_msgs.msg._Header.Header() 00132 if self.pose is None: 00133 self.pose = geometry_msgs.msg.Pose() 00134 if self.bounding_box_lwh is None: 00135 self.bounding_box_lwh = geometry_msgs.msg.Point() 00136 end = 0 00137 _x = self 00138 start = end 00139 end += 12 00140 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00141 start = end 00142 end += 4 00143 (length,) = _struct_I.unpack(str[start:end]) 00144 start = end 00145 end += length 00146 self.header.frame_id = str[start:end] 00147 _x = self 00148 start = end 00149 end += 80 00150 (_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.bounding_box_lwh.x, _x.bounding_box_lwh.y, _x.bounding_box_lwh.z,) = _struct_10d.unpack(str[start:end]) 00151 return self 00152 except struct.error as e: 00153 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00154 00155 00156 def serialize_numpy(self, buff, numpy): 00157 """ 00158 serialize message with numpy array types into buffer 00159 @param buff: buffer 00160 @type buff: StringIO 00161 @param numpy: numpy python module 00162 @type numpy module 00163 """ 00164 try: 00165 _x = self 00166 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00167 _x = self.header.frame_id 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 _x = self 00171 buff.write(_struct_10d.pack(_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.bounding_box_lwh.x, _x.bounding_box_lwh.y, _x.bounding_box_lwh.z)) 00172 except struct.error as se: self._check_types(se) 00173 except TypeError as te: self._check_types(te) 00174 00175 def deserialize_numpy(self, str, numpy): 00176 """ 00177 unpack serialized message in str into this message instance using numpy for array types 00178 @param str: byte array of serialized message 00179 @type str: str 00180 @param numpy: numpy python module 00181 @type numpy: module 00182 """ 00183 try: 00184 if self.header is None: 00185 self.header = std_msgs.msg._Header.Header() 00186 if self.pose is None: 00187 self.pose = geometry_msgs.msg.Pose() 00188 if self.bounding_box_lwh is None: 00189 self.bounding_box_lwh = geometry_msgs.msg.Point() 00190 end = 0 00191 _x = self 00192 start = end 00193 end += 12 00194 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00195 start = end 00196 end += 4 00197 (length,) = _struct_I.unpack(str[start:end]) 00198 start = end 00199 end += length 00200 self.header.frame_id = str[start:end] 00201 _x = self 00202 start = end 00203 end += 80 00204 (_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.bounding_box_lwh.x, _x.bounding_box_lwh.y, _x.bounding_box_lwh.z,) = _struct_10d.unpack(str[start:end]) 00205 return self 00206 except struct.error as e: 00207 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00208 00209 _struct_I = roslib.message.struct_I 00210 _struct_3I = struct.Struct("<3I") 00211 _struct_10d = struct.Struct("<10d") 00212 """autogenerated by genmsg_py from EstimateRectAltResponse.msg. Do not edit.""" 00213 import roslib.message 00214 import struct 00215 00216 00217 class EstimateRectAltResponse(roslib.message.Message): 00218 _md5sum = "363df5631fa30ccd790dae289b1dbcc0" 00219 _type = "srs_env_model_percp/EstimateRectAltResponse" 00220 _has_header = False #flag to mark the presence of a Header object 00221 _full_text = """ 00222 00223 00224 00225 00226 00227 int16[2] p1 00228 int16[2] p2 00229 00230 00231 00232 """ 00233 __slots__ = ['p1','p2'] 00234 _slot_types = ['int16[2]','int16[2]'] 00235 00236 def __init__(self, *args, **kwds): 00237 """ 00238 Constructor. Any message fields that are implicitly/explicitly 00239 set to None will be assigned a default value. The recommend 00240 use is keyword arguments as this is more robust to future message 00241 changes. You cannot mix in-order arguments and keyword arguments. 00242 00243 The available fields are: 00244 p1,p2 00245 00246 @param args: complete set of field values, in .msg order 00247 @param kwds: use keyword arguments corresponding to message field names 00248 to set specific fields. 00249 """ 00250 if args or kwds: 00251 super(EstimateRectAltResponse, self).__init__(*args, **kwds) 00252 #message fields cannot be None, assign default values for those that are 00253 if self.p1 is None: 00254 self.p1 = [0,0] 00255 if self.p2 is None: 00256 self.p2 = [0,0] 00257 else: 00258 self.p1 = [0,0] 00259 self.p2 = [0,0] 00260 00261 def _get_types(self): 00262 """ 00263 internal API method 00264 """ 00265 return self._slot_types 00266 00267 def serialize(self, buff): 00268 """ 00269 serialize message into buffer 00270 @param buff: buffer 00271 @type buff: StringIO 00272 """ 00273 try: 00274 buff.write(_struct_2h.pack(*self.p1)) 00275 buff.write(_struct_2h.pack(*self.p2)) 00276 except struct.error as se: self._check_types(se) 00277 except TypeError as te: self._check_types(te) 00278 00279 def deserialize(self, str): 00280 """ 00281 unpack serialized message in str into this message instance 00282 @param str: byte array of serialized message 00283 @type str: str 00284 """ 00285 try: 00286 end = 0 00287 start = end 00288 end += 4 00289 self.p1 = _struct_2h.unpack(str[start:end]) 00290 start = end 00291 end += 4 00292 self.p2 = _struct_2h.unpack(str[start:end]) 00293 return self 00294 except struct.error as e: 00295 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00296 00297 00298 def serialize_numpy(self, buff, numpy): 00299 """ 00300 serialize message with numpy array types into buffer 00301 @param buff: buffer 00302 @type buff: StringIO 00303 @param numpy: numpy python module 00304 @type numpy module 00305 """ 00306 try: 00307 buff.write(self.p1.tostring()) 00308 buff.write(self.p2.tostring()) 00309 except struct.error as se: self._check_types(se) 00310 except TypeError as te: self._check_types(te) 00311 00312 def deserialize_numpy(self, str, numpy): 00313 """ 00314 unpack serialized message in str into this message instance using numpy for array types 00315 @param str: byte array of serialized message 00316 @type str: str 00317 @param numpy: numpy python module 00318 @type numpy: module 00319 """ 00320 try: 00321 end = 0 00322 start = end 00323 end += 4 00324 self.p1 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2) 00325 start = end 00326 end += 4 00327 self.p2 = numpy.frombuffer(str[start:end], dtype=numpy.int16, count=2) 00328 return self 00329 except struct.error as e: 00330 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00331 00332 _struct_I = roslib.message.struct_I 00333 _struct_2h = struct.Struct("<2h") 00334 class EstimateRectAlt(roslib.message.ServiceDefinition): 00335 _type = 'srs_env_model_percp/EstimateRectAlt' 00336 _md5sum = '162a30e1972ba11d87ef416c5ba2a6d9' 00337 _request_class = EstimateRectAltRequest 00338 _response_class = EstimateRectAltResponse