$search
00001 """autogenerated by genmsg_py from CarveSegmentsAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import pr2_dremel_server.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class CarveSegmentsAction(roslib.message.Message): 00012 _md5sum = "784329588eb2edbb2b7ab8b02a45cb16" 00013 _type = "pr2_dremel_server/CarveSegmentsAction" 00014 _has_header = False #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 CarveSegmentsActionGoal action_goal 00018 CarveSegmentsActionResult action_result 00019 CarveSegmentsActionFeedback action_feedback 00020 00021 ================================================================================ 00022 MSG: pr2_dremel_server/CarveSegmentsActionGoal 00023 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00024 00025 Header header 00026 actionlib_msgs/GoalID goal_id 00027 CarveSegmentsGoal goal 00028 00029 ================================================================================ 00030 MSG: std_msgs/Header 00031 # Standard metadata for higher-level stamped data types. 00032 # This is generally used to communicate timestamped data 00033 # in a particular coordinate frame. 00034 # 00035 # sequence ID: consecutively increasing ID 00036 uint32 seq 00037 #Two-integer timestamp that is expressed as: 00038 # * stamp.secs: seconds (stamp_secs) since epoch 00039 # * stamp.nsecs: nanoseconds since stamp_secs 00040 # time-handling sugar is provided by the client library 00041 time stamp 00042 #Frame this data is associated with 00043 # 0: no frame 00044 # 1: global frame 00045 string frame_id 00046 00047 ================================================================================ 00048 MSG: actionlib_msgs/GoalID 00049 # The stamp should store the time at which this goal was requested. 00050 # It is used by an action server when it tries to preempt all 00051 # goals that were requested before a certain time 00052 time stamp 00053 00054 # The id provides a way to associate feedback and 00055 # result message with specific goal requests. The id 00056 # specified must be unique. 00057 string id 00058 00059 00060 ================================================================================ 00061 MSG: pr2_dremel_server/CarveSegmentsGoal 00062 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00063 # Define the goal 00064 pr2_dremel_server/Segment[] segments 00065 00066 ================================================================================ 00067 MSG: pr2_dremel_server/Segment 00068 geometry_msgs/Point[] points 00069 00070 ================================================================================ 00071 MSG: geometry_msgs/Point 00072 # This contains the position of a point in free space 00073 float64 x 00074 float64 y 00075 float64 z 00076 00077 ================================================================================ 00078 MSG: pr2_dremel_server/CarveSegmentsActionResult 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 00081 Header header 00082 actionlib_msgs/GoalStatus status 00083 CarveSegmentsResult result 00084 00085 ================================================================================ 00086 MSG: actionlib_msgs/GoalStatus 00087 GoalID goal_id 00088 uint8 status 00089 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00090 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00091 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00092 # and has since completed its execution (Terminal State) 00093 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00094 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00095 # to some failure (Terminal State) 00096 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00097 # because the goal was unattainable or invalid (Terminal State) 00098 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00099 # and has not yet completed execution 00100 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00101 # but the action server has not yet confirmed that the goal is canceled 00102 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00103 # and was successfully cancelled (Terminal State) 00104 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00105 # sent over the wire by an action server 00106 00107 #Allow for the user to associate a string with GoalStatus for debugging 00108 string text 00109 00110 00111 ================================================================================ 00112 MSG: pr2_dremel_server/CarveSegmentsResult 00113 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00114 # Define the result 00115 bool complete 00116 00117 00118 ================================================================================ 00119 MSG: pr2_dremel_server/CarveSegmentsActionFeedback 00120 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00121 00122 Header header 00123 actionlib_msgs/GoalStatus status 00124 CarveSegmentsFeedback feedback 00125 00126 ================================================================================ 00127 MSG: pr2_dremel_server/CarveSegmentsFeedback 00128 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00129 # Define a feedback message 00130 float32 percent_complete 00131 00132 00133 """ 00134 __slots__ = ['action_goal','action_result','action_feedback'] 00135 _slot_types = ['pr2_dremel_server/CarveSegmentsActionGoal','pr2_dremel_server/CarveSegmentsActionResult','pr2_dremel_server/CarveSegmentsActionFeedback'] 00136 00137 def __init__(self, *args, **kwds): 00138 """ 00139 Constructor. Any message fields that are implicitly/explicitly 00140 set to None will be assigned a default value. The recommend 00141 use is keyword arguments as this is more robust to future message 00142 changes. You cannot mix in-order arguments and keyword arguments. 00143 00144 The available fields are: 00145 action_goal,action_result,action_feedback 00146 00147 @param args: complete set of field values, in .msg order 00148 @param kwds: use keyword arguments corresponding to message field names 00149 to set specific fields. 00150 """ 00151 if args or kwds: 00152 super(CarveSegmentsAction, self).__init__(*args, **kwds) 00153 #message fields cannot be None, assign default values for those that are 00154 if self.action_goal is None: 00155 self.action_goal = pr2_dremel_server.msg.CarveSegmentsActionGoal() 00156 if self.action_result is None: 00157 self.action_result = pr2_dremel_server.msg.CarveSegmentsActionResult() 00158 if self.action_feedback is None: 00159 self.action_feedback = pr2_dremel_server.msg.CarveSegmentsActionFeedback() 00160 else: 00161 self.action_goal = pr2_dremel_server.msg.CarveSegmentsActionGoal() 00162 self.action_result = pr2_dremel_server.msg.CarveSegmentsActionResult() 00163 self.action_feedback = pr2_dremel_server.msg.CarveSegmentsActionFeedback() 00164 00165 def _get_types(self): 00166 """ 00167 internal API method 00168 """ 00169 return self._slot_types 00170 00171 def serialize(self, buff): 00172 """ 00173 serialize message into buffer 00174 @param buff: buffer 00175 @type buff: StringIO 00176 """ 00177 try: 00178 _x = self 00179 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00180 _x = self.action_goal.header.frame_id 00181 length = len(_x) 00182 buff.write(struct.pack('<I%ss'%length, length, _x)) 00183 _x = self 00184 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00185 _x = self.action_goal.goal_id.id 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 length = len(self.action_goal.goal.segments) 00189 buff.write(_struct_I.pack(length)) 00190 for val1 in self.action_goal.goal.segments: 00191 length = len(val1.points) 00192 buff.write(_struct_I.pack(length)) 00193 for val2 in val1.points: 00194 _x = val2 00195 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00196 _x = self 00197 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00198 _x = self.action_result.header.frame_id 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 _x = self 00202 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00203 _x = self.action_result.status.goal_id.id 00204 length = len(_x) 00205 buff.write(struct.pack('<I%ss'%length, length, _x)) 00206 buff.write(_struct_B.pack(self.action_result.status.status)) 00207 _x = self.action_result.status.text 00208 length = len(_x) 00209 buff.write(struct.pack('<I%ss'%length, length, _x)) 00210 _x = self 00211 buff.write(_struct_B3I.pack(_x.action_result.result.complete, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00212 _x = self.action_feedback.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.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00217 _x = self.action_feedback.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.action_feedback.status.status)) 00221 _x = self.action_feedback.status.text 00222 length = len(_x) 00223 buff.write(struct.pack('<I%ss'%length, length, _x)) 00224 buff.write(_struct_f.pack(self.action_feedback.feedback.percent_complete)) 00225 except struct.error as se: self._check_types(se) 00226 except TypeError as te: self._check_types(te) 00227 00228 def deserialize(self, str): 00229 """ 00230 unpack serialized message in str into this message instance 00231 @param str: byte array of serialized message 00232 @type str: str 00233 """ 00234 try: 00235 if self.action_goal is None: 00236 self.action_goal = pr2_dremel_server.msg.CarveSegmentsActionGoal() 00237 if self.action_result is None: 00238 self.action_result = pr2_dremel_server.msg.CarveSegmentsActionResult() 00239 if self.action_feedback is None: 00240 self.action_feedback = pr2_dremel_server.msg.CarveSegmentsActionFeedback() 00241 end = 0 00242 _x = self 00243 start = end 00244 end += 12 00245 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 start = end 00250 end += length 00251 self.action_goal.header.frame_id = str[start:end] 00252 _x = self 00253 start = end 00254 end += 8 00255 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00256 start = end 00257 end += 4 00258 (length,) = _struct_I.unpack(str[start:end]) 00259 start = end 00260 end += length 00261 self.action_goal.goal_id.id = str[start:end] 00262 start = end 00263 end += 4 00264 (length,) = _struct_I.unpack(str[start:end]) 00265 self.action_goal.goal.segments = [] 00266 for i in range(0, length): 00267 val1 = pr2_dremel_server.msg.Segment() 00268 start = end 00269 end += 4 00270 (length,) = _struct_I.unpack(str[start:end]) 00271 val1.points = [] 00272 for i in range(0, length): 00273 val2 = geometry_msgs.msg.Point() 00274 _x = val2 00275 start = end 00276 end += 24 00277 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00278 val1.points.append(val2) 00279 self.action_goal.goal.segments.append(val1) 00280 _x = self 00281 start = end 00282 end += 12 00283 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00284 start = end 00285 end += 4 00286 (length,) = _struct_I.unpack(str[start:end]) 00287 start = end 00288 end += length 00289 self.action_result.header.frame_id = str[start:end] 00290 _x = self 00291 start = end 00292 end += 8 00293 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00294 start = end 00295 end += 4 00296 (length,) = _struct_I.unpack(str[start:end]) 00297 start = end 00298 end += length 00299 self.action_result.status.goal_id.id = str[start:end] 00300 start = end 00301 end += 1 00302 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00303 start = end 00304 end += 4 00305 (length,) = _struct_I.unpack(str[start:end]) 00306 start = end 00307 end += length 00308 self.action_result.status.text = str[start:end] 00309 _x = self 00310 start = end 00311 end += 13 00312 (_x.action_result.result.complete, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00313 self.action_result.result.complete = bool(self.action_result.result.complete) 00314 start = end 00315 end += 4 00316 (length,) = _struct_I.unpack(str[start:end]) 00317 start = end 00318 end += length 00319 self.action_feedback.header.frame_id = str[start:end] 00320 _x = self 00321 start = end 00322 end += 8 00323 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 start = end 00328 end += length 00329 self.action_feedback.status.goal_id.id = str[start:end] 00330 start = end 00331 end += 1 00332 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00333 start = end 00334 end += 4 00335 (length,) = _struct_I.unpack(str[start:end]) 00336 start = end 00337 end += length 00338 self.action_feedback.status.text = str[start:end] 00339 start = end 00340 end += 4 00341 (self.action_feedback.feedback.percent_complete,) = _struct_f.unpack(str[start:end]) 00342 return self 00343 except struct.error as e: 00344 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00345 00346 00347 def serialize_numpy(self, buff, numpy): 00348 """ 00349 serialize message with numpy array types into buffer 00350 @param buff: buffer 00351 @type buff: StringIO 00352 @param numpy: numpy python module 00353 @type numpy module 00354 """ 00355 try: 00356 _x = self 00357 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00358 _x = self.action_goal.header.frame_id 00359 length = len(_x) 00360 buff.write(struct.pack('<I%ss'%length, length, _x)) 00361 _x = self 00362 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00363 _x = self.action_goal.goal_id.id 00364 length = len(_x) 00365 buff.write(struct.pack('<I%ss'%length, length, _x)) 00366 length = len(self.action_goal.goal.segments) 00367 buff.write(_struct_I.pack(length)) 00368 for val1 in self.action_goal.goal.segments: 00369 length = len(val1.points) 00370 buff.write(_struct_I.pack(length)) 00371 for val2 in val1.points: 00372 _x = val2 00373 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00374 _x = self 00375 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00376 _x = self.action_result.header.frame_id 00377 length = len(_x) 00378 buff.write(struct.pack('<I%ss'%length, length, _x)) 00379 _x = self 00380 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00381 _x = self.action_result.status.goal_id.id 00382 length = len(_x) 00383 buff.write(struct.pack('<I%ss'%length, length, _x)) 00384 buff.write(_struct_B.pack(self.action_result.status.status)) 00385 _x = self.action_result.status.text 00386 length = len(_x) 00387 buff.write(struct.pack('<I%ss'%length, length, _x)) 00388 _x = self 00389 buff.write(_struct_B3I.pack(_x.action_result.result.complete, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00390 _x = self.action_feedback.header.frame_id 00391 length = len(_x) 00392 buff.write(struct.pack('<I%ss'%length, length, _x)) 00393 _x = self 00394 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00395 _x = self.action_feedback.status.goal_id.id 00396 length = len(_x) 00397 buff.write(struct.pack('<I%ss'%length, length, _x)) 00398 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00399 _x = self.action_feedback.status.text 00400 length = len(_x) 00401 buff.write(struct.pack('<I%ss'%length, length, _x)) 00402 buff.write(_struct_f.pack(self.action_feedback.feedback.percent_complete)) 00403 except struct.error as se: self._check_types(se) 00404 except TypeError as te: self._check_types(te) 00405 00406 def deserialize_numpy(self, str, numpy): 00407 """ 00408 unpack serialized message in str into this message instance using numpy for array types 00409 @param str: byte array of serialized message 00410 @type str: str 00411 @param numpy: numpy python module 00412 @type numpy: module 00413 """ 00414 try: 00415 if self.action_goal is None: 00416 self.action_goal = pr2_dremel_server.msg.CarveSegmentsActionGoal() 00417 if self.action_result is None: 00418 self.action_result = pr2_dremel_server.msg.CarveSegmentsActionResult() 00419 if self.action_feedback is None: 00420 self.action_feedback = pr2_dremel_server.msg.CarveSegmentsActionFeedback() 00421 end = 0 00422 _x = self 00423 start = end 00424 end += 12 00425 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00426 start = end 00427 end += 4 00428 (length,) = _struct_I.unpack(str[start:end]) 00429 start = end 00430 end += length 00431 self.action_goal.header.frame_id = str[start:end] 00432 _x = self 00433 start = end 00434 end += 8 00435 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00436 start = end 00437 end += 4 00438 (length,) = _struct_I.unpack(str[start:end]) 00439 start = end 00440 end += length 00441 self.action_goal.goal_id.id = str[start:end] 00442 start = end 00443 end += 4 00444 (length,) = _struct_I.unpack(str[start:end]) 00445 self.action_goal.goal.segments = [] 00446 for i in range(0, length): 00447 val1 = pr2_dremel_server.msg.Segment() 00448 start = end 00449 end += 4 00450 (length,) = _struct_I.unpack(str[start:end]) 00451 val1.points = [] 00452 for i in range(0, length): 00453 val2 = geometry_msgs.msg.Point() 00454 _x = val2 00455 start = end 00456 end += 24 00457 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00458 val1.points.append(val2) 00459 self.action_goal.goal.segments.append(val1) 00460 _x = self 00461 start = end 00462 end += 12 00463 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00464 start = end 00465 end += 4 00466 (length,) = _struct_I.unpack(str[start:end]) 00467 start = end 00468 end += length 00469 self.action_result.header.frame_id = str[start:end] 00470 _x = self 00471 start = end 00472 end += 8 00473 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00474 start = end 00475 end += 4 00476 (length,) = _struct_I.unpack(str[start:end]) 00477 start = end 00478 end += length 00479 self.action_result.status.goal_id.id = str[start:end] 00480 start = end 00481 end += 1 00482 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00483 start = end 00484 end += 4 00485 (length,) = _struct_I.unpack(str[start:end]) 00486 start = end 00487 end += length 00488 self.action_result.status.text = str[start:end] 00489 _x = self 00490 start = end 00491 end += 13 00492 (_x.action_result.result.complete, _x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_B3I.unpack(str[start:end]) 00493 self.action_result.result.complete = bool(self.action_result.result.complete) 00494 start = end 00495 end += 4 00496 (length,) = _struct_I.unpack(str[start:end]) 00497 start = end 00498 end += length 00499 self.action_feedback.header.frame_id = str[start:end] 00500 _x = self 00501 start = end 00502 end += 8 00503 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00504 start = end 00505 end += 4 00506 (length,) = _struct_I.unpack(str[start:end]) 00507 start = end 00508 end += length 00509 self.action_feedback.status.goal_id.id = str[start:end] 00510 start = end 00511 end += 1 00512 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00513 start = end 00514 end += 4 00515 (length,) = _struct_I.unpack(str[start:end]) 00516 start = end 00517 end += length 00518 self.action_feedback.status.text = str[start:end] 00519 start = end 00520 end += 4 00521 (self.action_feedback.feedback.percent_complete,) = _struct_f.unpack(str[start:end]) 00522 return self 00523 except struct.error as e: 00524 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00525 00526 _struct_I = roslib.message.struct_I 00527 _struct_B = struct.Struct("<B") 00528 _struct_f = struct.Struct("<f") 00529 _struct_3I = struct.Struct("<3I") 00530 _struct_B3I = struct.Struct("<B3I") 00531 _struct_2I = struct.Struct("<2I") 00532 _struct_3d = struct.Struct("<3d")