$search
00001 """autogenerated by genmsg_py from FindBasePoseActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import find_base_pose.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class FindBasePoseActionGoal(roslib.message.Message): 00012 _md5sum = "bf89a80b1cd87667297de97513bd63c2" 00013 _type = "find_base_pose/FindBasePoseActionGoal" 00014 _has_header = True #flag to mark the presence of a Header object 00015 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00016 00017 Header header 00018 actionlib_msgs/GoalID goal_id 00019 FindBasePoseGoal goal 00020 00021 ================================================================================ 00022 MSG: std_msgs/Header 00023 # Standard metadata for higher-level stamped data types. 00024 # This is generally used to communicate timestamped data 00025 # in a particular coordinate frame. 00026 # 00027 # sequence ID: consecutively increasing ID 00028 uint32 seq 00029 #Two-integer timestamp that is expressed as: 00030 # * stamp.secs: seconds (stamp_secs) since epoch 00031 # * stamp.nsecs: nanoseconds since stamp_secs 00032 # time-handling sugar is provided by the client library 00033 time stamp 00034 #Frame this data is associated with 00035 # 0: no frame 00036 # 1: global frame 00037 string frame_id 00038 00039 ================================================================================ 00040 MSG: actionlib_msgs/GoalID 00041 # The stamp should store the time at which this goal was requested. 00042 # It is used by an action server when it tries to preempt all 00043 # goals that were requested before a certain time 00044 time stamp 00045 00046 # The id provides a way to associate feedback and 00047 # result message with specific goal requests. The id 00048 # specified must be unique. 00049 string id 00050 00051 00052 ================================================================================ 00053 MSG: find_base_pose/FindBasePoseGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 geometry_msgs/PoseStamped[] target_poses 00056 std_msgs/Int32[] arm 00057 00058 ================================================================================ 00059 MSG: geometry_msgs/PoseStamped 00060 # A Pose with reference coordinate frame and timestamp 00061 Header header 00062 Pose pose 00063 00064 ================================================================================ 00065 MSG: geometry_msgs/Pose 00066 # A representation of pose in free space, composed of postion and orientation. 00067 Point position 00068 Quaternion orientation 00069 00070 ================================================================================ 00071 MSG: geometry_msgs/Point 00072 # This contains the position of a point in free space 00073 float64 x 00074 float64 y 00075 float64 z 00076 00077 ================================================================================ 00078 MSG: geometry_msgs/Quaternion 00079 # This represents an orientation in free space in quaternion form. 00080 00081 float64 x 00082 float64 y 00083 float64 z 00084 float64 w 00085 00086 ================================================================================ 00087 MSG: std_msgs/Int32 00088 int32 data 00089 """ 00090 __slots__ = ['header','goal_id','goal'] 00091 _slot_types = ['Header','actionlib_msgs/GoalID','find_base_pose/FindBasePoseGoal'] 00092 00093 def __init__(self, *args, **kwds): 00094 """ 00095 Constructor. Any message fields that are implicitly/explicitly 00096 set to None will be assigned a default value. The recommend 00097 use is keyword arguments as this is more robust to future message 00098 changes. You cannot mix in-order arguments and keyword arguments. 00099 00100 The available fields are: 00101 header,goal_id,goal 00102 00103 @param args: complete set of field values, in .msg order 00104 @param kwds: use keyword arguments corresponding to message field names 00105 to set specific fields. 00106 """ 00107 if args or kwds: 00108 super(FindBasePoseActionGoal, self).__init__(*args, **kwds) 00109 #message fields cannot be None, assign default values for those that are 00110 if self.header is None: 00111 self.header = std_msgs.msg._Header.Header() 00112 if self.goal_id is None: 00113 self.goal_id = actionlib_msgs.msg.GoalID() 00114 if self.goal is None: 00115 self.goal = find_base_pose.msg.FindBasePoseGoal() 00116 else: 00117 self.header = std_msgs.msg._Header.Header() 00118 self.goal_id = actionlib_msgs.msg.GoalID() 00119 self.goal = find_base_pose.msg.FindBasePoseGoal() 00120 00121 def _get_types(self): 00122 """ 00123 internal API method 00124 """ 00125 return self._slot_types 00126 00127 def serialize(self, buff): 00128 """ 00129 serialize message into buffer 00130 @param buff: buffer 00131 @type buff: StringIO 00132 """ 00133 try: 00134 _x = self 00135 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00136 _x = self.header.frame_id 00137 length = len(_x) 00138 buff.write(struct.pack('<I%ss'%length, length, _x)) 00139 _x = self 00140 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00141 _x = self.goal_id.id 00142 length = len(_x) 00143 buff.write(struct.pack('<I%ss'%length, length, _x)) 00144 length = len(self.goal.target_poses) 00145 buff.write(_struct_I.pack(length)) 00146 for val1 in self.goal.target_poses: 00147 _v1 = val1.header 00148 buff.write(_struct_I.pack(_v1.seq)) 00149 _v2 = _v1.stamp 00150 _x = _v2 00151 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00152 _x = _v1.frame_id 00153 length = len(_x) 00154 buff.write(struct.pack('<I%ss'%length, length, _x)) 00155 _v3 = val1.pose 00156 _v4 = _v3.position 00157 _x = _v4 00158 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00159 _v5 = _v3.orientation 00160 _x = _v5 00161 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00162 length = len(self.goal.arm) 00163 buff.write(_struct_I.pack(length)) 00164 for val1 in self.goal.arm: 00165 buff.write(_struct_i.pack(val1.data)) 00166 except struct.error as se: self._check_types(se) 00167 except TypeError as te: self._check_types(te) 00168 00169 def deserialize(self, str): 00170 """ 00171 unpack serialized message in str into this message instance 00172 @param str: byte array of serialized message 00173 @type str: str 00174 """ 00175 try: 00176 if self.header is None: 00177 self.header = std_msgs.msg._Header.Header() 00178 if self.goal_id is None: 00179 self.goal_id = actionlib_msgs.msg.GoalID() 00180 if self.goal is None: 00181 self.goal = find_base_pose.msg.FindBasePoseGoal() 00182 end = 0 00183 _x = self 00184 start = end 00185 end += 12 00186 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00187 start = end 00188 end += 4 00189 (length,) = _struct_I.unpack(str[start:end]) 00190 start = end 00191 end += length 00192 self.header.frame_id = str[start:end] 00193 _x = self 00194 start = end 00195 end += 8 00196 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00197 start = end 00198 end += 4 00199 (length,) = _struct_I.unpack(str[start:end]) 00200 start = end 00201 end += length 00202 self.goal_id.id = str[start:end] 00203 start = end 00204 end += 4 00205 (length,) = _struct_I.unpack(str[start:end]) 00206 self.goal.target_poses = [] 00207 for i in range(0, length): 00208 val1 = geometry_msgs.msg.PoseStamped() 00209 _v6 = val1.header 00210 start = end 00211 end += 4 00212 (_v6.seq,) = _struct_I.unpack(str[start:end]) 00213 _v7 = _v6.stamp 00214 _x = _v7 00215 start = end 00216 end += 8 00217 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 start = end 00222 end += length 00223 _v6.frame_id = str[start:end] 00224 _v8 = val1.pose 00225 _v9 = _v8.position 00226 _x = _v9 00227 start = end 00228 end += 24 00229 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00230 _v10 = _v8.orientation 00231 _x = _v10 00232 start = end 00233 end += 32 00234 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00235 self.goal.target_poses.append(val1) 00236 start = end 00237 end += 4 00238 (length,) = _struct_I.unpack(str[start:end]) 00239 self.goal.arm = [] 00240 for i in range(0, length): 00241 val1 = std_msgs.msg.Int32() 00242 start = end 00243 end += 4 00244 (val1.data,) = _struct_i.unpack(str[start:end]) 00245 self.goal.arm.append(val1) 00246 return self 00247 except struct.error as e: 00248 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00249 00250 00251 def serialize_numpy(self, buff, numpy): 00252 """ 00253 serialize message with numpy array types into buffer 00254 @param buff: buffer 00255 @type buff: StringIO 00256 @param numpy: numpy python module 00257 @type numpy module 00258 """ 00259 try: 00260 _x = self 00261 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00262 _x = self.header.frame_id 00263 length = len(_x) 00264 buff.write(struct.pack('<I%ss'%length, length, _x)) 00265 _x = self 00266 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00267 _x = self.goal_id.id 00268 length = len(_x) 00269 buff.write(struct.pack('<I%ss'%length, length, _x)) 00270 length = len(self.goal.target_poses) 00271 buff.write(_struct_I.pack(length)) 00272 for val1 in self.goal.target_poses: 00273 _v11 = val1.header 00274 buff.write(_struct_I.pack(_v11.seq)) 00275 _v12 = _v11.stamp 00276 _x = _v12 00277 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00278 _x = _v11.frame_id 00279 length = len(_x) 00280 buff.write(struct.pack('<I%ss'%length, length, _x)) 00281 _v13 = val1.pose 00282 _v14 = _v13.position 00283 _x = _v14 00284 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00285 _v15 = _v13.orientation 00286 _x = _v15 00287 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00288 length = len(self.goal.arm) 00289 buff.write(_struct_I.pack(length)) 00290 for val1 in self.goal.arm: 00291 buff.write(_struct_i.pack(val1.data)) 00292 except struct.error as se: self._check_types(se) 00293 except TypeError as te: self._check_types(te) 00294 00295 def deserialize_numpy(self, str, numpy): 00296 """ 00297 unpack serialized message in str into this message instance using numpy for array types 00298 @param str: byte array of serialized message 00299 @type str: str 00300 @param numpy: numpy python module 00301 @type numpy: module 00302 """ 00303 try: 00304 if self.header is None: 00305 self.header = std_msgs.msg._Header.Header() 00306 if self.goal_id is None: 00307 self.goal_id = actionlib_msgs.msg.GoalID() 00308 if self.goal is None: 00309 self.goal = find_base_pose.msg.FindBasePoseGoal() 00310 end = 0 00311 _x = self 00312 start = end 00313 end += 12 00314 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00315 start = end 00316 end += 4 00317 (length,) = _struct_I.unpack(str[start:end]) 00318 start = end 00319 end += length 00320 self.header.frame_id = str[start:end] 00321 _x = self 00322 start = end 00323 end += 8 00324 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00325 start = end 00326 end += 4 00327 (length,) = _struct_I.unpack(str[start:end]) 00328 start = end 00329 end += length 00330 self.goal_id.id = str[start:end] 00331 start = end 00332 end += 4 00333 (length,) = _struct_I.unpack(str[start:end]) 00334 self.goal.target_poses = [] 00335 for i in range(0, length): 00336 val1 = geometry_msgs.msg.PoseStamped() 00337 _v16 = val1.header 00338 start = end 00339 end += 4 00340 (_v16.seq,) = _struct_I.unpack(str[start:end]) 00341 _v17 = _v16.stamp 00342 _x = _v17 00343 start = end 00344 end += 8 00345 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00346 start = end 00347 end += 4 00348 (length,) = _struct_I.unpack(str[start:end]) 00349 start = end 00350 end += length 00351 _v16.frame_id = str[start:end] 00352 _v18 = val1.pose 00353 _v19 = _v18.position 00354 _x = _v19 00355 start = end 00356 end += 24 00357 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00358 _v20 = _v18.orientation 00359 _x = _v20 00360 start = end 00361 end += 32 00362 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00363 self.goal.target_poses.append(val1) 00364 start = end 00365 end += 4 00366 (length,) = _struct_I.unpack(str[start:end]) 00367 self.goal.arm = [] 00368 for i in range(0, length): 00369 val1 = std_msgs.msg.Int32() 00370 start = end 00371 end += 4 00372 (val1.data,) = _struct_i.unpack(str[start:end]) 00373 self.goal.arm.append(val1) 00374 return self 00375 except struct.error as e: 00376 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00377 00378 _struct_I = roslib.message.struct_I 00379 _struct_i = struct.Struct("<i") 00380 _struct_3I = struct.Struct("<3I") 00381 _struct_4d = struct.Struct("<4d") 00382 _struct_2I = struct.Struct("<2I") 00383 _struct_3d = struct.Struct("<3d")