$search
00001 """autogenerated by genmsg_py from ManualArmManipActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import srs_assisted_arm_navigation_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class ManualArmManipActionResult(roslib.message.Message): 00011 _md5sum = "4e5456f9a8df2799c643cd1d659ccef4" 00012 _type = "srs_assisted_arm_navigation_msgs/ManualArmManipActionResult" 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 ManualArmManipResult 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: srs_assisted_arm_navigation_msgs/ManualArmManipResult 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 # result 00081 bool success 00082 bool failed 00083 bool repeat 00084 bool timeout 00085 bool collision 00086 duration time_elapsed 00087 00088 """ 00089 __slots__ = ['header','status','result'] 00090 _slot_types = ['Header','actionlib_msgs/GoalStatus','srs_assisted_arm_navigation_msgs/ManualArmManipResult'] 00091 00092 def __init__(self, *args, **kwds): 00093 """ 00094 Constructor. Any message fields that are implicitly/explicitly 00095 set to None will be assigned a default value. The recommend 00096 use is keyword arguments as this is more robust to future message 00097 changes. You cannot mix in-order arguments and keyword arguments. 00098 00099 The available fields are: 00100 header,status,result 00101 00102 @param args: complete set of field values, in .msg order 00103 @param kwds: use keyword arguments corresponding to message field names 00104 to set specific fields. 00105 """ 00106 if args or kwds: 00107 super(ManualArmManipActionResult, self).__init__(*args, **kwds) 00108 #message fields cannot be None, assign default values for those that are 00109 if self.header is None: 00110 self.header = std_msgs.msg._Header.Header() 00111 if self.status is None: 00112 self.status = actionlib_msgs.msg.GoalStatus() 00113 if self.result is None: 00114 self.result = srs_assisted_arm_navigation_msgs.msg.ManualArmManipResult() 00115 else: 00116 self.header = std_msgs.msg._Header.Header() 00117 self.status = actionlib_msgs.msg.GoalStatus() 00118 self.result = srs_assisted_arm_navigation_msgs.msg.ManualArmManipResult() 00119 00120 def _get_types(self): 00121 """ 00122 internal API method 00123 """ 00124 return self._slot_types 00125 00126 def serialize(self, buff): 00127 """ 00128 serialize message into buffer 00129 @param buff: buffer 00130 @type buff: StringIO 00131 """ 00132 try: 00133 _x = self 00134 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00135 _x = self.header.frame_id 00136 length = len(_x) 00137 buff.write(struct.pack('<I%ss'%length, length, _x)) 00138 _x = self 00139 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00140 _x = self.status.goal_id.id 00141 length = len(_x) 00142 buff.write(struct.pack('<I%ss'%length, length, _x)) 00143 buff.write(_struct_B.pack(self.status.status)) 00144 _x = self.status.text 00145 length = len(_x) 00146 buff.write(struct.pack('<I%ss'%length, length, _x)) 00147 _x = self 00148 buff.write(_struct_5B2i.pack(_x.result.success, _x.result.failed, _x.result.repeat, _x.result.timeout, _x.result.collision, _x.result.time_elapsed.secs, _x.result.time_elapsed.nsecs)) 00149 except struct.error as se: self._check_types(se) 00150 except TypeError as te: self._check_types(te) 00151 00152 def deserialize(self, str): 00153 """ 00154 unpack serialized message in str into this message instance 00155 @param str: byte array of serialized message 00156 @type str: str 00157 """ 00158 try: 00159 if self.header is None: 00160 self.header = std_msgs.msg._Header.Header() 00161 if self.status is None: 00162 self.status = actionlib_msgs.msg.GoalStatus() 00163 if self.result is None: 00164 self.result = srs_assisted_arm_navigation_msgs.msg.ManualArmManipResult() 00165 end = 0 00166 _x = self 00167 start = end 00168 end += 12 00169 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00170 start = end 00171 end += 4 00172 (length,) = _struct_I.unpack(str[start:end]) 00173 start = end 00174 end += length 00175 self.header.frame_id = str[start:end] 00176 _x = self 00177 start = end 00178 end += 8 00179 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00180 start = end 00181 end += 4 00182 (length,) = _struct_I.unpack(str[start:end]) 00183 start = end 00184 end += length 00185 self.status.goal_id.id = str[start:end] 00186 start = end 00187 end += 1 00188 (self.status.status,) = _struct_B.unpack(str[start:end]) 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 start = end 00193 end += length 00194 self.status.text = str[start:end] 00195 _x = self 00196 start = end 00197 end += 13 00198 (_x.result.success, _x.result.failed, _x.result.repeat, _x.result.timeout, _x.result.collision, _x.result.time_elapsed.secs, _x.result.time_elapsed.nsecs,) = _struct_5B2i.unpack(str[start:end]) 00199 self.result.success = bool(self.result.success) 00200 self.result.failed = bool(self.result.failed) 00201 self.result.repeat = bool(self.result.repeat) 00202 self.result.timeout = bool(self.result.timeout) 00203 self.result.collision = bool(self.result.collision) 00204 return self 00205 except struct.error as e: 00206 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00207 00208 00209 def serialize_numpy(self, buff, numpy): 00210 """ 00211 serialize message with numpy array types into buffer 00212 @param buff: buffer 00213 @type buff: StringIO 00214 @param numpy: numpy python module 00215 @type numpy module 00216 """ 00217 try: 00218 _x = self 00219 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00220 _x = self.header.frame_id 00221 length = len(_x) 00222 buff.write(struct.pack('<I%ss'%length, length, _x)) 00223 _x = self 00224 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00225 _x = self.status.goal_id.id 00226 length = len(_x) 00227 buff.write(struct.pack('<I%ss'%length, length, _x)) 00228 buff.write(_struct_B.pack(self.status.status)) 00229 _x = self.status.text 00230 length = len(_x) 00231 buff.write(struct.pack('<I%ss'%length, length, _x)) 00232 _x = self 00233 buff.write(_struct_5B2i.pack(_x.result.success, _x.result.failed, _x.result.repeat, _x.result.timeout, _x.result.collision, _x.result.time_elapsed.secs, _x.result.time_elapsed.nsecs)) 00234 except struct.error as se: self._check_types(se) 00235 except TypeError as te: self._check_types(te) 00236 00237 def deserialize_numpy(self, str, numpy): 00238 """ 00239 unpack serialized message in str into this message instance using numpy for array types 00240 @param str: byte array of serialized message 00241 @type str: str 00242 @param numpy: numpy python module 00243 @type numpy: module 00244 """ 00245 try: 00246 if self.header is None: 00247 self.header = std_msgs.msg._Header.Header() 00248 if self.status is None: 00249 self.status = actionlib_msgs.msg.GoalStatus() 00250 if self.result is None: 00251 self.result = srs_assisted_arm_navigation_msgs.msg.ManualArmManipResult() 00252 end = 0 00253 _x = self 00254 start = end 00255 end += 12 00256 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00257 start = end 00258 end += 4 00259 (length,) = _struct_I.unpack(str[start:end]) 00260 start = end 00261 end += length 00262 self.header.frame_id = str[start:end] 00263 _x = self 00264 start = end 00265 end += 8 00266 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00267 start = end 00268 end += 4 00269 (length,) = _struct_I.unpack(str[start:end]) 00270 start = end 00271 end += length 00272 self.status.goal_id.id = str[start:end] 00273 start = end 00274 end += 1 00275 (self.status.status,) = _struct_B.unpack(str[start:end]) 00276 start = end 00277 end += 4 00278 (length,) = _struct_I.unpack(str[start:end]) 00279 start = end 00280 end += length 00281 self.status.text = str[start:end] 00282 _x = self 00283 start = end 00284 end += 13 00285 (_x.result.success, _x.result.failed, _x.result.repeat, _x.result.timeout, _x.result.collision, _x.result.time_elapsed.secs, _x.result.time_elapsed.nsecs,) = _struct_5B2i.unpack(str[start:end]) 00286 self.result.success = bool(self.result.success) 00287 self.result.failed = bool(self.result.failed) 00288 self.result.repeat = bool(self.result.repeat) 00289 self.result.timeout = bool(self.result.timeout) 00290 self.result.collision = bool(self.result.collision) 00291 return self 00292 except struct.error as e: 00293 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00294 00295 _struct_I = roslib.message.struct_I 00296 _struct_3I = struct.Struct("<3I") 00297 _struct_B = struct.Struct("<B") 00298 _struct_5B2i = struct.Struct("<5B2i") 00299 _struct_2I = struct.Struct("<2I")