$search
00001 """autogenerated by genmsg_py from EECartImpedActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import ee_cart_imped_msgs.msg 00006 import geometry_msgs.msg 00007 import roslib.rostime 00008 import actionlib_msgs.msg 00009 import std_msgs.msg 00010 00011 class EECartImpedActionGoal(roslib.message.Message): 00012 _md5sum = "09251e687b897c24590030b27467eb9f" 00013 _type = "ee_cart_imped_msgs/EECartImpedActionGoal" 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 EECartImpedGoal 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: ee_cart_imped_msgs/EECartImpedGoal 00054 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00055 #goal definition 00056 Header header 00057 ee_cart_imped_msgs/StiffPoint[] trajectory 00058 00059 ================================================================================ 00060 MSG: ee_cart_imped_msgs/StiffPoint 00061 Header header 00062 #The pose to achieve in the stiffness directions 00063 geometry_msgs/Pose pose 00064 #Wrench or stiffness for each dimension 00065 geometry_msgs/Wrench wrench_or_stiffness 00066 #The following are True if a force/torque should 00067 #be exerted and False if a stiffness should be used. 00068 bool isForceX 00069 bool isForceY 00070 bool isForceZ 00071 bool isTorqueX 00072 bool isTorqueY 00073 bool isTorqueZ 00074 #The time from the start of the trajectory that this 00075 #point should be achieved. 00076 duration time_from_start 00077 ================================================================================ 00078 MSG: geometry_msgs/Pose 00079 # A representation of pose in free space, composed of postion and orientation. 00080 Point position 00081 Quaternion orientation 00082 00083 ================================================================================ 00084 MSG: geometry_msgs/Point 00085 # This contains the position of a point in free space 00086 float64 x 00087 float64 y 00088 float64 z 00089 00090 ================================================================================ 00091 MSG: geometry_msgs/Quaternion 00092 # This represents an orientation in free space in quaternion form. 00093 00094 float64 x 00095 float64 y 00096 float64 z 00097 float64 w 00098 00099 ================================================================================ 00100 MSG: geometry_msgs/Wrench 00101 # This represents force in free space, seperated into 00102 # it's linear and angular parts. 00103 Vector3 force 00104 Vector3 torque 00105 00106 ================================================================================ 00107 MSG: geometry_msgs/Vector3 00108 # This represents a vector in free space. 00109 00110 float64 x 00111 float64 y 00112 float64 z 00113 """ 00114 __slots__ = ['header','goal_id','goal'] 00115 _slot_types = ['Header','actionlib_msgs/GoalID','ee_cart_imped_msgs/EECartImpedGoal'] 00116 00117 def __init__(self, *args, **kwds): 00118 """ 00119 Constructor. Any message fields that are implicitly/explicitly 00120 set to None will be assigned a default value. The recommend 00121 use is keyword arguments as this is more robust to future message 00122 changes. You cannot mix in-order arguments and keyword arguments. 00123 00124 The available fields are: 00125 header,goal_id,goal 00126 00127 @param args: complete set of field values, in .msg order 00128 @param kwds: use keyword arguments corresponding to message field names 00129 to set specific fields. 00130 """ 00131 if args or kwds: 00132 super(EECartImpedActionGoal, self).__init__(*args, **kwds) 00133 #message fields cannot be None, assign default values for those that are 00134 if self.header is None: 00135 self.header = std_msgs.msg._Header.Header() 00136 if self.goal_id is None: 00137 self.goal_id = actionlib_msgs.msg.GoalID() 00138 if self.goal is None: 00139 self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal() 00140 else: 00141 self.header = std_msgs.msg._Header.Header() 00142 self.goal_id = actionlib_msgs.msg.GoalID() 00143 self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal() 00144 00145 def _get_types(self): 00146 """ 00147 internal API method 00148 """ 00149 return self._slot_types 00150 00151 def serialize(self, buff): 00152 """ 00153 serialize message into buffer 00154 @param buff: buffer 00155 @type buff: StringIO 00156 """ 00157 try: 00158 _x = self 00159 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00160 _x = self.header.frame_id 00161 length = len(_x) 00162 buff.write(struct.pack('<I%ss'%length, length, _x)) 00163 _x = self 00164 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00165 _x = self.goal_id.id 00166 length = len(_x) 00167 buff.write(struct.pack('<I%ss'%length, length, _x)) 00168 _x = self 00169 buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs)) 00170 _x = self.goal.header.frame_id 00171 length = len(_x) 00172 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 length = len(self.goal.trajectory) 00174 buff.write(_struct_I.pack(length)) 00175 for val1 in self.goal.trajectory: 00176 _v1 = val1.header 00177 buff.write(_struct_I.pack(_v1.seq)) 00178 _v2 = _v1.stamp 00179 _x = _v2 00180 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00181 _x = _v1.frame_id 00182 length = len(_x) 00183 buff.write(struct.pack('<I%ss'%length, length, _x)) 00184 _v3 = val1.pose 00185 _v4 = _v3.position 00186 _x = _v4 00187 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00188 _v5 = _v3.orientation 00189 _x = _v5 00190 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00191 _v6 = val1.wrench_or_stiffness 00192 _v7 = _v6.force 00193 _x = _v7 00194 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00195 _v8 = _v6.torque 00196 _x = _v8 00197 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00198 _x = val1 00199 buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ)) 00200 _v9 = val1.time_from_start 00201 _x = _v9 00202 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00203 except struct.error as se: self._check_types(se) 00204 except TypeError as te: self._check_types(te) 00205 00206 def deserialize(self, str): 00207 """ 00208 unpack serialized message in str into this message instance 00209 @param str: byte array of serialized message 00210 @type str: str 00211 """ 00212 try: 00213 if self.header is None: 00214 self.header = std_msgs.msg._Header.Header() 00215 if self.goal_id is None: 00216 self.goal_id = actionlib_msgs.msg.GoalID() 00217 if self.goal is None: 00218 self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal() 00219 end = 0 00220 _x = self 00221 start = end 00222 end += 12 00223 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00224 start = end 00225 end += 4 00226 (length,) = _struct_I.unpack(str[start:end]) 00227 start = end 00228 end += length 00229 self.header.frame_id = str[start:end] 00230 _x = self 00231 start = end 00232 end += 8 00233 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 self.goal_id.id = str[start:end] 00240 _x = self 00241 start = end 00242 end += 12 00243 (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00244 start = end 00245 end += 4 00246 (length,) = _struct_I.unpack(str[start:end]) 00247 start = end 00248 end += length 00249 self.goal.header.frame_id = str[start:end] 00250 start = end 00251 end += 4 00252 (length,) = _struct_I.unpack(str[start:end]) 00253 self.goal.trajectory = [] 00254 for i in range(0, length): 00255 val1 = ee_cart_imped_msgs.msg.StiffPoint() 00256 _v10 = val1.header 00257 start = end 00258 end += 4 00259 (_v10.seq,) = _struct_I.unpack(str[start:end]) 00260 _v11 = _v10.stamp 00261 _x = _v11 00262 start = end 00263 end += 8 00264 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end]) 00265 start = end 00266 end += 4 00267 (length,) = _struct_I.unpack(str[start:end]) 00268 start = end 00269 end += length 00270 _v10.frame_id = str[start:end] 00271 _v12 = val1.pose 00272 _v13 = _v12.position 00273 _x = _v13 00274 start = end 00275 end += 24 00276 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00277 _v14 = _v12.orientation 00278 _x = _v14 00279 start = end 00280 end += 32 00281 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00282 _v15 = val1.wrench_or_stiffness 00283 _v16 = _v15.force 00284 _x = _v16 00285 start = end 00286 end += 24 00287 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00288 _v17 = _v15.torque 00289 _x = _v17 00290 start = end 00291 end += 24 00292 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00293 _x = val1 00294 start = end 00295 end += 6 00296 (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end]) 00297 val1.isForceX = bool(val1.isForceX) 00298 val1.isForceY = bool(val1.isForceY) 00299 val1.isForceZ = bool(val1.isForceZ) 00300 val1.isTorqueX = bool(val1.isTorqueX) 00301 val1.isTorqueY = bool(val1.isTorqueY) 00302 val1.isTorqueZ = bool(val1.isTorqueZ) 00303 _v18 = val1.time_from_start 00304 _x = _v18 00305 start = end 00306 end += 8 00307 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00308 self.goal.trajectory.append(val1) 00309 return self 00310 except struct.error as e: 00311 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00312 00313 00314 def serialize_numpy(self, buff, numpy): 00315 """ 00316 serialize message with numpy array types into buffer 00317 @param buff: buffer 00318 @type buff: StringIO 00319 @param numpy: numpy python module 00320 @type numpy module 00321 """ 00322 try: 00323 _x = self 00324 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00325 _x = self.header.frame_id 00326 length = len(_x) 00327 buff.write(struct.pack('<I%ss'%length, length, _x)) 00328 _x = self 00329 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00330 _x = self.goal_id.id 00331 length = len(_x) 00332 buff.write(struct.pack('<I%ss'%length, length, _x)) 00333 _x = self 00334 buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs)) 00335 _x = self.goal.header.frame_id 00336 length = len(_x) 00337 buff.write(struct.pack('<I%ss'%length, length, _x)) 00338 length = len(self.goal.trajectory) 00339 buff.write(_struct_I.pack(length)) 00340 for val1 in self.goal.trajectory: 00341 _v19 = val1.header 00342 buff.write(_struct_I.pack(_v19.seq)) 00343 _v20 = _v19.stamp 00344 _x = _v20 00345 buff.write(_struct_2I.pack(_x.secs, _x.nsecs)) 00346 _x = _v19.frame_id 00347 length = len(_x) 00348 buff.write(struct.pack('<I%ss'%length, length, _x)) 00349 _v21 = val1.pose 00350 _v22 = _v21.position 00351 _x = _v22 00352 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00353 _v23 = _v21.orientation 00354 _x = _v23 00355 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00356 _v24 = val1.wrench_or_stiffness 00357 _v25 = _v24.force 00358 _x = _v25 00359 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00360 _v26 = _v24.torque 00361 _x = _v26 00362 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00363 _x = val1 00364 buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ)) 00365 _v27 = val1.time_from_start 00366 _x = _v27 00367 buff.write(_struct_2i.pack(_x.secs, _x.nsecs)) 00368 except struct.error as se: self._check_types(se) 00369 except TypeError as te: self._check_types(te) 00370 00371 def deserialize_numpy(self, str, numpy): 00372 """ 00373 unpack serialized message in str into this message instance using numpy for array types 00374 @param str: byte array of serialized message 00375 @type str: str 00376 @param numpy: numpy python module 00377 @type numpy: module 00378 """ 00379 try: 00380 if self.header is None: 00381 self.header = std_msgs.msg._Header.Header() 00382 if self.goal_id is None: 00383 self.goal_id = actionlib_msgs.msg.GoalID() 00384 if self.goal is None: 00385 self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal() 00386 end = 0 00387 _x = self 00388 start = end 00389 end += 12 00390 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 start = end 00395 end += length 00396 self.header.frame_id = str[start:end] 00397 _x = self 00398 start = end 00399 end += 8 00400 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00401 start = end 00402 end += 4 00403 (length,) = _struct_I.unpack(str[start:end]) 00404 start = end 00405 end += length 00406 self.goal_id.id = str[start:end] 00407 _x = self 00408 start = end 00409 end += 12 00410 (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00411 start = end 00412 end += 4 00413 (length,) = _struct_I.unpack(str[start:end]) 00414 start = end 00415 end += length 00416 self.goal.header.frame_id = str[start:end] 00417 start = end 00418 end += 4 00419 (length,) = _struct_I.unpack(str[start:end]) 00420 self.goal.trajectory = [] 00421 for i in range(0, length): 00422 val1 = ee_cart_imped_msgs.msg.StiffPoint() 00423 _v28 = val1.header 00424 start = end 00425 end += 4 00426 (_v28.seq,) = _struct_I.unpack(str[start:end]) 00427 _v29 = _v28.stamp 00428 _x = _v29 00429 start = end 00430 end += 8 00431 (_x.secs, _x.nsecs,) = _struct_2I.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 _v28.frame_id = str[start:end] 00438 _v30 = val1.pose 00439 _v31 = _v30.position 00440 _x = _v31 00441 start = end 00442 end += 24 00443 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00444 _v32 = _v30.orientation 00445 _x = _v32 00446 start = end 00447 end += 32 00448 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00449 _v33 = val1.wrench_or_stiffness 00450 _v34 = _v33.force 00451 _x = _v34 00452 start = end 00453 end += 24 00454 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00455 _v35 = _v33.torque 00456 _x = _v35 00457 start = end 00458 end += 24 00459 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00460 _x = val1 00461 start = end 00462 end += 6 00463 (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end]) 00464 val1.isForceX = bool(val1.isForceX) 00465 val1.isForceY = bool(val1.isForceY) 00466 val1.isForceZ = bool(val1.isForceZ) 00467 val1.isTorqueX = bool(val1.isTorqueX) 00468 val1.isTorqueY = bool(val1.isTorqueY) 00469 val1.isTorqueZ = bool(val1.isTorqueZ) 00470 _v36 = val1.time_from_start 00471 _x = _v36 00472 start = end 00473 end += 8 00474 (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end]) 00475 self.goal.trajectory.append(val1) 00476 return self 00477 except struct.error as e: 00478 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00479 00480 _struct_I = roslib.message.struct_I 00481 _struct_6B = struct.Struct("<6B") 00482 _struct_2i = struct.Struct("<2i") 00483 _struct_3I = struct.Struct("<3I") 00484 _struct_4d = struct.Struct("<4d") 00485 _struct_2I = struct.Struct("<2I") 00486 _struct_3d = struct.Struct("<3d")