00001 """autogenerated by genmsg_py from PointHeadActionAction.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007 import roslib.rostime
00008 import actionlib_msgs.msg
00009 import control_msgs.msg
00010
00011 class PointHeadActionAction(roslib.message.Message):
00012 _md5sum = "6a07e5bfef9eb077d70c657418c28471"
00013 _type = "control_msgs/PointHeadActionAction"
00014 _has_header = False
00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00016
00017 PointHeadActionActionGoal action_goal
00018 PointHeadActionActionResult action_result
00019 PointHeadActionActionFeedback action_feedback
00020
00021 ================================================================================
00022 MSG: control_msgs/PointHeadActionActionGoal
00023 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00024
00025 Header header
00026 actionlib_msgs/GoalID goal_id
00027 PointHeadActionGoal 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: control_msgs/PointHeadActionGoal
00062 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00063 geometry_msgs/PointStamped target
00064 geometry_msgs/Vector3 pointing_axis
00065 string pointing_frame
00066 duration min_duration
00067 float64 max_velocity
00068
00069 ================================================================================
00070 MSG: geometry_msgs/PointStamped
00071 # This represents a Point with reference coordinate frame and timestamp
00072 Header header
00073 Point point
00074
00075 ================================================================================
00076 MSG: geometry_msgs/Point
00077 # This contains the position of a point in free space
00078 float64 x
00079 float64 y
00080 float64 z
00081
00082 ================================================================================
00083 MSG: geometry_msgs/Vector3
00084 # This represents a vector in free space.
00085
00086 float64 x
00087 float64 y
00088 float64 z
00089 ================================================================================
00090 MSG: control_msgs/PointHeadActionActionResult
00091 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00092
00093 Header header
00094 actionlib_msgs/GoalStatus status
00095 PointHeadActionResult result
00096
00097 ================================================================================
00098 MSG: actionlib_msgs/GoalStatus
00099 GoalID goal_id
00100 uint8 status
00101 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00102 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00103 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00104 # and has since completed its execution (Terminal State)
00105 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00106 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00107 # to some failure (Terminal State)
00108 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00109 # because the goal was unattainable or invalid (Terminal State)
00110 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00111 # and has not yet completed execution
00112 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00113 # but the action server has not yet confirmed that the goal is canceled
00114 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00115 # and was successfully cancelled (Terminal State)
00116 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00117 # sent over the wire by an action server
00118
00119 #Allow for the user to associate a string with GoalStatus for debugging
00120 string text
00121
00122
00123 ================================================================================
00124 MSG: control_msgs/PointHeadActionResult
00125 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00126
00127 ================================================================================
00128 MSG: control_msgs/PointHeadActionActionFeedback
00129 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00130
00131 Header header
00132 actionlib_msgs/GoalStatus status
00133 PointHeadActionFeedback feedback
00134
00135 ================================================================================
00136 MSG: control_msgs/PointHeadActionFeedback
00137 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00138
00139
00140 """
00141 __slots__ = ['action_goal','action_result','action_feedback']
00142 _slot_types = ['control_msgs/PointHeadActionActionGoal','control_msgs/PointHeadActionActionResult','control_msgs/PointHeadActionActionFeedback']
00143
00144 def __init__(self, *args, **kwds):
00145 """
00146 Constructor. Any message fields that are implicitly/explicitly
00147 set to None will be assigned a default value. The recommend
00148 use is keyword arguments as this is more robust to future message
00149 changes. You cannot mix in-order arguments and keyword arguments.
00150
00151 The available fields are:
00152 action_goal,action_result,action_feedback
00153
00154 @param args: complete set of field values, in .msg order
00155 @param kwds: use keyword arguments corresponding to message field names
00156 to set specific fields.
00157 """
00158 if args or kwds:
00159 super(PointHeadActionAction, self).__init__(*args, **kwds)
00160
00161 if self.action_goal is None:
00162 self.action_goal = control_msgs.msg.PointHeadActionActionGoal()
00163 if self.action_result is None:
00164 self.action_result = control_msgs.msg.PointHeadActionActionResult()
00165 if self.action_feedback is None:
00166 self.action_feedback = control_msgs.msg.PointHeadActionActionFeedback()
00167 else:
00168 self.action_goal = control_msgs.msg.PointHeadActionActionGoal()
00169 self.action_result = control_msgs.msg.PointHeadActionActionResult()
00170 self.action_feedback = control_msgs.msg.PointHeadActionActionFeedback()
00171
00172 def _get_types(self):
00173 """
00174 internal API method
00175 """
00176 return self._slot_types
00177
00178 def serialize(self, buff):
00179 """
00180 serialize message into buffer
00181 @param buff: buffer
00182 @type buff: StringIO
00183 """
00184 try:
00185 _x = self
00186 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00187 _x = self.action_goal.header.frame_id
00188 length = len(_x)
00189 buff.write(struct.pack('<I%ss'%length, length, _x))
00190 _x = self
00191 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00192 _x = self.action_goal.goal_id.id
00193 length = len(_x)
00194 buff.write(struct.pack('<I%ss'%length, length, _x))
00195 _x = self
00196 buff.write(_struct_3I.pack(_x.action_goal.goal.target.header.seq, _x.action_goal.goal.target.header.stamp.secs, _x.action_goal.goal.target.header.stamp.nsecs))
00197 _x = self.action_goal.goal.target.header.frame_id
00198 length = len(_x)
00199 buff.write(struct.pack('<I%ss'%length, length, _x))
00200 _x = self
00201 buff.write(_struct_6d.pack(_x.action_goal.goal.target.point.x, _x.action_goal.goal.target.point.y, _x.action_goal.goal.target.point.z, _x.action_goal.goal.pointing_axis.x, _x.action_goal.goal.pointing_axis.y, _x.action_goal.goal.pointing_axis.z))
00202 _x = self.action_goal.goal.pointing_frame
00203 length = len(_x)
00204 buff.write(struct.pack('<I%ss'%length, length, _x))
00205 _x = self
00206 buff.write(_struct_2id3I.pack(_x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00207 _x = self.action_result.header.frame_id
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 _x = self
00211 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00212 _x = self.action_result.status.goal_id.id
00213 length = len(_x)
00214 buff.write(struct.pack('<I%ss'%length, length, _x))
00215 buff.write(_struct_B.pack(self.action_result.status.status))
00216 _x = self.action_result.status.text
00217 length = len(_x)
00218 buff.write(struct.pack('<I%ss'%length, length, _x))
00219 _x = self
00220 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00221 _x = self.action_feedback.header.frame_id
00222 length = len(_x)
00223 buff.write(struct.pack('<I%ss'%length, length, _x))
00224 _x = self
00225 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00226 _x = self.action_feedback.status.goal_id.id
00227 length = len(_x)
00228 buff.write(struct.pack('<I%ss'%length, length, _x))
00229 buff.write(_struct_B.pack(self.action_feedback.status.status))
00230 _x = self.action_feedback.status.text
00231 length = len(_x)
00232 buff.write(struct.pack('<I%ss'%length, length, _x))
00233 except struct.error, se: self._check_types(se)
00234 except TypeError, te: self._check_types(te)
00235
00236 def deserialize(self, str):
00237 """
00238 unpack serialized message in str into this message instance
00239 @param str: byte array of serialized message
00240 @type str: str
00241 """
00242 try:
00243 if self.action_goal is None:
00244 self.action_goal = control_msgs.msg.PointHeadActionActionGoal()
00245 if self.action_result is None:
00246 self.action_result = control_msgs.msg.PointHeadActionActionResult()
00247 if self.action_feedback is None:
00248 self.action_feedback = control_msgs.msg.PointHeadActionActionFeedback()
00249 end = 0
00250 _x = self
00251 start = end
00252 end += 12
00253 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00254 start = end
00255 end += 4
00256 (length,) = _struct_I.unpack(str[start:end])
00257 start = end
00258 end += length
00259 self.action_goal.header.frame_id = str[start:end]
00260 _x = self
00261 start = end
00262 end += 8
00263 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00264 start = end
00265 end += 4
00266 (length,) = _struct_I.unpack(str[start:end])
00267 start = end
00268 end += length
00269 self.action_goal.goal_id.id = str[start:end]
00270 _x = self
00271 start = end
00272 end += 12
00273 (_x.action_goal.goal.target.header.seq, _x.action_goal.goal.target.header.stamp.secs, _x.action_goal.goal.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00274 start = end
00275 end += 4
00276 (length,) = _struct_I.unpack(str[start:end])
00277 start = end
00278 end += length
00279 self.action_goal.goal.target.header.frame_id = str[start:end]
00280 _x = self
00281 start = end
00282 end += 48
00283 (_x.action_goal.goal.target.point.x, _x.action_goal.goal.target.point.y, _x.action_goal.goal.target.point.z, _x.action_goal.goal.pointing_axis.x, _x.action_goal.goal.pointing_axis.y, _x.action_goal.goal.pointing_axis.z,) = _struct_6d.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_goal.goal.pointing_frame = str[start:end]
00290 _x = self
00291 start = end
00292 end += 28
00293 (_x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2id3I.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.header.frame_id = str[start:end]
00300 _x = self
00301 start = end
00302 end += 8
00303 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 self.action_result.status.goal_id.id = str[start:end]
00310 start = end
00311 end += 1
00312 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00313 start = end
00314 end += 4
00315 (length,) = _struct_I.unpack(str[start:end])
00316 start = end
00317 end += length
00318 self.action_result.status.text = str[start:end]
00319 _x = self
00320 start = end
00321 end += 12
00322 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 self.action_feedback.header.frame_id = str[start:end]
00329 _x = self
00330 start = end
00331 end += 8
00332 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00339 start = end
00340 end += 1
00341 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00342 start = end
00343 end += 4
00344 (length,) = _struct_I.unpack(str[start:end])
00345 start = end
00346 end += length
00347 self.action_feedback.status.text = str[start:end]
00348 return self
00349 except struct.error, e:
00350 raise roslib.message.DeserializationError(e)
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.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs))
00364 _x = self.action_goal.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.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs))
00369 _x = self.action_goal.goal_id.id
00370 length = len(_x)
00371 buff.write(struct.pack('<I%ss'%length, length, _x))
00372 _x = self
00373 buff.write(_struct_3I.pack(_x.action_goal.goal.target.header.seq, _x.action_goal.goal.target.header.stamp.secs, _x.action_goal.goal.target.header.stamp.nsecs))
00374 _x = self.action_goal.goal.target.header.frame_id
00375 length = len(_x)
00376 buff.write(struct.pack('<I%ss'%length, length, _x))
00377 _x = self
00378 buff.write(_struct_6d.pack(_x.action_goal.goal.target.point.x, _x.action_goal.goal.target.point.y, _x.action_goal.goal.target.point.z, _x.action_goal.goal.pointing_axis.x, _x.action_goal.goal.pointing_axis.y, _x.action_goal.goal.pointing_axis.z))
00379 _x = self.action_goal.goal.pointing_frame
00380 length = len(_x)
00381 buff.write(struct.pack('<I%ss'%length, length, _x))
00382 _x = self
00383 buff.write(_struct_2id3I.pack(_x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs))
00384 _x = self.action_result.header.frame_id
00385 length = len(_x)
00386 buff.write(struct.pack('<I%ss'%length, length, _x))
00387 _x = self
00388 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs))
00389 _x = self.action_result.status.goal_id.id
00390 length = len(_x)
00391 buff.write(struct.pack('<I%ss'%length, length, _x))
00392 buff.write(_struct_B.pack(self.action_result.status.status))
00393 _x = self.action_result.status.text
00394 length = len(_x)
00395 buff.write(struct.pack('<I%ss'%length, length, _x))
00396 _x = self
00397 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs))
00398 _x = self.action_feedback.header.frame_id
00399 length = len(_x)
00400 buff.write(struct.pack('<I%ss'%length, length, _x))
00401 _x = self
00402 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs))
00403 _x = self.action_feedback.status.goal_id.id
00404 length = len(_x)
00405 buff.write(struct.pack('<I%ss'%length, length, _x))
00406 buff.write(_struct_B.pack(self.action_feedback.status.status))
00407 _x = self.action_feedback.status.text
00408 length = len(_x)
00409 buff.write(struct.pack('<I%ss'%length, length, _x))
00410 except struct.error, se: self._check_types(se)
00411 except TypeError, te: self._check_types(te)
00412
00413 def deserialize_numpy(self, str, numpy):
00414 """
00415 unpack serialized message in str into this message instance using numpy for array types
00416 @param str: byte array of serialized message
00417 @type str: str
00418 @param numpy: numpy python module
00419 @type numpy: module
00420 """
00421 try:
00422 if self.action_goal is None:
00423 self.action_goal = control_msgs.msg.PointHeadActionActionGoal()
00424 if self.action_result is None:
00425 self.action_result = control_msgs.msg.PointHeadActionActionResult()
00426 if self.action_feedback is None:
00427 self.action_feedback = control_msgs.msg.PointHeadActionActionFeedback()
00428 end = 0
00429 _x = self
00430 start = end
00431 end += 12
00432 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00433 start = end
00434 end += 4
00435 (length,) = _struct_I.unpack(str[start:end])
00436 start = end
00437 end += length
00438 self.action_goal.header.frame_id = str[start:end]
00439 _x = self
00440 start = end
00441 end += 8
00442 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 start = end
00447 end += length
00448 self.action_goal.goal_id.id = str[start:end]
00449 _x = self
00450 start = end
00451 end += 12
00452 (_x.action_goal.goal.target.header.seq, _x.action_goal.goal.target.header.stamp.secs, _x.action_goal.goal.target.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00453 start = end
00454 end += 4
00455 (length,) = _struct_I.unpack(str[start:end])
00456 start = end
00457 end += length
00458 self.action_goal.goal.target.header.frame_id = str[start:end]
00459 _x = self
00460 start = end
00461 end += 48
00462 (_x.action_goal.goal.target.point.x, _x.action_goal.goal.target.point.y, _x.action_goal.goal.target.point.z, _x.action_goal.goal.pointing_axis.x, _x.action_goal.goal.pointing_axis.y, _x.action_goal.goal.pointing_axis.z,) = _struct_6d.unpack(str[start:end])
00463 start = end
00464 end += 4
00465 (length,) = _struct_I.unpack(str[start:end])
00466 start = end
00467 end += length
00468 self.action_goal.goal.pointing_frame = str[start:end]
00469 _x = self
00470 start = end
00471 end += 28
00472 (_x.action_goal.goal.min_duration.secs, _x.action_goal.goal.min_duration.nsecs, _x.action_goal.goal.max_velocity, _x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_2id3I.unpack(str[start:end])
00473 start = end
00474 end += 4
00475 (length,) = _struct_I.unpack(str[start:end])
00476 start = end
00477 end += length
00478 self.action_result.header.frame_id = str[start:end]
00479 _x = self
00480 start = end
00481 end += 8
00482 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.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.goal_id.id = str[start:end]
00489 start = end
00490 end += 1
00491 (self.action_result.status.status,) = _struct_B.unpack(str[start:end])
00492 start = end
00493 end += 4
00494 (length,) = _struct_I.unpack(str[start:end])
00495 start = end
00496 end += length
00497 self.action_result.status.text = str[start:end]
00498 _x = self
00499 start = end
00500 end += 12
00501 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00502 start = end
00503 end += 4
00504 (length,) = _struct_I.unpack(str[start:end])
00505 start = end
00506 end += length
00507 self.action_feedback.header.frame_id = str[start:end]
00508 _x = self
00509 start = end
00510 end += 8
00511 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00512 start = end
00513 end += 4
00514 (length,) = _struct_I.unpack(str[start:end])
00515 start = end
00516 end += length
00517 self.action_feedback.status.goal_id.id = str[start:end]
00518 start = end
00519 end += 1
00520 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end])
00521 start = end
00522 end += 4
00523 (length,) = _struct_I.unpack(str[start:end])
00524 start = end
00525 end += length
00526 self.action_feedback.status.text = str[start:end]
00527 return self
00528 except struct.error, e:
00529 raise roslib.message.DeserializationError(e)
00530
00531 _struct_I = roslib.message.struct_I
00532 _struct_2id3I = struct.Struct("<2id3I")
00533 _struct_3I = struct.Struct("<3I")
00534 _struct_B = struct.Struct("<B")
00535 _struct_6d = struct.Struct("<6d")
00536 _struct_2I = struct.Struct("<2I")