$search
00001 """autogenerated by genmsg_py from ManualArmManipGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ManualArmManipGoal(roslib.message.Message): 00007 _md5sum = "f3a15b9c9a2e4fccc9f9cf1224d8b54d" 00008 _type = "srs_assisted_arm_navigation_msgs/ManualArmManipGoal" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 # goal 00012 string action # description what to do 00013 string post_action # string which will be displayed after user finished task 00014 bool allow_repeat 00015 string object_name 00016 00017 """ 00018 __slots__ = ['action','post_action','allow_repeat','object_name'] 00019 _slot_types = ['string','string','bool','string'] 00020 00021 def __init__(self, *args, **kwds): 00022 """ 00023 Constructor. Any message fields that are implicitly/explicitly 00024 set to None will be assigned a default value. The recommend 00025 use is keyword arguments as this is more robust to future message 00026 changes. You cannot mix in-order arguments and keyword arguments. 00027 00028 The available fields are: 00029 action,post_action,allow_repeat,object_name 00030 00031 @param args: complete set of field values, in .msg order 00032 @param kwds: use keyword arguments corresponding to message field names 00033 to set specific fields. 00034 """ 00035 if args or kwds: 00036 super(ManualArmManipGoal, self).__init__(*args, **kwds) 00037 #message fields cannot be None, assign default values for those that are 00038 if self.action is None: 00039 self.action = '' 00040 if self.post_action is None: 00041 self.post_action = '' 00042 if self.allow_repeat is None: 00043 self.allow_repeat = False 00044 if self.object_name is None: 00045 self.object_name = '' 00046 else: 00047 self.action = '' 00048 self.post_action = '' 00049 self.allow_repeat = False 00050 self.object_name = '' 00051 00052 def _get_types(self): 00053 """ 00054 internal API method 00055 """ 00056 return self._slot_types 00057 00058 def serialize(self, buff): 00059 """ 00060 serialize message into buffer 00061 @param buff: buffer 00062 @type buff: StringIO 00063 """ 00064 try: 00065 _x = self.action 00066 length = len(_x) 00067 buff.write(struct.pack('<I%ss'%length, length, _x)) 00068 _x = self.post_action 00069 length = len(_x) 00070 buff.write(struct.pack('<I%ss'%length, length, _x)) 00071 buff.write(_struct_B.pack(self.allow_repeat)) 00072 _x = self.object_name 00073 length = len(_x) 00074 buff.write(struct.pack('<I%ss'%length, length, _x)) 00075 except struct.error as se: self._check_types(se) 00076 except TypeError as te: self._check_types(te) 00077 00078 def deserialize(self, str): 00079 """ 00080 unpack serialized message in str into this message instance 00081 @param str: byte array of serialized message 00082 @type str: str 00083 """ 00084 try: 00085 end = 0 00086 start = end 00087 end += 4 00088 (length,) = _struct_I.unpack(str[start:end]) 00089 start = end 00090 end += length 00091 self.action = str[start:end] 00092 start = end 00093 end += 4 00094 (length,) = _struct_I.unpack(str[start:end]) 00095 start = end 00096 end += length 00097 self.post_action = str[start:end] 00098 start = end 00099 end += 1 00100 (self.allow_repeat,) = _struct_B.unpack(str[start:end]) 00101 self.allow_repeat = bool(self.allow_repeat) 00102 start = end 00103 end += 4 00104 (length,) = _struct_I.unpack(str[start:end]) 00105 start = end 00106 end += length 00107 self.object_name = str[start:end] 00108 return self 00109 except struct.error as e: 00110 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00111 00112 00113 def serialize_numpy(self, buff, numpy): 00114 """ 00115 serialize message with numpy array types into buffer 00116 @param buff: buffer 00117 @type buff: StringIO 00118 @param numpy: numpy python module 00119 @type numpy module 00120 """ 00121 try: 00122 _x = self.action 00123 length = len(_x) 00124 buff.write(struct.pack('<I%ss'%length, length, _x)) 00125 _x = self.post_action 00126 length = len(_x) 00127 buff.write(struct.pack('<I%ss'%length, length, _x)) 00128 buff.write(_struct_B.pack(self.allow_repeat)) 00129 _x = self.object_name 00130 length = len(_x) 00131 buff.write(struct.pack('<I%ss'%length, length, _x)) 00132 except struct.error as se: self._check_types(se) 00133 except TypeError as te: self._check_types(te) 00134 00135 def deserialize_numpy(self, str, numpy): 00136 """ 00137 unpack serialized message in str into this message instance using numpy for array types 00138 @param str: byte array of serialized message 00139 @type str: str 00140 @param numpy: numpy python module 00141 @type numpy: module 00142 """ 00143 try: 00144 end = 0 00145 start = end 00146 end += 4 00147 (length,) = _struct_I.unpack(str[start:end]) 00148 start = end 00149 end += length 00150 self.action = str[start:end] 00151 start = end 00152 end += 4 00153 (length,) = _struct_I.unpack(str[start:end]) 00154 start = end 00155 end += length 00156 self.post_action = str[start:end] 00157 start = end 00158 end += 1 00159 (self.allow_repeat,) = _struct_B.unpack(str[start:end]) 00160 self.allow_repeat = bool(self.allow_repeat) 00161 start = end 00162 end += 4 00163 (length,) = _struct_I.unpack(str[start:end]) 00164 start = end 00165 end += length 00166 self.object_name = str[start:end] 00167 return self 00168 except struct.error as e: 00169 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00170 00171 _struct_I = roslib.message.struct_I 00172 _struct_B = struct.Struct("<B")