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


cob_object_detection_msgs
Author(s): Florian Weisshardt
autogenerated on Fri Mar 8 2013 15:04:09