00001 """autogenerated by genpy from household_objects_database_msgs/SaveScanRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import geometry_msgs.msg
00008 import std_msgs.msg
00009
00010 class SaveScanRequest(genpy.Message):
00011 _md5sum = "492f49d320aa26325df5fb078c297fa5"
00012 _type = "household_objects_database_msgs/SaveScanRequest"
00013 _has_header = False
00014 _full_text = """
00015
00016
00017 int32 scaled_model_id
00018
00019
00020 geometry_msgs/PoseStamped ground_truth_pose
00021
00022
00023 string bagfile_location
00024
00025
00026 string scan_source
00027
00028
00029 string cloud_topic
00030
00031
00032 ================================================================================
00033 MSG: geometry_msgs/PoseStamped
00034 # A Pose with reference coordinate frame and timestamp
00035 Header header
00036 Pose pose
00037
00038 ================================================================================
00039 MSG: std_msgs/Header
00040 # Standard metadata for higher-level stamped data types.
00041 # This is generally used to communicate timestamped data
00042 # in a particular coordinate frame.
00043 #
00044 # sequence ID: consecutively increasing ID
00045 uint32 seq
00046 #Two-integer timestamp that is expressed as:
00047 # * stamp.secs: seconds (stamp_secs) since epoch
00048 # * stamp.nsecs: nanoseconds since stamp_secs
00049 # time-handling sugar is provided by the client library
00050 time stamp
00051 #Frame this data is associated with
00052 # 0: no frame
00053 # 1: global frame
00054 string frame_id
00055
00056 ================================================================================
00057 MSG: geometry_msgs/Pose
00058 # A representation of pose in free space, composed of postion and orientation.
00059 Point position
00060 Quaternion orientation
00061
00062 ================================================================================
00063 MSG: geometry_msgs/Point
00064 # This contains the position of a point in free space
00065 float64 x
00066 float64 y
00067 float64 z
00068
00069 ================================================================================
00070 MSG: geometry_msgs/Quaternion
00071 # This represents an orientation in free space in quaternion form.
00072
00073 float64 x
00074 float64 y
00075 float64 z
00076 float64 w
00077
00078 """
00079 __slots__ = ['scaled_model_id','ground_truth_pose','bagfile_location','scan_source','cloud_topic']
00080 _slot_types = ['int32','geometry_msgs/PoseStamped','string','string','string']
00081
00082 def __init__(self, *args, **kwds):
00083 """
00084 Constructor. Any message fields that are implicitly/explicitly
00085 set to None will be assigned a default value. The recommend
00086 use is keyword arguments as this is more robust to future message
00087 changes. You cannot mix in-order arguments and keyword arguments.
00088
00089 The available fields are:
00090 scaled_model_id,ground_truth_pose,bagfile_location,scan_source,cloud_topic
00091
00092 :param args: complete set of field values, in .msg order
00093 :param kwds: use keyword arguments corresponding to message field names
00094 to set specific fields.
00095 """
00096 if args or kwds:
00097 super(SaveScanRequest, self).__init__(*args, **kwds)
00098
00099 if self.scaled_model_id is None:
00100 self.scaled_model_id = 0
00101 if self.ground_truth_pose is None:
00102 self.ground_truth_pose = geometry_msgs.msg.PoseStamped()
00103 if self.bagfile_location is None:
00104 self.bagfile_location = ''
00105 if self.scan_source is None:
00106 self.scan_source = ''
00107 if self.cloud_topic is None:
00108 self.cloud_topic = ''
00109 else:
00110 self.scaled_model_id = 0
00111 self.ground_truth_pose = geometry_msgs.msg.PoseStamped()
00112 self.bagfile_location = ''
00113 self.scan_source = ''
00114 self.cloud_topic = ''
00115
00116 def _get_types(self):
00117 """
00118 internal API method
00119 """
00120 return self._slot_types
00121
00122 def serialize(self, buff):
00123 """
00124 serialize message into buffer
00125 :param buff: buffer, ``StringIO``
00126 """
00127 try:
00128 _x = self
00129 buff.write(_struct_i3I.pack(_x.scaled_model_id, _x.ground_truth_pose.header.seq, _x.ground_truth_pose.header.stamp.secs, _x.ground_truth_pose.header.stamp.nsecs))
00130 _x = self.ground_truth_pose.header.frame_id
00131 length = len(_x)
00132 if python3 or type(_x) == unicode:
00133 _x = _x.encode('utf-8')
00134 length = len(_x)
00135 buff.write(struct.pack('<I%ss'%length, length, _x))
00136 _x = self
00137 buff.write(_struct_7d.pack(_x.ground_truth_pose.pose.position.x, _x.ground_truth_pose.pose.position.y, _x.ground_truth_pose.pose.position.z, _x.ground_truth_pose.pose.orientation.x, _x.ground_truth_pose.pose.orientation.y, _x.ground_truth_pose.pose.orientation.z, _x.ground_truth_pose.pose.orientation.w))
00138 _x = self.bagfile_location
00139 length = len(_x)
00140 if python3 or type(_x) == unicode:
00141 _x = _x.encode('utf-8')
00142 length = len(_x)
00143 buff.write(struct.pack('<I%ss'%length, length, _x))
00144 _x = self.scan_source
00145 length = len(_x)
00146 if python3 or type(_x) == unicode:
00147 _x = _x.encode('utf-8')
00148 length = len(_x)
00149 buff.write(struct.pack('<I%ss'%length, length, _x))
00150 _x = self.cloud_topic
00151 length = len(_x)
00152 if python3 or type(_x) == unicode:
00153 _x = _x.encode('utf-8')
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 except struct.error as se: self._check_types(se)
00157 except TypeError as te: self._check_types(te)
00158
00159 def deserialize(self, str):
00160 """
00161 unpack serialized message in str into this message instance
00162 :param str: byte array of serialized message, ``str``
00163 """
00164 try:
00165 if self.ground_truth_pose is None:
00166 self.ground_truth_pose = geometry_msgs.msg.PoseStamped()
00167 end = 0
00168 _x = self
00169 start = end
00170 end += 16
00171 (_x.scaled_model_id, _x.ground_truth_pose.header.seq, _x.ground_truth_pose.header.stamp.secs, _x.ground_truth_pose.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00172 start = end
00173 end += 4
00174 (length,) = _struct_I.unpack(str[start:end])
00175 start = end
00176 end += length
00177 if python3:
00178 self.ground_truth_pose.header.frame_id = str[start:end].decode('utf-8')
00179 else:
00180 self.ground_truth_pose.header.frame_id = str[start:end]
00181 _x = self
00182 start = end
00183 end += 56
00184 (_x.ground_truth_pose.pose.position.x, _x.ground_truth_pose.pose.position.y, _x.ground_truth_pose.pose.position.z, _x.ground_truth_pose.pose.orientation.x, _x.ground_truth_pose.pose.orientation.y, _x.ground_truth_pose.pose.orientation.z, _x.ground_truth_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00185 start = end
00186 end += 4
00187 (length,) = _struct_I.unpack(str[start:end])
00188 start = end
00189 end += length
00190 if python3:
00191 self.bagfile_location = str[start:end].decode('utf-8')
00192 else:
00193 self.bagfile_location = str[start:end]
00194 start = end
00195 end += 4
00196 (length,) = _struct_I.unpack(str[start:end])
00197 start = end
00198 end += length
00199 if python3:
00200 self.scan_source = str[start:end].decode('utf-8')
00201 else:
00202 self.scan_source = str[start:end]
00203 start = end
00204 end += 4
00205 (length,) = _struct_I.unpack(str[start:end])
00206 start = end
00207 end += length
00208 if python3:
00209 self.cloud_topic = str[start:end].decode('utf-8')
00210 else:
00211 self.cloud_topic = str[start:end]
00212 return self
00213 except struct.error as e:
00214 raise genpy.DeserializationError(e)
00215
00216
00217 def serialize_numpy(self, buff, numpy):
00218 """
00219 serialize message with numpy array types into buffer
00220 :param buff: buffer, ``StringIO``
00221 :param numpy: numpy python module
00222 """
00223 try:
00224 _x = self
00225 buff.write(_struct_i3I.pack(_x.scaled_model_id, _x.ground_truth_pose.header.seq, _x.ground_truth_pose.header.stamp.secs, _x.ground_truth_pose.header.stamp.nsecs))
00226 _x = self.ground_truth_pose.header.frame_id
00227 length = len(_x)
00228 if python3 or type(_x) == unicode:
00229 _x = _x.encode('utf-8')
00230 length = len(_x)
00231 buff.write(struct.pack('<I%ss'%length, length, _x))
00232 _x = self
00233 buff.write(_struct_7d.pack(_x.ground_truth_pose.pose.position.x, _x.ground_truth_pose.pose.position.y, _x.ground_truth_pose.pose.position.z, _x.ground_truth_pose.pose.orientation.x, _x.ground_truth_pose.pose.orientation.y, _x.ground_truth_pose.pose.orientation.z, _x.ground_truth_pose.pose.orientation.w))
00234 _x = self.bagfile_location
00235 length = len(_x)
00236 if python3 or type(_x) == unicode:
00237 _x = _x.encode('utf-8')
00238 length = len(_x)
00239 buff.write(struct.pack('<I%ss'%length, length, _x))
00240 _x = self.scan_source
00241 length = len(_x)
00242 if python3 or type(_x) == unicode:
00243 _x = _x.encode('utf-8')
00244 length = len(_x)
00245 buff.write(struct.pack('<I%ss'%length, length, _x))
00246 _x = self.cloud_topic
00247 length = len(_x)
00248 if python3 or type(_x) == unicode:
00249 _x = _x.encode('utf-8')
00250 length = len(_x)
00251 buff.write(struct.pack('<I%ss'%length, length, _x))
00252 except struct.error as se: self._check_types(se)
00253 except TypeError as te: self._check_types(te)
00254
00255 def deserialize_numpy(self, str, numpy):
00256 """
00257 unpack serialized message in str into this message instance using numpy for array types
00258 :param str: byte array of serialized message, ``str``
00259 :param numpy: numpy python module
00260 """
00261 try:
00262 if self.ground_truth_pose is None:
00263 self.ground_truth_pose = geometry_msgs.msg.PoseStamped()
00264 end = 0
00265 _x = self
00266 start = end
00267 end += 16
00268 (_x.scaled_model_id, _x.ground_truth_pose.header.seq, _x.ground_truth_pose.header.stamp.secs, _x.ground_truth_pose.header.stamp.nsecs,) = _struct_i3I.unpack(str[start:end])
00269 start = end
00270 end += 4
00271 (length,) = _struct_I.unpack(str[start:end])
00272 start = end
00273 end += length
00274 if python3:
00275 self.ground_truth_pose.header.frame_id = str[start:end].decode('utf-8')
00276 else:
00277 self.ground_truth_pose.header.frame_id = str[start:end]
00278 _x = self
00279 start = end
00280 end += 56
00281 (_x.ground_truth_pose.pose.position.x, _x.ground_truth_pose.pose.position.y, _x.ground_truth_pose.pose.position.z, _x.ground_truth_pose.pose.orientation.x, _x.ground_truth_pose.pose.orientation.y, _x.ground_truth_pose.pose.orientation.z, _x.ground_truth_pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00282 start = end
00283 end += 4
00284 (length,) = _struct_I.unpack(str[start:end])
00285 start = end
00286 end += length
00287 if python3:
00288 self.bagfile_location = str[start:end].decode('utf-8')
00289 else:
00290 self.bagfile_location = str[start:end]
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.scan_source = str[start:end].decode('utf-8')
00298 else:
00299 self.scan_source = str[start:end]
00300 start = end
00301 end += 4
00302 (length,) = _struct_I.unpack(str[start:end])
00303 start = end
00304 end += length
00305 if python3:
00306 self.cloud_topic = str[start:end].decode('utf-8')
00307 else:
00308 self.cloud_topic = str[start:end]
00309 return self
00310 except struct.error as e:
00311 raise genpy.DeserializationError(e)
00312
00313 _struct_I = genpy.struct_I
00314 _struct_i3I = struct.Struct("<i3I")
00315 _struct_7d = struct.Struct("<7d")
00316 """autogenerated by genpy from household_objects_database_msgs/SaveScanResponse.msg. Do not edit."""
00317 import sys
00318 python3 = True if sys.hexversion > 0x03000000 else False
00319 import genpy
00320 import struct
00321
00322 import household_objects_database_msgs.msg
00323
00324 class SaveScanResponse(genpy.Message):
00325 _md5sum = "b49fccceeb56b964ed23601916a24082"
00326 _type = "household_objects_database_msgs/SaveScanResponse"
00327 _has_header = False
00328 _full_text = """
00329
00330 DatabaseReturnCode return_code
00331
00332 ================================================================================
00333 MSG: household_objects_database_msgs/DatabaseReturnCode
00334 # return codes for database-related services
00335
00336 int32 UNKNOWN_ERROR = 1
00337 int32 DATABASE_NOT_CONNECTED = 2
00338 int32 DATABASE_QUERY_ERROR = 3
00339 int32 SUCCESS = -1
00340
00341 int32 code
00342 """
00343 __slots__ = ['return_code']
00344 _slot_types = ['household_objects_database_msgs/DatabaseReturnCode']
00345
00346 def __init__(self, *args, **kwds):
00347 """
00348 Constructor. Any message fields that are implicitly/explicitly
00349 set to None will be assigned a default value. The recommend
00350 use is keyword arguments as this is more robust to future message
00351 changes. You cannot mix in-order arguments and keyword arguments.
00352
00353 The available fields are:
00354 return_code
00355
00356 :param args: complete set of field values, in .msg order
00357 :param kwds: use keyword arguments corresponding to message field names
00358 to set specific fields.
00359 """
00360 if args or kwds:
00361 super(SaveScanResponse, self).__init__(*args, **kwds)
00362
00363 if self.return_code is None:
00364 self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00365 else:
00366 self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00367
00368 def _get_types(self):
00369 """
00370 internal API method
00371 """
00372 return self._slot_types
00373
00374 def serialize(self, buff):
00375 """
00376 serialize message into buffer
00377 :param buff: buffer, ``StringIO``
00378 """
00379 try:
00380 buff.write(_struct_i.pack(self.return_code.code))
00381 except struct.error as se: self._check_types(se)
00382 except TypeError as te: self._check_types(te)
00383
00384 def deserialize(self, str):
00385 """
00386 unpack serialized message in str into this message instance
00387 :param str: byte array of serialized message, ``str``
00388 """
00389 try:
00390 if self.return_code is None:
00391 self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00392 end = 0
00393 start = end
00394 end += 4
00395 (self.return_code.code,) = _struct_i.unpack(str[start:end])
00396 return self
00397 except struct.error as e:
00398 raise genpy.DeserializationError(e)
00399
00400
00401 def serialize_numpy(self, buff, numpy):
00402 """
00403 serialize message with numpy array types into buffer
00404 :param buff: buffer, ``StringIO``
00405 :param numpy: numpy python module
00406 """
00407 try:
00408 buff.write(_struct_i.pack(self.return_code.code))
00409 except struct.error as se: self._check_types(se)
00410 except TypeError as te: self._check_types(te)
00411
00412 def deserialize_numpy(self, str, numpy):
00413 """
00414 unpack serialized message in str into this message instance using numpy for array types
00415 :param str: byte array of serialized message, ``str``
00416 :param numpy: numpy python module
00417 """
00418 try:
00419 if self.return_code is None:
00420 self.return_code = household_objects_database_msgs.msg.DatabaseReturnCode()
00421 end = 0
00422 start = end
00423 end += 4
00424 (self.return_code.code,) = _struct_i.unpack(str[start:end])
00425 return self
00426 except struct.error as e:
00427 raise genpy.DeserializationError(e)
00428
00429 _struct_I = genpy.struct_I
00430 _struct_i = struct.Struct("<i")
00431 class SaveScan(object):
00432 _type = 'household_objects_database_msgs/SaveScan'
00433 _md5sum = '855c7b6f2658d8a9de03dd9a5f7b1f1e'
00434 _request_class = SaveScanRequest
00435 _response_class = SaveScanResponse