$search
00001 """autogenerated by genmsg_py from RunScriptGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class RunScriptGoal(roslib.message.Message): 00007 _md5sum = "62bc577426e782a6d2e08ca1e2bc3426" 00008 _type = "pr2_object_manipulation_msgs/RunScriptGoal" 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 string action_name 00012 string group_name 00013 00014 """ 00015 __slots__ = ['action_name','group_name'] 00016 _slot_types = ['string','string'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 action_name,group_name 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(RunScriptGoal, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.action_name is None: 00036 self.action_name = '' 00037 if self.group_name is None: 00038 self.group_name = '' 00039 else: 00040 self.action_name = '' 00041 self.group_name = '' 00042 00043 def _get_types(self): 00044 """ 00045 internal API method 00046 """ 00047 return self._slot_types 00048 00049 def serialize(self, buff): 00050 """ 00051 serialize message into buffer 00052 @param buff: buffer 00053 @type buff: StringIO 00054 """ 00055 try: 00056 _x = self.action_name 00057 length = len(_x) 00058 buff.write(struct.pack('<I%ss'%length, length, _x)) 00059 _x = self.group_name 00060 length = len(_x) 00061 buff.write(struct.pack('<I%ss'%length, length, _x)) 00062 except struct.error as se: self._check_types(se) 00063 except TypeError as te: self._check_types(te) 00064 00065 def deserialize(self, str): 00066 """ 00067 unpack serialized message in str into this message instance 00068 @param str: byte array of serialized message 00069 @type str: str 00070 """ 00071 try: 00072 end = 0 00073 start = end 00074 end += 4 00075 (length,) = _struct_I.unpack(str[start:end]) 00076 start = end 00077 end += length 00078 self.action_name = str[start:end] 00079 start = end 00080 end += 4 00081 (length,) = _struct_I.unpack(str[start:end]) 00082 start = end 00083 end += length 00084 self.group_name = str[start:end] 00085 return self 00086 except struct.error as e: 00087 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00088 00089 00090 def serialize_numpy(self, buff, numpy): 00091 """ 00092 serialize message with numpy array types into buffer 00093 @param buff: buffer 00094 @type buff: StringIO 00095 @param numpy: numpy python module 00096 @type numpy module 00097 """ 00098 try: 00099 _x = self.action_name 00100 length = len(_x) 00101 buff.write(struct.pack('<I%ss'%length, length, _x)) 00102 _x = self.group_name 00103 length = len(_x) 00104 buff.write(struct.pack('<I%ss'%length, length, _x)) 00105 except struct.error as se: self._check_types(se) 00106 except TypeError as te: self._check_types(te) 00107 00108 def deserialize_numpy(self, str, numpy): 00109 """ 00110 unpack serialized message in str into this message instance using numpy for array types 00111 @param str: byte array of serialized message 00112 @type str: str 00113 @param numpy: numpy python module 00114 @type numpy: module 00115 """ 00116 try: 00117 end = 0 00118 start = end 00119 end += 4 00120 (length,) = _struct_I.unpack(str[start:end]) 00121 start = end 00122 end += length 00123 self.action_name = str[start:end] 00124 start = end 00125 end += 4 00126 (length,) = _struct_I.unpack(str[start:end]) 00127 start = end 00128 end += length 00129 self.group_name = str[start:end] 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