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