_AcquireObjectImageGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from cob_object_detection_msgs/AcquireObjectImageGoal.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 AcquireObjectImageGoal(genpy.Message):
00011   _md5sum = "a834da64b488488418ecf10d2737befd"
00012   _type = "cob_object_detection_msgs/AcquireObjectImageGoal"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015 # The goal
00016 string object_name
00017 bool reset_image_counter
00018 geometry_msgs/PoseStamped pose
00019 geometry_msgs/PoseStamped[] sdh_joints
00020 
00021 ================================================================================
00022 MSG: geometry_msgs/PoseStamped
00023 # A Pose with reference coordinate frame and timestamp
00024 Header header
00025 Pose pose
00026 
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data 
00031 # in a particular coordinate frame.
00032 # 
00033 # sequence ID: consecutively increasing ID 
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044 
00045 ================================================================================
00046 MSG: geometry_msgs/Pose
00047 # A representation of pose in free space, composed of postion and orientation. 
00048 Point position
00049 Quaternion orientation
00050 
00051 ================================================================================
00052 MSG: geometry_msgs/Point
00053 # This contains the position of a point in free space
00054 float64 x
00055 float64 y
00056 float64 z
00057 
00058 ================================================================================
00059 MSG: geometry_msgs/Quaternion
00060 # This represents an orientation in free space in quaternion form.
00061 
00062 float64 x
00063 float64 y
00064 float64 z
00065 float64 w
00066 
00067 """
00068   __slots__ = ['object_name','reset_image_counter','pose','sdh_joints']
00069   _slot_types = ['string','bool','geometry_msgs/PoseStamped','geometry_msgs/PoseStamped[]']
00070 
00071   def __init__(self, *args, **kwds):
00072     """
00073     Constructor. Any message fields that are implicitly/explicitly
00074     set to None will be assigned a default value. The recommend
00075     use is keyword arguments as this is more robust to future message
00076     changes.  You cannot mix in-order arguments and keyword arguments.
00077 
00078     The available fields are:
00079        object_name,reset_image_counter,pose,sdh_joints
00080 
00081     :param args: complete set of field values, in .msg order
00082     :param kwds: use keyword arguments corresponding to message field names
00083     to set specific fields.
00084     """
00085     if args or kwds:
00086       super(AcquireObjectImageGoal, self).__init__(*args, **kwds)
00087       #message fields cannot be None, assign default values for those that are
00088       if self.object_name is None:
00089         self.object_name = ''
00090       if self.reset_image_counter is None:
00091         self.reset_image_counter = False
00092       if self.pose is None:
00093         self.pose = geometry_msgs.msg.PoseStamped()
00094       if self.sdh_joints is None:
00095         self.sdh_joints = []
00096     else:
00097       self.object_name = ''
00098       self.reset_image_counter = False
00099       self.pose = geometry_msgs.msg.PoseStamped()
00100       self.sdh_joints = []
00101 
00102   def _get_types(self):
00103     """
00104     internal API method
00105     """
00106     return self._slot_types
00107 
00108   def serialize(self, buff):
00109     """
00110     serialize message into buffer
00111     :param buff: buffer, ``StringIO``
00112     """
00113     try:
00114       _x = self.object_name
00115       length = len(_x)
00116       if python3 or type(_x) == unicode:
00117         _x = _x.encode('utf-8')
00118         length = len(_x)
00119       buff.write(struct.pack('<I%ss'%length, length, _x))
00120       _x = self
00121       buff.write(_struct_B3I.pack(_x.reset_image_counter, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00122       _x = self.pose.header.frame_id
00123       length = len(_x)
00124       if python3 or type(_x) == unicode:
00125         _x = _x.encode('utf-8')
00126         length = len(_x)
00127       buff.write(struct.pack('<I%ss'%length, length, _x))
00128       _x = self
00129       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))
00130       length = len(self.sdh_joints)
00131       buff.write(_struct_I.pack(length))
00132       for val1 in self.sdh_joints:
00133         _v1 = val1.header
00134         buff.write(_struct_I.pack(_v1.seq))
00135         _v2 = _v1.stamp
00136         _x = _v2
00137         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00138         _x = _v1.frame_id
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         _v3 = val1.pose
00145         _v4 = _v3.position
00146         _x = _v4
00147         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00148         _v5 = _v3.orientation
00149         _x = _v5
00150         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00151     except struct.error as se: self._check_types(se)
00152     except TypeError as te: self._check_types(te)
00153 
00154   def deserialize(self, str):
00155     """
00156     unpack serialized message in str into this message instance
00157     :param str: byte array of serialized message, ``str``
00158     """
00159     try:
00160       if self.pose is None:
00161         self.pose = geometry_msgs.msg.PoseStamped()
00162       if self.sdh_joints is None:
00163         self.sdh_joints = None
00164       end = 0
00165       start = end
00166       end += 4
00167       (length,) = _struct_I.unpack(str[start:end])
00168       start = end
00169       end += length
00170       if python3:
00171         self.object_name = str[start:end].decode('utf-8')
00172       else:
00173         self.object_name = str[start:end]
00174       _x = self
00175       start = end
00176       end += 13
00177       (_x.reset_image_counter, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00178       self.reset_image_counter = bool(self.reset_image_counter)
00179       start = end
00180       end += 4
00181       (length,) = _struct_I.unpack(str[start:end])
00182       start = end
00183       end += length
00184       if python3:
00185         self.pose.header.frame_id = str[start:end].decode('utf-8')
00186       else:
00187         self.pose.header.frame_id = str[start:end]
00188       _x = self
00189       start = end
00190       end += 56
00191       (_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])
00192       start = end
00193       end += 4
00194       (length,) = _struct_I.unpack(str[start:end])
00195       self.sdh_joints = []
00196       for i in range(0, length):
00197         val1 = geometry_msgs.msg.PoseStamped()
00198         _v6 = val1.header
00199         start = end
00200         end += 4
00201         (_v6.seq,) = _struct_I.unpack(str[start:end])
00202         _v7 = _v6.stamp
00203         _x = _v7
00204         start = end
00205         end += 8
00206         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00207         start = end
00208         end += 4
00209         (length,) = _struct_I.unpack(str[start:end])
00210         start = end
00211         end += length
00212         if python3:
00213           _v6.frame_id = str[start:end].decode('utf-8')
00214         else:
00215           _v6.frame_id = str[start:end]
00216         _v8 = val1.pose
00217         _v9 = _v8.position
00218         _x = _v9
00219         start = end
00220         end += 24
00221         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00222         _v10 = _v8.orientation
00223         _x = _v10
00224         start = end
00225         end += 32
00226         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00227         self.sdh_joints.append(val1)
00228       return self
00229     except struct.error as e:
00230       raise genpy.DeserializationError(e) #most likely buffer underfill
00231 
00232 
00233   def serialize_numpy(self, buff, numpy):
00234     """
00235     serialize message with numpy array types into buffer
00236     :param buff: buffer, ``StringIO``
00237     :param numpy: numpy python module
00238     """
00239     try:
00240       _x = self.object_name
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
00247       buff.write(_struct_B3I.pack(_x.reset_image_counter, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00248       _x = self.pose.header.frame_id
00249       length = len(_x)
00250       if python3 or type(_x) == unicode:
00251         _x = _x.encode('utf-8')
00252         length = len(_x)
00253       buff.write(struct.pack('<I%ss'%length, length, _x))
00254       _x = self
00255       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))
00256       length = len(self.sdh_joints)
00257       buff.write(_struct_I.pack(length))
00258       for val1 in self.sdh_joints:
00259         _v11 = val1.header
00260         buff.write(_struct_I.pack(_v11.seq))
00261         _v12 = _v11.stamp
00262         _x = _v12
00263         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00264         _x = _v11.frame_id
00265         length = len(_x)
00266         if python3 or type(_x) == unicode:
00267           _x = _x.encode('utf-8')
00268           length = len(_x)
00269         buff.write(struct.pack('<I%ss'%length, length, _x))
00270         _v13 = val1.pose
00271         _v14 = _v13.position
00272         _x = _v14
00273         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00274         _v15 = _v13.orientation
00275         _x = _v15
00276         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00277     except struct.error as se: self._check_types(se)
00278     except TypeError as te: self._check_types(te)
00279 
00280   def deserialize_numpy(self, str, numpy):
00281     """
00282     unpack serialized message in str into this message instance using numpy for array types
00283     :param str: byte array of serialized message, ``str``
00284     :param numpy: numpy python module
00285     """
00286     try:
00287       if self.pose is None:
00288         self.pose = geometry_msgs.msg.PoseStamped()
00289       if self.sdh_joints is None:
00290         self.sdh_joints = None
00291       end = 0
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       start = end
00296       end += length
00297       if python3:
00298         self.object_name = str[start:end].decode('utf-8')
00299       else:
00300         self.object_name = str[start:end]
00301       _x = self
00302       start = end
00303       end += 13
00304       (_x.reset_image_counter, _x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end])
00305       self.reset_image_counter = bool(self.reset_image_counter)
00306       start = end
00307       end += 4
00308       (length,) = _struct_I.unpack(str[start:end])
00309       start = end
00310       end += length
00311       if python3:
00312         self.pose.header.frame_id = str[start:end].decode('utf-8')
00313       else:
00314         self.pose.header.frame_id = str[start:end]
00315       _x = self
00316       start = end
00317       end += 56
00318       (_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])
00319       start = end
00320       end += 4
00321       (length,) = _struct_I.unpack(str[start:end])
00322       self.sdh_joints = []
00323       for i in range(0, length):
00324         val1 = geometry_msgs.msg.PoseStamped()
00325         _v16 = val1.header
00326         start = end
00327         end += 4
00328         (_v16.seq,) = _struct_I.unpack(str[start:end])
00329         _v17 = _v16.stamp
00330         _x = _v17
00331         start = end
00332         end += 8
00333         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00334         start = end
00335         end += 4
00336         (length,) = _struct_I.unpack(str[start:end])
00337         start = end
00338         end += length
00339         if python3:
00340           _v16.frame_id = str[start:end].decode('utf-8')
00341         else:
00342           _v16.frame_id = str[start:end]
00343         _v18 = val1.pose
00344         _v19 = _v18.position
00345         _x = _v19
00346         start = end
00347         end += 24
00348         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00349         _v20 = _v18.orientation
00350         _x = _v20
00351         start = end
00352         end += 32
00353         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00354         self.sdh_joints.append(val1)
00355       return self
00356     except struct.error as e:
00357       raise genpy.DeserializationError(e) #most likely buffer underfill
00358 
00359 _struct_I = genpy.struct_I
00360 _struct_7d = struct.Struct("<7d")
00361 _struct_B3I = struct.Struct("<B3I")
00362 _struct_4d = struct.Struct("<4d")
00363 _struct_2I = struct.Struct("<2I")
00364 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


cob_object_detection_msgs
Author(s): Florian Weisshardt
autogenerated on Sat Mar 9 2013 11:24:33