_MoveAction.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_knowledge/MoveAction.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 MoveAction(genpy.Message):
00010   _md5sum = "ff89e1acfb05cc083ae6d59fe1ff3ffd"
00011   _type = "srs_knowledge/MoveAction"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# dim: dimension 2D or 3D or -1 (no move command.)
00014 int32 dim
00015 
00016 # Target Pose
00017 # geometry_msgs/Pose targetPose3D
00018 geometry_msgs/Pose2D targetPose2D
00019 
00020 # Wait for object taken from tray at target or not
00021 bool ifWaitObjectTaken
00022 
00023 
00024 ================================================================================
00025 MSG: geometry_msgs/Pose2D
00026 # This expresses a position and orientation on a 2D manifold.
00027 
00028 float64 x
00029 float64 y
00030 float64 theta
00031 """
00032   __slots__ = ['dim','targetPose2D','ifWaitObjectTaken']
00033   _slot_types = ['int32','geometry_msgs/Pose2D','bool']
00034 
00035   def __init__(self, *args, **kwds):
00036     """
00037     Constructor. Any message fields that are implicitly/explicitly
00038     set to None will be assigned a default value. The recommend
00039     use is keyword arguments as this is more robust to future message
00040     changes.  You cannot mix in-order arguments and keyword arguments.
00041 
00042     The available fields are:
00043        dim,targetPose2D,ifWaitObjectTaken
00044 
00045     :param args: complete set of field values, in .msg order
00046     :param kwds: use keyword arguments corresponding to message field names
00047     to set specific fields.
00048     """
00049     if args or kwds:
00050       super(MoveAction, self).__init__(*args, **kwds)
00051       #message fields cannot be None, assign default values for those that are
00052       if self.dim is None:
00053         self.dim = 0
00054       if self.targetPose2D is None:
00055         self.targetPose2D = geometry_msgs.msg.Pose2D()
00056       if self.ifWaitObjectTaken is None:
00057         self.ifWaitObjectTaken = False
00058     else:
00059       self.dim = 0
00060       self.targetPose2D = geometry_msgs.msg.Pose2D()
00061       self.ifWaitObjectTaken = False
00062 
00063   def _get_types(self):
00064     """
00065     internal API method
00066     """
00067     return self._slot_types
00068 
00069   def serialize(self, buff):
00070     """
00071     serialize message into buffer
00072     :param buff: buffer, ``StringIO``
00073     """
00074     try:
00075       _x = self
00076       buff.write(_struct_i3dB.pack(_x.dim, _x.targetPose2D.x, _x.targetPose2D.y, _x.targetPose2D.theta, _x.ifWaitObjectTaken))
00077     except struct.error as se: self._check_types(se)
00078     except TypeError as te: self._check_types(te)
00079 
00080   def deserialize(self, str):
00081     """
00082     unpack serialized message in str into this message instance
00083     :param str: byte array of serialized message, ``str``
00084     """
00085     try:
00086       if self.targetPose2D is None:
00087         self.targetPose2D = geometry_msgs.msg.Pose2D()
00088       end = 0
00089       _x = self
00090       start = end
00091       end += 29
00092       (_x.dim, _x.targetPose2D.x, _x.targetPose2D.y, _x.targetPose2D.theta, _x.ifWaitObjectTaken,) = _struct_i3dB.unpack(str[start:end])
00093       self.ifWaitObjectTaken = bool(self.ifWaitObjectTaken)
00094       return self
00095     except struct.error as e:
00096       raise genpy.DeserializationError(e) #most likely buffer underfill
00097 
00098 
00099   def serialize_numpy(self, buff, numpy):
00100     """
00101     serialize message with numpy array types into buffer
00102     :param buff: buffer, ``StringIO``
00103     :param numpy: numpy python module
00104     """
00105     try:
00106       _x = self
00107       buff.write(_struct_i3dB.pack(_x.dim, _x.targetPose2D.x, _x.targetPose2D.y, _x.targetPose2D.theta, _x.ifWaitObjectTaken))
00108     except struct.error as se: self._check_types(se)
00109     except TypeError as te: self._check_types(te)
00110 
00111   def deserialize_numpy(self, str, numpy):
00112     """
00113     unpack serialized message in str into this message instance using numpy for array types
00114     :param str: byte array of serialized message, ``str``
00115     :param numpy: numpy python module
00116     """
00117     try:
00118       if self.targetPose2D is None:
00119         self.targetPose2D = geometry_msgs.msg.Pose2D()
00120       end = 0
00121       _x = self
00122       start = end
00123       end += 29
00124       (_x.dim, _x.targetPose2D.x, _x.targetPose2D.y, _x.targetPose2D.theta, _x.ifWaitObjectTaken,) = _struct_i3dB.unpack(str[start:end])
00125       self.ifWaitObjectTaken = bool(self.ifWaitObjectTaken)
00126       return self
00127     except struct.error as e:
00128       raise genpy.DeserializationError(e) #most likely buffer underfill
00129 
00130 _struct_I = genpy.struct_I
00131 _struct_i3dB = struct.Struct("<i3dB")


srs_knowledge
Author(s): Ze Ji
autogenerated on Sun Jan 5 2014 12:03:27