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