_PickAndPlaceGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from turtlebot_block_manipulation/PickAndPlaceGoal.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 
00009 class PickAndPlaceGoal(genpy.Message):
00010   _md5sum = "406b9d2b14d3c2ad49cf6e087a7292df"
00011   _type = "turtlebot_block_manipulation/PickAndPlaceGoal"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 #goal definition
00015 string frame
00016 float32 z_up
00017 float32 gripper_open
00018 float32 gripper_closed
00019 geometry_msgs/Pose pickup_pose
00020 geometry_msgs/Pose place_pose
00021 string topic
00022 
00023 ================================================================================
00024 MSG: geometry_msgs/Pose
00025 # A representation of pose in free space, composed of postion and orientation. 
00026 Point position
00027 Quaternion orientation
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Point
00031 # This contains the position of a point in free space
00032 float64 x
00033 float64 y
00034 float64 z
00035 
00036 ================================================================================
00037 MSG: geometry_msgs/Quaternion
00038 # This represents an orientation in free space in quaternion form.
00039 
00040 float64 x
00041 float64 y
00042 float64 z
00043 float64 w
00044 
00045 """
00046   __slots__ = ['frame','z_up','gripper_open','gripper_closed','pickup_pose','place_pose','topic']
00047   _slot_types = ['string','float32','float32','float32','geometry_msgs/Pose','geometry_msgs/Pose','string']
00048 
00049   def __init__(self, *args, **kwds):
00050     """
00051     Constructor. Any message fields that are implicitly/explicitly
00052     set to None will be assigned a default value. The recommend
00053     use is keyword arguments as this is more robust to future message
00054     changes.  You cannot mix in-order arguments and keyword arguments.
00055 
00056     The available fields are:
00057        frame,z_up,gripper_open,gripper_closed,pickup_pose,place_pose,topic
00058 
00059     :param args: complete set of field values, in .msg order
00060     :param kwds: use keyword arguments corresponding to message field names
00061     to set specific fields.
00062     """
00063     if args or kwds:
00064       super(PickAndPlaceGoal, self).__init__(*args, **kwds)
00065       #message fields cannot be None, assign default values for those that are
00066       if self.frame is None:
00067         self.frame = ''
00068       if self.z_up is None:
00069         self.z_up = 0.
00070       if self.gripper_open is None:
00071         self.gripper_open = 0.
00072       if self.gripper_closed is None:
00073         self.gripper_closed = 0.
00074       if self.pickup_pose is None:
00075         self.pickup_pose = geometry_msgs.msg.Pose()
00076       if self.place_pose is None:
00077         self.place_pose = geometry_msgs.msg.Pose()
00078       if self.topic is None:
00079         self.topic = ''
00080     else:
00081       self.frame = ''
00082       self.z_up = 0.
00083       self.gripper_open = 0.
00084       self.gripper_closed = 0.
00085       self.pickup_pose = geometry_msgs.msg.Pose()
00086       self.place_pose = geometry_msgs.msg.Pose()
00087       self.topic = ''
00088 
00089   def _get_types(self):
00090     """
00091     internal API method
00092     """
00093     return self._slot_types
00094 
00095   def serialize(self, buff):
00096     """
00097     serialize message into buffer
00098     :param buff: buffer, ``StringIO``
00099     """
00100     try:
00101       _x = self.frame
00102       length = len(_x)
00103       if python3 or type(_x) == unicode:
00104         _x = _x.encode('utf-8')
00105         length = len(_x)
00106       buff.write(struct.pack('<I%ss'%length, length, _x))
00107       _x = self
00108       buff.write(_struct_3f14d.pack(_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w))
00109       _x = self.topic
00110       length = len(_x)
00111       if python3 or type(_x) == unicode:
00112         _x = _x.encode('utf-8')
00113         length = len(_x)
00114       buff.write(struct.pack('<I%ss'%length, length, _x))
00115     except struct.error as se: self._check_types(se)
00116     except TypeError as te: self._check_types(te)
00117 
00118   def deserialize(self, str):
00119     """
00120     unpack serialized message in str into this message instance
00121     :param str: byte array of serialized message, ``str``
00122     """
00123     try:
00124       if self.pickup_pose is None:
00125         self.pickup_pose = geometry_msgs.msg.Pose()
00126       if self.place_pose is None:
00127         self.place_pose = geometry_msgs.msg.Pose()
00128       end = 0
00129       start = end
00130       end += 4
00131       (length,) = _struct_I.unpack(str[start:end])
00132       start = end
00133       end += length
00134       if python3:
00135         self.frame = str[start:end].decode('utf-8')
00136       else:
00137         self.frame = str[start:end]
00138       _x = self
00139       start = end
00140       end += 124
00141       (_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w,) = _struct_3f14d.unpack(str[start:end])
00142       start = end
00143       end += 4
00144       (length,) = _struct_I.unpack(str[start:end])
00145       start = end
00146       end += length
00147       if python3:
00148         self.topic = str[start:end].decode('utf-8')
00149       else:
00150         self.topic = str[start:end]
00151       return self
00152     except struct.error as e:
00153       raise genpy.DeserializationError(e) #most likely buffer underfill
00154 
00155 
00156   def serialize_numpy(self, buff, numpy):
00157     """
00158     serialize message with numpy array types into buffer
00159     :param buff: buffer, ``StringIO``
00160     :param numpy: numpy python module
00161     """
00162     try:
00163       _x = self.frame
00164       length = len(_x)
00165       if python3 or type(_x) == unicode:
00166         _x = _x.encode('utf-8')
00167         length = len(_x)
00168       buff.write(struct.pack('<I%ss'%length, length, _x))
00169       _x = self
00170       buff.write(_struct_3f14d.pack(_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w))
00171       _x = self.topic
00172       length = len(_x)
00173       if python3 or type(_x) == unicode:
00174         _x = _x.encode('utf-8')
00175         length = len(_x)
00176       buff.write(struct.pack('<I%ss'%length, length, _x))
00177     except struct.error as se: self._check_types(se)
00178     except TypeError as te: self._check_types(te)
00179 
00180   def deserialize_numpy(self, str, numpy):
00181     """
00182     unpack serialized message in str into this message instance using numpy for array types
00183     :param str: byte array of serialized message, ``str``
00184     :param numpy: numpy python module
00185     """
00186     try:
00187       if self.pickup_pose is None:
00188         self.pickup_pose = geometry_msgs.msg.Pose()
00189       if self.place_pose is None:
00190         self.place_pose = geometry_msgs.msg.Pose()
00191       end = 0
00192       start = end
00193       end += 4
00194       (length,) = _struct_I.unpack(str[start:end])
00195       start = end
00196       end += length
00197       if python3:
00198         self.frame = str[start:end].decode('utf-8')
00199       else:
00200         self.frame = str[start:end]
00201       _x = self
00202       start = end
00203       end += 124
00204       (_x.z_up, _x.gripper_open, _x.gripper_closed, _x.pickup_pose.position.x, _x.pickup_pose.position.y, _x.pickup_pose.position.z, _x.pickup_pose.orientation.x, _x.pickup_pose.orientation.y, _x.pickup_pose.orientation.z, _x.pickup_pose.orientation.w, _x.place_pose.position.x, _x.place_pose.position.y, _x.place_pose.position.z, _x.place_pose.orientation.x, _x.place_pose.orientation.y, _x.place_pose.orientation.z, _x.place_pose.orientation.w,) = _struct_3f14d.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         self.topic = str[start:end].decode('utf-8')
00212       else:
00213         self.topic = str[start:end]
00214       return self
00215     except struct.error as e:
00216       raise genpy.DeserializationError(e) #most likely buffer underfill
00217 
00218 _struct_I = genpy.struct_I
00219 _struct_3f14d = struct.Struct("<3f14d")


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