_PickAndPlaceActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_block_manipulation/PickAndPlaceActionGoal.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 turtlebot_block_manipulation.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class PickAndPlaceActionGoal(genpy.Message):
00014   _md5sum = "414a1aaefb37f8efaa1fba6d43aa0061"
00015   _type = "turtlebot_block_manipulation/PickAndPlaceActionGoal"
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 PickAndPlaceGoal 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: turtlebot_block_manipulation/PickAndPlaceGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 #goal definition
00058 string frame
00059 float32 z_up
00060 float32 gripper_open
00061 float32 gripper_closed
00062 geometry_msgs/Pose pickup_pose
00063 geometry_msgs/Pose place_pose
00064 string topic
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','turtlebot_block_manipulation/PickAndPlaceGoal']
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(PickAndPlaceActionGoal, 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 = turtlebot_block_manipulation.msg.PickAndPlaceGoal()
00115     else:
00116       self.header = std_msgs.msg.Header()
00117       self.goal_id = actionlib_msgs.msg.GoalID()
00118       self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal()
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.goal.frame
00149       length = len(_x)
00150       if python3 or type(_x) == unicode:
00151         _x = _x.encode('utf-8')
00152         length = len(_x)
00153       buff.write(struct.pack('<I%ss'%length, length, _x))
00154       _x = self
00155       buff.write(_struct_3f14d.pack(_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w))
00156       _x = self.goal.topic
00157       length = len(_x)
00158       if python3 or type(_x) == unicode:
00159         _x = _x.encode('utf-8')
00160         length = len(_x)
00161       buff.write(struct.pack('<I%ss'%length, length, _x))
00162     except struct.error as se: self._check_types(se)
00163     except TypeError as te: self._check_types(te)
00164 
00165   def deserialize(self, str):
00166     """
00167     unpack serialized message in str into this message instance
00168     :param str: byte array of serialized message, ``str``
00169     """
00170     try:
00171       if self.header is None:
00172         self.header = std_msgs.msg.Header()
00173       if self.goal_id is None:
00174         self.goal_id = actionlib_msgs.msg.GoalID()
00175       if self.goal is None:
00176         self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal()
00177       end = 0
00178       _x = self
00179       start = end
00180       end += 12
00181       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00182       start = end
00183       end += 4
00184       (length,) = _struct_I.unpack(str[start:end])
00185       start = end
00186       end += length
00187       if python3:
00188         self.header.frame_id = str[start:end].decode('utf-8')
00189       else:
00190         self.header.frame_id = str[start:end]
00191       _x = self
00192       start = end
00193       end += 8
00194       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00195       start = end
00196       end += 4
00197       (length,) = _struct_I.unpack(str[start:end])
00198       start = end
00199       end += length
00200       if python3:
00201         self.goal_id.id = str[start:end].decode('utf-8')
00202       else:
00203         self.goal_id.id = 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.frame = str[start:end].decode('utf-8')
00211       else:
00212         self.goal.frame = str[start:end]
00213       _x = self
00214       start = end
00215       end += 124
00216       (_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end])
00217       start = end
00218       end += 4
00219       (length,) = _struct_I.unpack(str[start:end])
00220       start = end
00221       end += length
00222       if python3:
00223         self.goal.topic = str[start:end].decode('utf-8')
00224       else:
00225         self.goal.topic = str[start:end]
00226       return self
00227     except struct.error as e:
00228       raise genpy.DeserializationError(e) #most likely buffer underfill
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
00239       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00240       _x = self.header.frame_id
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_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00248       _x = self.goal_id.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.goal.frame
00255       length = len(_x)
00256       if python3 or type(_x) == unicode:
00257         _x = _x.encode('utf-8')
00258         length = len(_x)
00259       buff.write(struct.pack('<I%ss'%length, length, _x))
00260       _x = self
00261       buff.write(_struct_3f14d.pack(_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w))
00262       _x = self.goal.topic
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     except struct.error as se: self._check_types(se)
00269     except TypeError as te: self._check_types(te)
00270 
00271   def deserialize_numpy(self, str, numpy):
00272     """
00273     unpack serialized message in str into this message instance using numpy for array types
00274     :param str: byte array of serialized message, ``str``
00275     :param numpy: numpy python module
00276     """
00277     try:
00278       if self.header is None:
00279         self.header = std_msgs.msg.Header()
00280       if self.goal_id is None:
00281         self.goal_id = actionlib_msgs.msg.GoalID()
00282       if self.goal is None:
00283         self.goal = turtlebot_block_manipulation.msg.PickAndPlaceGoal()
00284       end = 0
00285       _x = self
00286       start = end
00287       end += 12
00288       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end].decode('utf-8')
00296       else:
00297         self.header.frame_id = str[start:end]
00298       _x = self
00299       start = end
00300       end += 8
00301       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.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_id.id = str[start:end].decode('utf-8')
00309       else:
00310         self.goal_id.id = str[start:end]
00311       start = end
00312       end += 4
00313       (length,) = _struct_I.unpack(str[start:end])
00314       start = end
00315       end += length
00316       if python3:
00317         self.goal.frame = str[start:end].decode('utf-8')
00318       else:
00319         self.goal.frame = str[start:end]
00320       _x = self
00321       start = end
00322       end += 124
00323       (_x.goal.z_up, _x.goal.gripper_open, _x.goal.gripper_closed, _x.goal.pickup_pose.position.x, _x.goal.pickup_pose.position.y, _x.goal.pickup_pose.position.z, _x.goal.pickup_pose.orientation.x, _x.goal.pickup_pose.orientation.y, _x.goal.pickup_pose.orientation.z, _x.goal.pickup_pose.orientation.w, _x.goal.place_pose.position.x, _x.goal.place_pose.position.y, _x.goal.place_pose.position.z, _x.goal.place_pose.orientation.x, _x.goal.place_pose.orientation.y, _x.goal.place_pose.orientation.z, _x.goal.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end])
00324       start = end
00325       end += 4
00326       (length,) = _struct_I.unpack(str[start:end])
00327       start = end
00328       end += length
00329       if python3:
00330         self.goal.topic = str[start:end].decode('utf-8')
00331       else:
00332         self.goal.topic = str[start:end]
00333       return self
00334     except struct.error as e:
00335       raise genpy.DeserializationError(e) #most likely buffer underfill
00336 
00337 _struct_I = genpy.struct_I
00338 _struct_3f14d = struct.Struct("<3f14d")
00339 _struct_3I = struct.Struct("<3I")
00340 _struct_2I = struct.Struct("<2I")


turtlebot_block_manipulation
Author(s): Helen Oleynikova
autogenerated on Thu Dec 12 2013 12:33:52