00001 """autogenerated by genmsg_py from UserCommandActionGoal.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 UserCommandActionGoal(roslib.message.Message):
00011 _md5sum = "8f95918f3d1ea3e7e9b9a54f0fe8eae8"
00012 _type = "pr2_interactive_object_detection/UserCommandActionGoal"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalID goal_id
00018 UserCommandGoal goal
00019
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data
00024 # in a particular coordinate frame.
00025 #
00026 # sequence ID: consecutively increasing ID
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037
00038 ================================================================================
00039 MSG: actionlib_msgs/GoalID
00040 # The stamp should store the time at which this goal was requested.
00041 # It is used by an action server when it tries to preempt all
00042 # goals that were requested before a certain time
00043 time stamp
00044
00045 # The id provides a way to associate feedback and
00046 # result message with specific goal requests. The id
00047 # specified must be unique.
00048 string id
00049
00050
00051 ================================================================================
00052 MSG: pr2_interactive_object_detection/UserCommandGoal
00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00054 #request constants
00055 int8 LOOK_AT_TABLE=0
00056
00057 int8 SEGMENT=1
00058 int8 RECOGNIZE=2
00059 int8 DETECT=3
00060
00061 int8 request
00062 bool interactive
00063
00064 """
00065 __slots__ = ['header','goal_id','goal']
00066 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_interactive_object_detection/UserCommandGoal']
00067
00068 def __init__(self, *args, **kwds):
00069 """
00070 Constructor. Any message fields that are implicitly/explicitly
00071 set to None will be assigned a default value. The recommend
00072 use is keyword arguments as this is more robust to future message
00073 changes. You cannot mix in-order arguments and keyword arguments.
00074
00075 The available fields are:
00076 header,goal_id,goal
00077
00078 @param args: complete set of field values, in .msg order
00079 @param kwds: use keyword arguments corresponding to message field names
00080 to set specific fields.
00081 """
00082 if args or kwds:
00083 super(UserCommandActionGoal, self).__init__(*args, **kwds)
00084
00085 if self.header is None:
00086 self.header = std_msgs.msg._Header.Header()
00087 if self.goal_id is None:
00088 self.goal_id = actionlib_msgs.msg.GoalID()
00089 if self.goal is None:
00090 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal()
00091 else:
00092 self.header = std_msgs.msg._Header.Header()
00093 self.goal_id = actionlib_msgs.msg.GoalID()
00094 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal()
00095
00096 def _get_types(self):
00097 """
00098 internal API method
00099 """
00100 return self._slot_types
00101
00102 def serialize(self, buff):
00103 """
00104 serialize message into buffer
00105 @param buff: buffer
00106 @type buff: StringIO
00107 """
00108 try:
00109 _x = self
00110 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00111 _x = self.header.frame_id
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self
00115 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00116 _x = self.goal_id.id
00117 length = len(_x)
00118 buff.write(struct.pack('<I%ss'%length, length, _x))
00119 _x = self
00120 buff.write(_struct_bB.pack(_x.goal.request, _x.goal.interactive))
00121 except struct.error, se: self._check_types(se)
00122 except TypeError, te: self._check_types(te)
00123
00124 def deserialize(self, str):
00125 """
00126 unpack serialized message in str into this message instance
00127 @param str: byte array of serialized message
00128 @type str: str
00129 """
00130 try:
00131 if self.header is None:
00132 self.header = std_msgs.msg._Header.Header()
00133 if self.goal_id is None:
00134 self.goal_id = actionlib_msgs.msg.GoalID()
00135 if self.goal is None:
00136 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal()
00137 end = 0
00138 _x = self
00139 start = end
00140 end += 12
00141 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00142 start = end
00143 end += 4
00144 (length,) = _struct_I.unpack(str[start:end])
00145 start = end
00146 end += length
00147 self.header.frame_id = str[start:end]
00148 _x = self
00149 start = end
00150 end += 8
00151 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00152 start = end
00153 end += 4
00154 (length,) = _struct_I.unpack(str[start:end])
00155 start = end
00156 end += length
00157 self.goal_id.id = str[start:end]
00158 _x = self
00159 start = end
00160 end += 2
00161 (_x.goal.request, _x.goal.interactive,) = _struct_bB.unpack(str[start:end])
00162 self.goal.interactive = bool(self.goal.interactive)
00163 return self
00164 except struct.error, e:
00165 raise roslib.message.DeserializationError(e)
00166
00167
00168 def serialize_numpy(self, buff, numpy):
00169 """
00170 serialize message with numpy array types into buffer
00171 @param buff: buffer
00172 @type buff: StringIO
00173 @param numpy: numpy python module
00174 @type numpy module
00175 """
00176 try:
00177 _x = self
00178 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00179 _x = self.header.frame_id
00180 length = len(_x)
00181 buff.write(struct.pack('<I%ss'%length, length, _x))
00182 _x = self
00183 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00184 _x = self.goal_id.id
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_bB.pack(_x.goal.request, _x.goal.interactive))
00189 except struct.error, se: self._check_types(se)
00190 except TypeError, te: self._check_types(te)
00191
00192 def deserialize_numpy(self, str, numpy):
00193 """
00194 unpack serialized message in str into this message instance using numpy for array types
00195 @param str: byte array of serialized message
00196 @type str: str
00197 @param numpy: numpy python module
00198 @type numpy: module
00199 """
00200 try:
00201 if self.header is None:
00202 self.header = std_msgs.msg._Header.Header()
00203 if self.goal_id is None:
00204 self.goal_id = actionlib_msgs.msg.GoalID()
00205 if self.goal is None:
00206 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal()
00207 end = 0
00208 _x = self
00209 start = end
00210 end += 12
00211 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00212 start = end
00213 end += 4
00214 (length,) = _struct_I.unpack(str[start:end])
00215 start = end
00216 end += length
00217 self.header.frame_id = str[start:end]
00218 _x = self
00219 start = end
00220 end += 8
00221 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00222 start = end
00223 end += 4
00224 (length,) = _struct_I.unpack(str[start:end])
00225 start = end
00226 end += length
00227 self.goal_id.id = str[start:end]
00228 _x = self
00229 start = end
00230 end += 2
00231 (_x.goal.request, _x.goal.interactive,) = _struct_bB.unpack(str[start:end])
00232 self.goal.interactive = bool(self.goal.interactive)
00233 return self
00234 except struct.error, e:
00235 raise roslib.message.DeserializationError(e)
00236
00237 _struct_I = roslib.message.struct_I
00238 _struct_3I = struct.Struct("<3I")
00239 _struct_2I = struct.Struct("<2I")
00240 _struct_bB = struct.Struct("<bB")