$search
00001 """autogenerated by genmsg_py from ArmHandActionResult.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import cogman_msgs.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import vision_msgs.msg 00009 import std_msgs.msg 00010 00011 class ArmHandActionResult(roslib.message.Message): 00012 _md5sum = "26b3a465a08de176dd678232ecbf4c1e" 00013 _type = "cogman_msgs/ArmHandActionResult" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalStatus status 00019 ArmHandResult result 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalStatus 00041 GoalID goal_id 00042 uint8 status 00043 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00044 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00045 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00046 # and has since completed its execution (Terminal State) 00047 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00048 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00049 # to some failure (Terminal State) 00050 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00051 # because the goal was unattainable or invalid (Terminal State) 00052 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00053 # and has not yet completed execution 00054 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00055 # but the action server has not yet confirmed that the goal is canceled 00056 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00057 # and was successfully cancelled (Terminal State) 00058 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00059 # sent over the wire by an action server 00060 00061 #Allow for the user to associate a string with GoalStatus for debugging 00062 string text 00063 00064 00065 ================================================================================ 00066 MSG: actionlib_msgs/GoalID 00067 # The stamp should store the time at which this goal was requested. 00068 # It is used by an action server when it tries to preempt all 00069 # goals that were requested before a certain time 00070 time stamp 00071 00072 # The id provides a way to associate feedback and 00073 # result message with specific goal requests. The id 00074 # specified must be unique. 00075 string id 00076 00077 00078 ================================================================================ 00079 MSG: cogman_msgs/ArmHandResult 00080 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00081 00082 #result 00083 float32 distance_to_goal 00084 string situation #Allowed: grasped slipped released unreachable ik_deadlock need_to_move_base 00085 vision_msgs/system_error error #Description of error 00086 uint64[] better_base_ids #List of lo_id's where we could grasp better 00087 00088 ================================================================================ 00089 MSG: vision_msgs/system_error 00090 uint64 MANIPULATION_POSE_UNREACHABLE = 64 00091 uint64 GRASP_FAILED = 128 # Grasp into the void 00092 uint64 OBJECT_NOT_FOUND = 256 00093 uint64 VISION_PRIMITIVE_FAILED = 512 00094 uint64 CONTRADICTING_TACTILE_FEEDBACK = 1024 # Collide without expecting it 00095 uint64 CONTRADICTING_VISION_RESULTS = 2048 00096 uint64 GRASP_FAILED_AND_CRASHED = 4096 # Throwing something out of the way 00097 uint64 JLO_ERROR = 8192 # Could not get position 00098 uint64 VECTOR_FIELD_CANT_REACH = 16384 # The arm got stuck along the way, did not reach the final grasping pose 00099 00100 uint64 error_id # One of the error constants defined above 00101 string node_name # The node causing this error 00102 string error_description # Further information about the error 00103 00104 """ 00105 __slots__ = ['header','status','result'] 00106 _slot_types = ['Header','actionlib_msgs/GoalStatus','cogman_msgs/ArmHandResult'] 00107 00108 def __init__(self, *args, **kwds): 00109 """ 00110 Constructor. Any message fields that are implicitly/explicitly 00111 set to None will be assigned a default value. The recommend 00112 use is keyword arguments as this is more robust to future message 00113 changes. You cannot mix in-order arguments and keyword arguments. 00114 00115 The available fields are: 00116 header,status,result 00117 00118 @param args: complete set of field values, in .msg order 00119 @param kwds: use keyword arguments corresponding to message field names 00120 to set specific fields. 00121 """ 00122 if args or kwds: 00123 super(ArmHandActionResult, self).__init__(*args, **kwds) 00124 #message fields cannot be None, assign default values for those that are 00125 if self.header is None: 00126 self.header = std_msgs.msg._Header.Header() 00127 if self.status is None: 00128 self.status = actionlib_msgs.msg.GoalStatus() 00129 if self.result is None: 00130 self.result = cogman_msgs.msg.ArmHandResult() 00131 else: 00132 self.header = std_msgs.msg._Header.Header() 00133 self.status = actionlib_msgs.msg.GoalStatus() 00134 self.result = cogman_msgs.msg.ArmHandResult() 00135 00136 def _get_types(self): 00137 """ 00138 internal API method 00139 """ 00140 return self._slot_types 00141 00142 def serialize(self, buff): 00143 """ 00144 serialize message into buffer 00145 @param buff: buffer 00146 @type buff: StringIO 00147 """ 00148 try: 00149 _x = self 00150 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00151 _x = self.header.frame_id 00152 length = len(_x) 00153 buff.write(struct.pack('<I%ss'%length, length, _x)) 00154 _x = self 00155 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00156 _x = self.status.goal_id.id 00157 length = len(_x) 00158 buff.write(struct.pack('<I%ss'%length, length, _x)) 00159 buff.write(_struct_B.pack(self.status.status)) 00160 _x = self.status.text 00161 length = len(_x) 00162 buff.write(struct.pack('<I%ss'%length, length, _x)) 00163 buff.write(_struct_f.pack(self.result.distance_to_goal)) 00164 _x = self.result.situation 00165 length = len(_x) 00166 buff.write(struct.pack('<I%ss'%length, length, _x)) 00167 buff.write(_struct_Q.pack(self.result.error.error_id)) 00168 _x = self.result.error.node_name 00169 length = len(_x) 00170 buff.write(struct.pack('<I%ss'%length, length, _x)) 00171 _x = self.result.error.error_description 00172 length = len(_x) 00173 buff.write(struct.pack('<I%ss'%length, length, _x)) 00174 length = len(self.result.better_base_ids) 00175 buff.write(_struct_I.pack(length)) 00176 pattern = '<%sQ'%length 00177 buff.write(struct.pack(pattern, *self.result.better_base_ids)) 00178 except struct.error as se: self._check_types(se) 00179 except TypeError as te: self._check_types(te) 00180 00181 def deserialize(self, str): 00182 """ 00183 unpack serialized message in str into this message instance 00184 @param str: byte array of serialized message 00185 @type str: str 00186 """ 00187 try: 00188 if self.header is None: 00189 self.header = std_msgs.msg._Header.Header() 00190 if self.status is None: 00191 self.status = actionlib_msgs.msg.GoalStatus() 00192 if self.result is None: 00193 self.result = cogman_msgs.msg.ArmHandResult() 00194 end = 0 00195 _x = self 00196 start = end 00197 end += 12 00198 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00199 start = end 00200 end += 4 00201 (length,) = _struct_I.unpack(str[start:end]) 00202 start = end 00203 end += length 00204 self.header.frame_id = str[start:end] 00205 _x = self 00206 start = end 00207 end += 8 00208 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00209 start = end 00210 end += 4 00211 (length,) = _struct_I.unpack(str[start:end]) 00212 start = end 00213 end += length 00214 self.status.goal_id.id = str[start:end] 00215 start = end 00216 end += 1 00217 (self.status.status,) = _struct_B.unpack(str[start:end]) 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 start = end 00222 end += length 00223 self.status.text = str[start:end] 00224 start = end 00225 end += 4 00226 (self.result.distance_to_goal,) = _struct_f.unpack(str[start:end]) 00227 start = end 00228 end += 4 00229 (length,) = _struct_I.unpack(str[start:end]) 00230 start = end 00231 end += length 00232 self.result.situation = str[start:end] 00233 start = end 00234 end += 8 00235 (self.result.error.error_id,) = _struct_Q.unpack(str[start:end]) 00236 start = end 00237 end += 4 00238 (length,) = _struct_I.unpack(str[start:end]) 00239 start = end 00240 end += length 00241 self.result.error.node_name = str[start:end] 00242 start = end 00243 end += 4 00244 (length,) = _struct_I.unpack(str[start:end]) 00245 start = end 00246 end += length 00247 self.result.error.error_description = str[start:end] 00248 start = end 00249 end += 4 00250 (length,) = _struct_I.unpack(str[start:end]) 00251 pattern = '<%sQ'%length 00252 start = end 00253 end += struct.calcsize(pattern) 00254 self.result.better_base_ids = struct.unpack(pattern, str[start:end]) 00255 return self 00256 except struct.error as e: 00257 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00258 00259 00260 def serialize_numpy(self, buff, numpy): 00261 """ 00262 serialize message with numpy array types into buffer 00263 @param buff: buffer 00264 @type buff: StringIO 00265 @param numpy: numpy python module 00266 @type numpy module 00267 """ 00268 try: 00269 _x = self 00270 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00271 _x = self.header.frame_id 00272 length = len(_x) 00273 buff.write(struct.pack('<I%ss'%length, length, _x)) 00274 _x = self 00275 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00276 _x = self.status.goal_id.id 00277 length = len(_x) 00278 buff.write(struct.pack('<I%ss'%length, length, _x)) 00279 buff.write(_struct_B.pack(self.status.status)) 00280 _x = self.status.text 00281 length = len(_x) 00282 buff.write(struct.pack('<I%ss'%length, length, _x)) 00283 buff.write(_struct_f.pack(self.result.distance_to_goal)) 00284 _x = self.result.situation 00285 length = len(_x) 00286 buff.write(struct.pack('<I%ss'%length, length, _x)) 00287 buff.write(_struct_Q.pack(self.result.error.error_id)) 00288 _x = self.result.error.node_name 00289 length = len(_x) 00290 buff.write(struct.pack('<I%ss'%length, length, _x)) 00291 _x = self.result.error.error_description 00292 length = len(_x) 00293 buff.write(struct.pack('<I%ss'%length, length, _x)) 00294 length = len(self.result.better_base_ids) 00295 buff.write(_struct_I.pack(length)) 00296 pattern = '<%sQ'%length 00297 buff.write(self.result.better_base_ids.tostring()) 00298 except struct.error as se: self._check_types(se) 00299 except TypeError as te: self._check_types(te) 00300 00301 def deserialize_numpy(self, str, numpy): 00302 """ 00303 unpack serialized message in str into this message instance using numpy for array types 00304 @param str: byte array of serialized message 00305 @type str: str 00306 @param numpy: numpy python module 00307 @type numpy: module 00308 """ 00309 try: 00310 if self.header is None: 00311 self.header = std_msgs.msg._Header.Header() 00312 if self.status is None: 00313 self.status = actionlib_msgs.msg.GoalStatus() 00314 if self.result is None: 00315 self.result = cogman_msgs.msg.ArmHandResult() 00316 end = 0 00317 _x = self 00318 start = end 00319 end += 12 00320 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00321 start = end 00322 end += 4 00323 (length,) = _struct_I.unpack(str[start:end]) 00324 start = end 00325 end += length 00326 self.header.frame_id = str[start:end] 00327 _x = self 00328 start = end 00329 end += 8 00330 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00331 start = end 00332 end += 4 00333 (length,) = _struct_I.unpack(str[start:end]) 00334 start = end 00335 end += length 00336 self.status.goal_id.id = str[start:end] 00337 start = end 00338 end += 1 00339 (self.status.status,) = _struct_B.unpack(str[start:end]) 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 start = end 00344 end += length 00345 self.status.text = str[start:end] 00346 start = end 00347 end += 4 00348 (self.result.distance_to_goal,) = _struct_f.unpack(str[start:end]) 00349 start = end 00350 end += 4 00351 (length,) = _struct_I.unpack(str[start:end]) 00352 start = end 00353 end += length 00354 self.result.situation = str[start:end] 00355 start = end 00356 end += 8 00357 (self.result.error.error_id,) = _struct_Q.unpack(str[start:end]) 00358 start = end 00359 end += 4 00360 (length,) = _struct_I.unpack(str[start:end]) 00361 start = end 00362 end += length 00363 self.result.error.node_name = str[start:end] 00364 start = end 00365 end += 4 00366 (length,) = _struct_I.unpack(str[start:end]) 00367 start = end 00368 end += length 00369 self.result.error.error_description = str[start:end] 00370 start = end 00371 end += 4 00372 (length,) = _struct_I.unpack(str[start:end]) 00373 pattern = '<%sQ'%length 00374 start = end 00375 end += struct.calcsize(pattern) 00376 self.result.better_base_ids = numpy.frombuffer(str[start:end], dtype=numpy.uint64, count=length) 00377 return self 00378 except struct.error as e: 00379 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00380 00381 _struct_I = roslib.message.struct_I 00382 _struct_Q = struct.Struct("<Q") 00383 _struct_3I = struct.Struct("<3I") 00384 _struct_B = struct.Struct("<B") 00385 _struct_2I = struct.Struct("<2I") 00386 _struct_f = struct.Struct("<f")