_PoseStampedScriptedActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/PoseStampedScriptedActionGoal.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 pr2_object_manipulation_msgs.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class PoseStampedScriptedActionGoal(genpy.Message):
00014   _md5sum = "2eb35aeaeedfba75ecc263cfd4657233"
00015   _type = "pr2_object_manipulation_msgs/PoseStampedScriptedActionGoal"
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 PoseStampedScriptedGoal 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: pr2_object_manipulation_msgs/PoseStampedScriptedGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 geometry_msgs/PoseStamped pose_stamped
00058 
00059 
00060 ================================================================================
00061 MSG: geometry_msgs/PoseStamped
00062 # A Pose with reference coordinate frame and timestamp
00063 Header header
00064 Pose pose
00065 
00066 ================================================================================
00067 MSG: geometry_msgs/Pose
00068 # A representation of pose in free space, composed of postion and orientation. 
00069 Point position
00070 Quaternion orientation
00071 
00072 ================================================================================
00073 MSG: geometry_msgs/Point
00074 # This contains the position of a point in free space
00075 float64 x
00076 float64 y
00077 float64 z
00078 
00079 ================================================================================
00080 MSG: geometry_msgs/Quaternion
00081 # This represents an orientation in free space in quaternion form.
00082 
00083 float64 x
00084 float64 y
00085 float64 z
00086 float64 w
00087 
00088 """
00089   __slots__ = ['header','goal_id','goal']
00090   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','pr2_object_manipulation_msgs/PoseStampedScriptedGoal']
00091 
00092   def __init__(self, *args, **kwds):
00093     """
00094     Constructor. Any message fields that are implicitly/explicitly
00095     set to None will be assigned a default value. The recommend
00096     use is keyword arguments as this is more robust to future message
00097     changes.  You cannot mix in-order arguments and keyword arguments.
00098 
00099     The available fields are:
00100        header,goal_id,goal
00101 
00102     :param args: complete set of field values, in .msg order
00103     :param kwds: use keyword arguments corresponding to message field names
00104     to set specific fields.
00105     """
00106     if args or kwds:
00107       super(PoseStampedScriptedActionGoal, self).__init__(*args, **kwds)
00108       #message fields cannot be None, assign default values for those that are
00109       if self.header is None:
00110         self.header = std_msgs.msg.Header()
00111       if self.goal_id is None:
00112         self.goal_id = actionlib_msgs.msg.GoalID()
00113       if self.goal is None:
00114         self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal()
00115     else:
00116       self.header = std_msgs.msg.Header()
00117       self.goal_id = actionlib_msgs.msg.GoalID()
00118       self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal()
00119 
00120   def _get_types(self):
00121     """
00122     internal API method
00123     """
00124     return self._slot_types
00125 
00126   def serialize(self, buff):
00127     """
00128     serialize message into buffer
00129     :param buff: buffer, ``StringIO``
00130     """
00131     try:
00132       _x = self
00133       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00134       _x = self.header.frame_id
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       _x = self
00141       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00142       _x = self.goal_id.id
00143       length = len(_x)
00144       if python3 or type(_x) == unicode:
00145         _x = _x.encode('utf-8')
00146         length = len(_x)
00147       buff.write(struct.pack('<I%ss'%length, length, _x))
00148       _x = self
00149       buff.write(_struct_3I.pack(_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs))
00150       _x = self.goal.pose_stamped.header.frame_id
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       _x = self
00157       buff.write(_struct_7d.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w))
00158     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00159     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00160 
00161   def deserialize(self, str):
00162     """
00163     unpack serialized message in str into this message instance
00164     :param str: byte array of serialized message, ``str``
00165     """
00166     try:
00167       if self.header is None:
00168         self.header = std_msgs.msg.Header()
00169       if self.goal_id is None:
00170         self.goal_id = actionlib_msgs.msg.GoalID()
00171       if self.goal is None:
00172         self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal()
00173       end = 0
00174       _x = self
00175       start = end
00176       end += 12
00177       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00178       start = end
00179       end += 4
00180       (length,) = _struct_I.unpack(str[start:end])
00181       start = end
00182       end += length
00183       if python3:
00184         self.header.frame_id = str[start:end].decode('utf-8')
00185       else:
00186         self.header.frame_id = str[start:end]
00187       _x = self
00188       start = end
00189       end += 8
00190       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.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       if python3:
00197         self.goal_id.id = str[start:end].decode('utf-8')
00198       else:
00199         self.goal_id.id = str[start:end]
00200       _x = self
00201       start = end
00202       end += 12
00203       (_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00204       start = end
00205       end += 4
00206       (length,) = _struct_I.unpack(str[start:end])
00207       start = end
00208       end += length
00209       if python3:
00210         self.goal.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00211       else:
00212         self.goal.pose_stamped.header.frame_id = str[start:end]
00213       _x = self
00214       start = end
00215       end += 56
00216       (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00217       return self
00218     except struct.error as e:
00219       raise genpy.DeserializationError(e) #most likely buffer underfill
00220 
00221 
00222   def serialize_numpy(self, buff, numpy):
00223     """
00224     serialize message with numpy array types into buffer
00225     :param buff: buffer, ``StringIO``
00226     :param numpy: numpy python module
00227     """
00228     try:
00229       _x = self
00230       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00231       _x = self.header.frame_id
00232       length = len(_x)
00233       if python3 or type(_x) == unicode:
00234         _x = _x.encode('utf-8')
00235         length = len(_x)
00236       buff.write(struct.pack('<I%ss'%length, length, _x))
00237       _x = self
00238       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00239       _x = self.goal_id.id
00240       length = len(_x)
00241       if python3 or type(_x) == unicode:
00242         _x = _x.encode('utf-8')
00243         length = len(_x)
00244       buff.write(struct.pack('<I%ss'%length, length, _x))
00245       _x = self
00246       buff.write(_struct_3I.pack(_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs))
00247       _x = self.goal.pose_stamped.header.frame_id
00248       length = len(_x)
00249       if python3 or type(_x) == unicode:
00250         _x = _x.encode('utf-8')
00251         length = len(_x)
00252       buff.write(struct.pack('<I%ss'%length, length, _x))
00253       _x = self
00254       buff.write(_struct_7d.pack(_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w))
00255     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00256     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00257 
00258   def deserialize_numpy(self, str, numpy):
00259     """
00260     unpack serialized message in str into this message instance using numpy for array types
00261     :param str: byte array of serialized message, ``str``
00262     :param numpy: numpy python module
00263     """
00264     try:
00265       if self.header is None:
00266         self.header = std_msgs.msg.Header()
00267       if self.goal_id is None:
00268         self.goal_id = actionlib_msgs.msg.GoalID()
00269       if self.goal is None:
00270         self.goal = pr2_object_manipulation_msgs.msg.PoseStampedScriptedGoal()
00271       end = 0
00272       _x = self
00273       start = end
00274       end += 12
00275       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00276       start = end
00277       end += 4
00278       (length,) = _struct_I.unpack(str[start:end])
00279       start = end
00280       end += length
00281       if python3:
00282         self.header.frame_id = str[start:end].decode('utf-8')
00283       else:
00284         self.header.frame_id = str[start:end]
00285       _x = self
00286       start = end
00287       end += 8
00288       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00289       start = end
00290       end += 4
00291       (length,) = _struct_I.unpack(str[start:end])
00292       start = end
00293       end += length
00294       if python3:
00295         self.goal_id.id = str[start:end].decode('utf-8')
00296       else:
00297         self.goal_id.id = str[start:end]
00298       _x = self
00299       start = end
00300       end += 12
00301       (_x.goal.pose_stamped.header.seq, _x.goal.pose_stamped.header.stamp.secs, _x.goal.pose_stamped.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00302       start = end
00303       end += 4
00304       (length,) = _struct_I.unpack(str[start:end])
00305       start = end
00306       end += length
00307       if python3:
00308         self.goal.pose_stamped.header.frame_id = str[start:end].decode('utf-8')
00309       else:
00310         self.goal.pose_stamped.header.frame_id = str[start:end]
00311       _x = self
00312       start = end
00313       end += 56
00314       (_x.goal.pose_stamped.pose.position.x, _x.goal.pose_stamped.pose.position.y, _x.goal.pose_stamped.pose.position.z, _x.goal.pose_stamped.pose.orientation.x, _x.goal.pose_stamped.pose.orientation.y, _x.goal.pose_stamped.pose.orientation.z, _x.goal.pose_stamped.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00315       return self
00316     except struct.error as e:
00317       raise genpy.DeserializationError(e) #most likely buffer underfill
00318 
00319 _struct_I = genpy.struct_I
00320 _struct_3I = struct.Struct("<3I")
00321 _struct_7d = struct.Struct("<7d")
00322 _struct_2I = struct.Struct("<2I")


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Mon Oct 6 2014 11:55:20