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