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