$search
00001 """autogenerated by genmsg_py from MoveArmActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import simple_arm_server.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class MoveArmActionGoal(roslib.message.Message): 00012 _md5sum = "c804e71aefd750c0aebce182acc02bec" 00013 _type = "simple_arm_server/MoveArmActionGoal" 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 MoveArmGoal 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: simple_arm_server/MoveArmGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 std_msgs/Header header 00056 ArmAction[] motions 00057 00058 ================================================================================ 00059 MSG: simple_arm_server/ArmAction 00060 # 00061 # Move arm or adjust gripper 00062 # 00063 00064 byte MOVE_ARM=0 00065 byte MOVE_GRIPPER=1 00066 00067 byte type # move the arm or the gripper? 00068 00069 geometry_msgs/Pose goal # goal for arm 00070 float64 command # width to open gripper 00071 00072 duration move_time 00073 00074 ================================================================================ 00075 MSG: geometry_msgs/Pose 00076 # A representation of pose in free space, composed of postion and orientation. 00077 Point position 00078 Quaternion orientation 00079 00080 ================================================================================ 00081 MSG: geometry_msgs/Point 00082 # This contains the position of a point in free space 00083 float64 x 00084 float64 y 00085 float64 z 00086 00087 ================================================================================ 00088 MSG: geometry_msgs/Quaternion 00089 # This represents an orientation in free space in quaternion form. 00090 00091 float64 x 00092 float64 y 00093 float64 z 00094 float64 w 00095 00096 """ 00097 __slots__ = ['header','goal_id','goal'] 00098 _slot_types = ['Header','actionlib_msgs/GoalID','simple_arm_server/MoveArmGoal'] 00099 00100 def __init__(self, *args, **kwds): 00101 """ 00102 Constructor. Any message fields that are implicitly/explicitly 00103 set to None will be assigned a default value. The recommend 00104 use is keyword arguments as this is more robust to future message 00105 changes. You cannot mix in-order arguments and keyword arguments. 00106 00107 The available fields are: 00108 header,goal_id,goal 00109 00110 @param args: complete set of field values, in .msg order 00111 @param kwds: use keyword arguments corresponding to message field names 00112 to set specific fields. 00113 """ 00114 if args or kwds: 00115 super(MoveArmActionGoal, self).__init__(*args, **kwds) 00116 #message fields cannot be None, assign default values for those that are 00117 if self.header is None: 00118 self.header = std_msgs.msg._Header.Header() 00119 if self.goal_id is None: 00120 self.goal_id = actionlib_msgs.msg.GoalID() 00121 if self.goal is None: 00122 self.goal = simple_arm_server.msg.MoveArmGoal() 00123 else: 00124 self.header = std_msgs.msg._Header.Header() 00125 self.goal_id = actionlib_msgs.msg.GoalID() 00126 self.goal = simple_arm_server.msg.MoveArmGoal() 00127 00128 def _get_types(self): 00129 """ 00130 internal API method 00131 """ 00132 return self._slot_types 00133 00134 def serialize(self, buff): 00135 """ 00136 serialize message into buffer 00137 @param buff: buffer 00138 @type buff: StringIO 00139 """ 00140 try: 00141 _x = self 00142 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00143 _x = self.header.frame_id 00144 length = len(_x) 00145 buff.write(struct.pack('<I%ss'%length, length, _x)) 00146 _x = self 00147 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00148 _x = self.goal_id.id 00149 length = len(_x) 00150 buff.write(struct.pack('<I%ss'%length, length, _x)) 00151 _x = self 00152 buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs)) 00153 _x = self.goal.header.frame_id 00154 length = len(_x) 00155 buff.write(struct.pack('<I%ss'%length, length, _x)) 00156 length = len(self.goal.motions) 00157 buff.write(_struct_I.pack(length)) 00158 for val1 in self.goal.motions: 00159 buff.write(_struct_b.pack(val1.type)) 00160 _v1 = val1.goal 00161 _v2 = _v1.position 00162 _x = _v2 00163 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00164 _v3 = _v1.orientation 00165 _x = _v3 00166 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00167 buff.write(_struct_d.pack(val1.command)) 00168 _v4 = val1.move_time 00169 _x = _v4 00170 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00171 except struct.error as se: self._check_types(se) 00172 except TypeError as te: self._check_types(te) 00173 00174 def deserialize(self, str): 00175 """ 00176 unpack serialized message in str into this message instance 00177 @param str: byte array of serialized message 00178 @type str: str 00179 """ 00180 try: 00181 if self.header is None: 00182 self.header = std_msgs.msg._Header.Header() 00183 if self.goal_id is None: 00184 self.goal_id = actionlib_msgs.msg.GoalID() 00185 if self.goal is None: 00186 self.goal = simple_arm_server.msg.MoveArmGoal() 00187 end = 0 00188 _x = self 00189 start = end 00190 end += 12 00191 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00192 start = end 00193 end += 4 00194 (length,) = _struct_I.unpack(str[start:end]) 00195 start = end 00196 end += length 00197 self.header.frame_id = str[start:end] 00198 _x = self 00199 start = end 00200 end += 8 00201 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 start = end 00206 end += length 00207 self.goal_id.id = str[start:end] 00208 _x = self 00209 start = end 00210 end += 12 00211 (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.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.goal.header.frame_id = str[start:end] 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 self.goal.motions = [] 00222 for i in range(0, length): 00223 val1 = simple_arm_server.msg.ArmAction() 00224 start = end 00225 end += 1 00226 (val1.type,) = _struct_b.unpack(str[start:end]) 00227 _v5 = val1.goal 00228 _v6 = _v5.position 00229 _x = _v6 00230 start = end 00231 end += 24 00232 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00233 _v7 = _v5.orientation 00234 _x = _v7 00235 start = end 00236 end += 32 00237 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00238 start = end 00239 end += 8 00240 (val1.command,) = _struct_d.unpack(str[start:end]) 00241 _v8 = val1.move_time 00242 _x = _v8 00243 start = end 00244 end += 8 00245 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00246 self.goal.motions.append(val1) 00247 return self 00248 except struct.error as e: 00249 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00250 00251 00252 def serialize_numpy(self, buff, numpy): 00253 """ 00254 serialize message with numpy array types into buffer 00255 @param buff: buffer 00256 @type buff: StringIO 00257 @param numpy: numpy python module 00258 @type numpy module 00259 """ 00260 try: 00261 _x = self 00262 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00263 _x = self.header.frame_id 00264 length = len(_x) 00265 buff.write(struct.pack('<I%ss'%length, length, _x)) 00266 _x = self 00267 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00268 _x = self.goal_id.id 00269 length = len(_x) 00270 buff.write(struct.pack('<I%ss'%length, length, _x)) 00271 _x = self 00272 buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs)) 00273 _x = self.goal.header.frame_id 00274 length = len(_x) 00275 buff.write(struct.pack('<I%ss'%length, length, _x)) 00276 length = len(self.goal.motions) 00277 buff.write(_struct_I.pack(length)) 00278 for val1 in self.goal.motions: 00279 buff.write(_struct_b.pack(val1.type)) 00280 _v9 = val1.goal 00281 _v10 = _v9.position 00282 _x = _v10 00283 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00284 _v11 = _v9.orientation 00285 _x = _v11 00286 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00287 buff.write(_struct_d.pack(val1.command)) 00288 _v12 = val1.move_time 00289 _x = _v12 00290 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00291 except struct.error as se: self._check_types(se) 00292 except TypeError as te: self._check_types(te) 00293 00294 def deserialize_numpy(self, str, numpy): 00295 """ 00296 unpack serialized message in str into this message instance using numpy for array types 00297 @param str: byte array of serialized message 00298 @type str: str 00299 @param numpy: numpy python module 00300 @type numpy: module 00301 """ 00302 try: 00303 if self.header is None: 00304 self.header = std_msgs.msg._Header.Header() 00305 if self.goal_id is None: 00306 self.goal_id = actionlib_msgs.msg.GoalID() 00307 if self.goal is None: 00308 self.goal = simple_arm_server.msg.MoveArmGoal() 00309 end = 0 00310 _x = self 00311 start = end 00312 end += 12 00313 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00314 start = end 00315 end += 4 00316 (length,) = _struct_I.unpack(str[start:end]) 00317 start = end 00318 end += length 00319 self.header.frame_id = str[start:end] 00320 _x = self 00321 start = end 00322 end += 8 00323 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 start = end 00328 end += length 00329 self.goal_id.id = str[start:end] 00330 _x = self 00331 start = end 00332 end += 12 00333 (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00334 start = end 00335 end += 4 00336 (length,) = _struct_I.unpack(str[start:end]) 00337 start = end 00338 end += length 00339 self.goal.header.frame_id = str[start:end] 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 self.goal.motions = [] 00344 for i in range(0, length): 00345 val1 = simple_arm_server.msg.ArmAction() 00346 start = end 00347 end += 1 00348 (val1.type,) = _struct_b.unpack(str[start:end]) 00349 _v13 = val1.goal 00350 _v14 = _v13.position 00351 _x = _v14 00352 start = end 00353 end += 24 00354 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00355 _v15 = _v13.orientation 00356 _x = _v15 00357 start = end 00358 end += 32 00359 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00360 start = end 00361 end += 8 00362 (val1.command,) = _struct_d.unpack(str[start:end]) 00363 _v16 = val1.move_time 00364 _x = _v16 00365 start = end 00366 end += 8 00367 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00368 self.goal.motions.append(val1) 00369 return self 00370 except struct.error as e: 00371 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00372 00373 _struct_I = roslib.message.struct_I 00374 _struct_b = struct.Struct("<b") 00375 _struct_d = struct.Struct("<d") 00376 _struct_2i = struct.Struct("<2i") 00377 _struct_3I = struct.Struct("<3I") 00378 _struct_4d = struct.Struct("<4d") 00379 _struct_2I = struct.Struct("<2I") 00380 _struct_3d = struct.Struct("<3d")