$search
00001 """autogenerated by genmsg_py from RunScriptActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_object_manipulation_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class RunScriptActionResult(roslib.message.Message): 00011 _md5sum = "5489bcfa93e36e07a0b801f3ac4c7c97" 00012 _type = "pr2_object_manipulation_msgs/RunScriptActionResult" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalStatus status 00018 RunScriptResult result 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalStatus 00040 GoalID goal_id 00041 uint8 status 00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00045 # and has since completed its execution (Terminal State) 00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00048 # to some failure (Terminal State) 00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00050 # because the goal was unattainable or invalid (Terminal State) 00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00052 # and has not yet completed execution 00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00054 # but the action server has not yet confirmed that the goal is canceled 00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00056 # and was successfully cancelled (Terminal State) 00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00058 # sent over the wire by an action server 00059 00060 #Allow for the user to associate a string with GoalStatus for debugging 00061 string text 00062 00063 00064 ================================================================================ 00065 MSG: actionlib_msgs/GoalID 00066 # The stamp should store the time at which this goal was requested. 00067 # It is used by an action server when it tries to preempt all 00068 # goals that were requested before a certain time 00069 time stamp 00070 00071 # The id provides a way to associate feedback and 00072 # result message with specific goal requests. The id 00073 # specified must be unique. 00074 string id 00075 00076 00077 ================================================================================ 00078 MSG: pr2_object_manipulation_msgs/RunScriptResult 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 string result 00081 00082 """ 00083 __slots__ = ['header','status','result'] 00084 _slot_types = ['Header','actionlib_msgs/GoalStatus','pr2_object_manipulation_msgs/RunScriptResult'] 00085 00086 def __init__(self, *args, **kwds): 00087 """ 00088 Constructor. Any message fields that are implicitly/explicitly 00089 set to None will be assigned a default value. The recommend 00090 use is keyword arguments as this is more robust to future message 00091 changes. You cannot mix in-order arguments and keyword arguments. 00092 00093 The available fields are: 00094 header,status,result 00095 00096 @param args: complete set of field values, in .msg order 00097 @param kwds: use keyword arguments corresponding to message field names 00098 to set specific fields. 00099 """ 00100 if args or kwds: 00101 super(RunScriptActionResult, self).__init__(*args, **kwds) 00102 #message fields cannot be None, assign default values for those that are 00103 if self.header is None: 00104 self.header = std_msgs.msg._Header.Header() 00105 if self.status is None: 00106 self.status = actionlib_msgs.msg.GoalStatus() 00107 if self.result is None: 00108 self.result = pr2_object_manipulation_msgs.msg.RunScriptResult() 00109 else: 00110 self.header = std_msgs.msg._Header.Header() 00111 self.status = actionlib_msgs.msg.GoalStatus() 00112 self.result = pr2_object_manipulation_msgs.msg.RunScriptResult() 00113 00114 def _get_types(self): 00115 """ 00116 internal API method 00117 """ 00118 return self._slot_types 00119 00120 def serialize(self, buff): 00121 """ 00122 serialize message into buffer 00123 @param buff: buffer 00124 @type buff: StringIO 00125 """ 00126 try: 00127 _x = self 00128 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00129 _x = self.header.frame_id 00130 length = len(_x) 00131 buff.write(struct.pack('<I%ss'%length, length, _x)) 00132 _x = self 00133 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00134 _x = self.status.goal_id.id 00135 length = len(_x) 00136 buff.write(struct.pack('<I%ss'%length, length, _x)) 00137 buff.write(_struct_B.pack(self.status.status)) 00138 _x = self.status.text 00139 length = len(_x) 00140 buff.write(struct.pack('<I%ss'%length, length, _x)) 00141 _x = self.result.result 00142 length = len(_x) 00143 buff.write(struct.pack('<I%ss'%length, length, _x)) 00144 except struct.error as se: self._check_types(se) 00145 except TypeError as te: self._check_types(te) 00146 00147 def deserialize(self, str): 00148 """ 00149 unpack serialized message in str into this message instance 00150 @param str: byte array of serialized message 00151 @type str: str 00152 """ 00153 try: 00154 if self.header is None: 00155 self.header = std_msgs.msg._Header.Header() 00156 if self.status is None: 00157 self.status = actionlib_msgs.msg.GoalStatus() 00158 if self.result is None: 00159 self.result = pr2_object_manipulation_msgs.msg.RunScriptResult() 00160 end = 0 00161 _x = self 00162 start = end 00163 end += 12 00164 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00165 start = end 00166 end += 4 00167 (length,) = _struct_I.unpack(str[start:end]) 00168 start = end 00169 end += length 00170 self.header.frame_id = str[start:end] 00171 _x = self 00172 start = end 00173 end += 8 00174 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 start = end 00179 end += length 00180 self.status.goal_id.id = str[start:end] 00181 start = end 00182 end += 1 00183 (self.status.status,) = _struct_B.unpack(str[start:end]) 00184 start = end 00185 end += 4 00186 (length,) = _struct_I.unpack(str[start:end]) 00187 start = end 00188 end += length 00189 self.status.text = str[start:end] 00190 start = end 00191 end += 4 00192 (length,) = _struct_I.unpack(str[start:end]) 00193 start = end 00194 end += length 00195 self.result.result = str[start:end] 00196 return self 00197 except struct.error as e: 00198 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00199 00200 00201 def serialize_numpy(self, buff, numpy): 00202 """ 00203 serialize message with numpy array types into buffer 00204 @param buff: buffer 00205 @type buff: StringIO 00206 @param numpy: numpy python module 00207 @type numpy module 00208 """ 00209 try: 00210 _x = self 00211 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00212 _x = self.header.frame_id 00213 length = len(_x) 00214 buff.write(struct.pack('<I%ss'%length, length, _x)) 00215 _x = self 00216 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00217 _x = self.status.goal_id.id 00218 length = len(_x) 00219 buff.write(struct.pack('<I%ss'%length, length, _x)) 00220 buff.write(_struct_B.pack(self.status.status)) 00221 _x = self.status.text 00222 length = len(_x) 00223 buff.write(struct.pack('<I%ss'%length, length, _x)) 00224 _x = self.result.result 00225 length = len(_x) 00226 buff.write(struct.pack('<I%ss'%length, length, _x)) 00227 except struct.error as se: self._check_types(se) 00228 except TypeError as te: self._check_types(te) 00229 00230 def deserialize_numpy(self, str, numpy): 00231 """ 00232 unpack serialized message in str into this message instance using numpy for array types 00233 @param str: byte array of serialized message 00234 @type str: str 00235 @param numpy: numpy python module 00236 @type numpy: module 00237 """ 00238 try: 00239 if self.header is None: 00240 self.header = std_msgs.msg._Header.Header() 00241 if self.status is None: 00242 self.status = actionlib_msgs.msg.GoalStatus() 00243 if self.result is None: 00244 self.result = pr2_object_manipulation_msgs.msg.RunScriptResult() 00245 end = 0 00246 _x = self 00247 start = end 00248 end += 12 00249 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 start = end 00254 end += length 00255 self.header.frame_id = str[start:end] 00256 _x = self 00257 start = end 00258 end += 8 00259 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00260 start = end 00261 end += 4 00262 (length,) = _struct_I.unpack(str[start:end]) 00263 start = end 00264 end += length 00265 self.status.goal_id.id = str[start:end] 00266 start = end 00267 end += 1 00268 (self.status.status,) = _struct_B.unpack(str[start:end]) 00269 start = end 00270 end += 4 00271 (length,) = _struct_I.unpack(str[start:end]) 00272 start = end 00273 end += length 00274 self.status.text = str[start:end] 00275 start = end 00276 end += 4 00277 (length,) = _struct_I.unpack(str[start:end]) 00278 start = end 00279 end += length 00280 self.result.result = str[start:end] 00281 return self 00282 except struct.error as e: 00283 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00284 00285 _struct_I = roslib.message.struct_I 00286 _struct_3I = struct.Struct("<3I") 00287 _struct_B = struct.Struct("<B") 00288 _struct_2I = struct.Struct("<2I")