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