$search
00001 """autogenerated by genmsg_py from UpdatePosInfoRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import srs_msgs.msg 00007 00008 class UpdatePosInfoRequest(roslib.message.Message): 00009 _md5sum = "c78c3aca32d4c1731c1e02b813f9a187" 00010 _type = "srs_knowledge/UpdatePosInfoRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """ 00013 00014 string objectName 00015 00016 00017 uint32 hhObjectID 00018 00019 srs_msgs/SRSSpatialInfo spatialInfo 00020 00021 00022 00023 00024 string objectURI 00025 00026 00027 ================================================================================ 00028 MSG: srs_msgs/SRSSpatialInfo 00029 # Point point 00030 # Orientation angles 00031 float32 l 00032 float32 w 00033 float32 h 00034 00035 geometry_msgs/Pose pose 00036 00037 ================================================================================ 00038 MSG: geometry_msgs/Pose 00039 # A representation of pose in free space, composed of postion and orientation. 00040 Point position 00041 Quaternion orientation 00042 00043 ================================================================================ 00044 MSG: geometry_msgs/Point 00045 # This contains the position of a point in free space 00046 float64 x 00047 float64 y 00048 float64 z 00049 00050 ================================================================================ 00051 MSG: geometry_msgs/Quaternion 00052 # This represents an orientation in free space in quaternion form. 00053 00054 float64 x 00055 float64 y 00056 float64 z 00057 float64 w 00058 00059 """ 00060 __slots__ = ['objectName','hhObjectID','spatialInfo','objectURI'] 00061 _slot_types = ['string','uint32','srs_msgs/SRSSpatialInfo','string'] 00062 00063 def __init__(self, *args, **kwds): 00064 """ 00065 Constructor. Any message fields that are implicitly/explicitly 00066 set to None will be assigned a default value. The recommend 00067 use is keyword arguments as this is more robust to future message 00068 changes. You cannot mix in-order arguments and keyword arguments. 00069 00070 The available fields are: 00071 objectName,hhObjectID,spatialInfo,objectURI 00072 00073 @param args: complete set of field values, in .msg order 00074 @param kwds: use keyword arguments corresponding to message field names 00075 to set specific fields. 00076 """ 00077 if args or kwds: 00078 super(UpdatePosInfoRequest, self).__init__(*args, **kwds) 00079 #message fields cannot be None, assign default values for those that are 00080 if self.objectName is None: 00081 self.objectName = '' 00082 if self.hhObjectID is None: 00083 self.hhObjectID = 0 00084 if self.spatialInfo is None: 00085 self.spatialInfo = srs_msgs.msg.SRSSpatialInfo() 00086 if self.objectURI is None: 00087 self.objectURI = '' 00088 else: 00089 self.objectName = '' 00090 self.hhObjectID = 0 00091 self.spatialInfo = srs_msgs.msg.SRSSpatialInfo() 00092 self.objectURI = '' 00093 00094 def _get_types(self): 00095 """ 00096 internal API method 00097 """ 00098 return self._slot_types 00099 00100 def serialize(self, buff): 00101 """ 00102 serialize message into buffer 00103 @param buff: buffer 00104 @type buff: StringIO 00105 """ 00106 try: 00107 _x = self.objectName 00108 length = len(_x) 00109 buff.write(struct.pack('<I%ss'%length, length, _x)) 00110 _x = self 00111 buff.write(_struct_I3f7d.pack(_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w)) 00112 _x = self.objectURI 00113 length = len(_x) 00114 buff.write(struct.pack('<I%ss'%length, length, _x)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize(self, str): 00119 """ 00120 unpack serialized message in str into this message instance 00121 @param str: byte array of serialized message 00122 @type str: str 00123 """ 00124 try: 00125 if self.spatialInfo is None: 00126 self.spatialInfo = srs_msgs.msg.SRSSpatialInfo() 00127 end = 0 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.objectName = str[start:end] 00134 _x = self 00135 start = end 00136 end += 72 00137 (_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w,) = _struct_I3f7d.unpack(str[start:end]) 00138 start = end 00139 end += 4 00140 (length,) = _struct_I.unpack(str[start:end]) 00141 start = end 00142 end += length 00143 self.objectURI = str[start:end] 00144 return self 00145 except struct.error as e: 00146 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00147 00148 00149 def serialize_numpy(self, buff, numpy): 00150 """ 00151 serialize message with numpy array types into buffer 00152 @param buff: buffer 00153 @type buff: StringIO 00154 @param numpy: numpy python module 00155 @type numpy module 00156 """ 00157 try: 00158 _x = self.objectName 00159 length = len(_x) 00160 buff.write(struct.pack('<I%ss'%length, length, _x)) 00161 _x = self 00162 buff.write(_struct_I3f7d.pack(_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w)) 00163 _x = self.objectURI 00164 length = len(_x) 00165 buff.write(struct.pack('<I%ss'%length, length, _x)) 00166 except struct.error as se: self._check_types(se) 00167 except TypeError as te: self._check_types(te) 00168 00169 def deserialize_numpy(self, str, numpy): 00170 """ 00171 unpack serialized message in str into this message instance using numpy for array types 00172 @param str: byte array of serialized message 00173 @type str: str 00174 @param numpy: numpy python module 00175 @type numpy: module 00176 """ 00177 try: 00178 if self.spatialInfo is None: 00179 self.spatialInfo = srs_msgs.msg.SRSSpatialInfo() 00180 end = 0 00181 start = end 00182 end += 4 00183 (length,) = _struct_I.unpack(str[start:end]) 00184 start = end 00185 end += length 00186 self.objectName = str[start:end] 00187 _x = self 00188 start = end 00189 end += 72 00190 (_x.hhObjectID, _x.spatialInfo.l, _x.spatialInfo.w, _x.spatialInfo.h, _x.spatialInfo.pose.position.x, _x.spatialInfo.pose.position.y, _x.spatialInfo.pose.position.z, _x.spatialInfo.pose.orientation.x, _x.spatialInfo.pose.orientation.y, _x.spatialInfo.pose.orientation.z, _x.spatialInfo.pose.orientation.w,) = _struct_I3f7d.unpack(str[start:end]) 00191 start = end 00192 end += 4 00193 (length,) = _struct_I.unpack(str[start:end]) 00194 start = end 00195 end += length 00196 self.objectURI = str[start:end] 00197 return self 00198 except struct.error as e: 00199 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00200 00201 _struct_I = roslib.message.struct_I 00202 _struct_I3f7d = struct.Struct("<I3f7d") 00203 """autogenerated by genmsg_py from UpdatePosInfoResponse.msg. Do not edit.""" 00204 import roslib.message 00205 import struct 00206 00207 00208 class UpdatePosInfoResponse(roslib.message.Message): 00209 _md5sum = "358e233cde0c8a8bcfea4ce193f8fc15" 00210 _type = "srs_knowledge/UpdatePosInfoResponse" 00211 _has_header = False #flag to mark the presence of a Header object 00212 _full_text = """bool success 00213 00214 """ 00215 __slots__ = ['success'] 00216 _slot_types = ['bool'] 00217 00218 def __init__(self, *args, **kwds): 00219 """ 00220 Constructor. Any message fields that are implicitly/explicitly 00221 set to None will be assigned a default value. The recommend 00222 use is keyword arguments as this is more robust to future message 00223 changes. You cannot mix in-order arguments and keyword arguments. 00224 00225 The available fields are: 00226 success 00227 00228 @param args: complete set of field values, in .msg order 00229 @param kwds: use keyword arguments corresponding to message field names 00230 to set specific fields. 00231 """ 00232 if args or kwds: 00233 super(UpdatePosInfoResponse, self).__init__(*args, **kwds) 00234 #message fields cannot be None, assign default values for those that are 00235 if self.success is None: 00236 self.success = False 00237 else: 00238 self.success = False 00239 00240 def _get_types(self): 00241 """ 00242 internal API method 00243 """ 00244 return self._slot_types 00245 00246 def serialize(self, buff): 00247 """ 00248 serialize message into buffer 00249 @param buff: buffer 00250 @type buff: StringIO 00251 """ 00252 try: 00253 buff.write(_struct_B.pack(self.success)) 00254 except struct.error as se: self._check_types(se) 00255 except TypeError as te: self._check_types(te) 00256 00257 def deserialize(self, str): 00258 """ 00259 unpack serialized message in str into this message instance 00260 @param str: byte array of serialized message 00261 @type str: str 00262 """ 00263 try: 00264 end = 0 00265 start = end 00266 end += 1 00267 (self.success,) = _struct_B.unpack(str[start:end]) 00268 self.success = bool(self.success) 00269 return self 00270 except struct.error as e: 00271 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00272 00273 00274 def serialize_numpy(self, buff, numpy): 00275 """ 00276 serialize message with numpy array types into buffer 00277 @param buff: buffer 00278 @type buff: StringIO 00279 @param numpy: numpy python module 00280 @type numpy module 00281 """ 00282 try: 00283 buff.write(_struct_B.pack(self.success)) 00284 except struct.error as se: self._check_types(se) 00285 except TypeError as te: self._check_types(te) 00286 00287 def deserialize_numpy(self, str, numpy): 00288 """ 00289 unpack serialized message in str into this message instance using numpy for array types 00290 @param str: byte array of serialized message 00291 @type str: str 00292 @param numpy: numpy python module 00293 @type numpy: module 00294 """ 00295 try: 00296 end = 0 00297 start = end 00298 end += 1 00299 (self.success,) = _struct_B.unpack(str[start:end]) 00300 self.success = bool(self.success) 00301 return self 00302 except struct.error as e: 00303 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00304 00305 _struct_I = roslib.message.struct_I 00306 _struct_B = struct.Struct("<B") 00307 class UpdatePosInfo(roslib.message.ServiceDefinition): 00308 _type = 'srs_knowledge/UpdatePosInfo' 00309 _md5sum = '870a2e0b3efb754b5f3e5f212cb3b217' 00310 _request_class = UpdatePosInfoRequest 00311 _response_class = UpdatePosInfoResponse