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