$search
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 = "ed11cbb67a46d20b69258a0f9131209d" 00012 _type = "pr2_interactive_object_detection/UserCommandActionGoal" 00013 _has_header = True #flag to mark the presence of a Header object 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 int8 RESET=4 00061 00062 int8 request 00063 bool interactive 00064 00065 """ 00066 __slots__ = ['header','goal_id','goal'] 00067 _slot_types = ['Header','actionlib_msgs/GoalID','pr2_interactive_object_detection/UserCommandGoal'] 00068 00069 def __init__(self, *args, **kwds): 00070 """ 00071 Constructor. Any message fields that are implicitly/explicitly 00072 set to None will be assigned a default value. The recommend 00073 use is keyword arguments as this is more robust to future message 00074 changes. You cannot mix in-order arguments and keyword arguments. 00075 00076 The available fields are: 00077 header,goal_id,goal 00078 00079 @param args: complete set of field values, in .msg order 00080 @param kwds: use keyword arguments corresponding to message field names 00081 to set specific fields. 00082 """ 00083 if args or kwds: 00084 super(UserCommandActionGoal, self).__init__(*args, **kwds) 00085 #message fields cannot be None, assign default values for those that are 00086 if self.header is None: 00087 self.header = std_msgs.msg._Header.Header() 00088 if self.goal_id is None: 00089 self.goal_id = actionlib_msgs.msg.GoalID() 00090 if self.goal is None: 00091 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal() 00092 else: 00093 self.header = std_msgs.msg._Header.Header() 00094 self.goal_id = actionlib_msgs.msg.GoalID() 00095 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal() 00096 00097 def _get_types(self): 00098 """ 00099 internal API method 00100 """ 00101 return self._slot_types 00102 00103 def serialize(self, buff): 00104 """ 00105 serialize message into buffer 00106 @param buff: buffer 00107 @type buff: StringIO 00108 """ 00109 try: 00110 _x = self 00111 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00112 _x = self.header.frame_id 00113 length = len(_x) 00114 buff.write(struct.pack('<I%ss'%length, length, _x)) 00115 _x = self 00116 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00117 _x = self.goal_id.id 00118 length = len(_x) 00119 buff.write(struct.pack('<I%ss'%length, length, _x)) 00120 _x = self 00121 buff.write(_struct_bB.pack(_x.goal.request, _x.goal.interactive)) 00122 except struct.error as se: self._check_types(se) 00123 except TypeError as te: self._check_types(te) 00124 00125 def deserialize(self, str): 00126 """ 00127 unpack serialized message in str into this message instance 00128 @param str: byte array of serialized message 00129 @type str: str 00130 """ 00131 try: 00132 if self.header is None: 00133 self.header = std_msgs.msg._Header.Header() 00134 if self.goal_id is None: 00135 self.goal_id = actionlib_msgs.msg.GoalID() 00136 if self.goal is None: 00137 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal() 00138 end = 0 00139 _x = self 00140 start = end 00141 end += 12 00142 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00143 start = end 00144 end += 4 00145 (length,) = _struct_I.unpack(str[start:end]) 00146 start = end 00147 end += length 00148 self.header.frame_id = str[start:end] 00149 _x = self 00150 start = end 00151 end += 8 00152 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00153 start = end 00154 end += 4 00155 (length,) = _struct_I.unpack(str[start:end]) 00156 start = end 00157 end += length 00158 self.goal_id.id = str[start:end] 00159 _x = self 00160 start = end 00161 end += 2 00162 (_x.goal.request, _x.goal.interactive,) = _struct_bB.unpack(str[start:end]) 00163 self.goal.interactive = bool(self.goal.interactive) 00164 return self 00165 except struct.error as e: 00166 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00167 00168 00169 def serialize_numpy(self, buff, numpy): 00170 """ 00171 serialize message with numpy array types into buffer 00172 @param buff: buffer 00173 @type buff: StringIO 00174 @param numpy: numpy python module 00175 @type numpy module 00176 """ 00177 try: 00178 _x = self 00179 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00180 _x = self.header.frame_id 00181 length = len(_x) 00182 buff.write(struct.pack('<I%ss'%length, length, _x)) 00183 _x = self 00184 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00185 _x = self.goal_id.id 00186 length = len(_x) 00187 buff.write(struct.pack('<I%ss'%length, length, _x)) 00188 _x = self 00189 buff.write(_struct_bB.pack(_x.goal.request, _x.goal.interactive)) 00190 except struct.error as se: self._check_types(se) 00191 except TypeError as te: self._check_types(te) 00192 00193 def deserialize_numpy(self, str, numpy): 00194 """ 00195 unpack serialized message in str into this message instance using numpy for array types 00196 @param str: byte array of serialized message 00197 @type str: str 00198 @param numpy: numpy python module 00199 @type numpy: module 00200 """ 00201 try: 00202 if self.header is None: 00203 self.header = std_msgs.msg._Header.Header() 00204 if self.goal_id is None: 00205 self.goal_id = actionlib_msgs.msg.GoalID() 00206 if self.goal is None: 00207 self.goal = pr2_interactive_object_detection.msg.UserCommandGoal() 00208 end = 0 00209 _x = self 00210 start = end 00211 end += 12 00212 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00213 start = end 00214 end += 4 00215 (length,) = _struct_I.unpack(str[start:end]) 00216 start = end 00217 end += length 00218 self.header.frame_id = str[start:end] 00219 _x = self 00220 start = end 00221 end += 8 00222 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00223 start = end 00224 end += 4 00225 (length,) = _struct_I.unpack(str[start:end]) 00226 start = end 00227 end += length 00228 self.goal_id.id = str[start:end] 00229 _x = self 00230 start = end 00231 end += 2 00232 (_x.goal.request, _x.goal.interactive,) = _struct_bB.unpack(str[start:end]) 00233 self.goal.interactive = bool(self.goal.interactive) 00234 return self 00235 except struct.error as e: 00236 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00237 00238 _struct_I = roslib.message.struct_I 00239 _struct_3I = struct.Struct("<3I") 00240 _struct_2I = struct.Struct("<2I") 00241 _struct_bB = struct.Struct("<bB")