_EECartImpedActionGoal.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ee_cart_imped_msgs/EECartImpedActionGoal.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import ee_cart_imped_msgs.msg
00008 import geometry_msgs.msg
00009 import genpy
00010 import actionlib_msgs.msg
00011 import std_msgs.msg
00012 
00013 class EECartImpedActionGoal(genpy.Message):
00014   _md5sum = "09251e687b897c24590030b27467eb9f"
00015   _type = "ee_cart_imped_msgs/EECartImpedActionGoal"
00016   _has_header = True #flag to mark the presence of a Header object
00017   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00018 
00019 Header header
00020 actionlib_msgs/GoalID goal_id
00021 EECartImpedGoal goal
00022 
00023 ================================================================================
00024 MSG: std_msgs/Header
00025 # Standard metadata for higher-level stamped data types.
00026 # This is generally used to communicate timestamped data 
00027 # in a particular coordinate frame.
00028 # 
00029 # sequence ID: consecutively increasing ID 
00030 uint32 seq
00031 #Two-integer timestamp that is expressed as:
00032 # * stamp.secs: seconds (stamp_secs) since epoch
00033 # * stamp.nsecs: nanoseconds since stamp_secs
00034 # time-handling sugar is provided by the client library
00035 time stamp
00036 #Frame this data is associated with
00037 # 0: no frame
00038 # 1: global frame
00039 string frame_id
00040 
00041 ================================================================================
00042 MSG: actionlib_msgs/GoalID
00043 # The stamp should store the time at which this goal was requested.
00044 # It is used by an action server when it tries to preempt all
00045 # goals that were requested before a certain time
00046 time stamp
00047 
00048 # The id provides a way to associate feedback and
00049 # result message with specific goal requests. The id
00050 # specified must be unique.
00051 string id
00052 
00053 
00054 ================================================================================
00055 MSG: ee_cart_imped_msgs/EECartImpedGoal
00056 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00057 #goal definition
00058 Header header
00059 ee_cart_imped_msgs/StiffPoint[] trajectory
00060 
00061 ================================================================================
00062 MSG: ee_cart_imped_msgs/StiffPoint
00063 Header header
00064 #The pose to achieve in the stiffness directions
00065 geometry_msgs/Pose pose
00066 #Wrench or stiffness for each dimension
00067 geometry_msgs/Wrench wrench_or_stiffness
00068 #The following are True if a force/torque should
00069 #be exerted and False if a stiffness should be used.
00070 bool isForceX
00071 bool isForceY
00072 bool isForceZ
00073 bool isTorqueX
00074 bool isTorqueY
00075 bool isTorqueZ
00076 #The time from the start of the trajectory that this
00077 #point should be achieved.
00078 duration time_from_start
00079 ================================================================================
00080 MSG: geometry_msgs/Pose
00081 # A representation of pose in free space, composed of postion and orientation. 
00082 Point position
00083 Quaternion orientation
00084 
00085 ================================================================================
00086 MSG: geometry_msgs/Point
00087 # This contains the position of a point in free space
00088 float64 x
00089 float64 y
00090 float64 z
00091 
00092 ================================================================================
00093 MSG: geometry_msgs/Quaternion
00094 # This represents an orientation in free space in quaternion form.
00095 
00096 float64 x
00097 float64 y
00098 float64 z
00099 float64 w
00100 
00101 ================================================================================
00102 MSG: geometry_msgs/Wrench
00103 # This represents force in free space, seperated into 
00104 # it's linear and angular parts.  
00105 Vector3  force
00106 Vector3  torque
00107 
00108 ================================================================================
00109 MSG: geometry_msgs/Vector3
00110 # This represents a vector in free space. 
00111 
00112 float64 x
00113 float64 y
00114 float64 z
00115 """
00116   __slots__ = ['header','goal_id','goal']
00117   _slot_types = ['std_msgs/Header','actionlib_msgs/GoalID','ee_cart_imped_msgs/EECartImpedGoal']
00118 
00119   def __init__(self, *args, **kwds):
00120     """
00121     Constructor. Any message fields that are implicitly/explicitly
00122     set to None will be assigned a default value. The recommend
00123     use is keyword arguments as this is more robust to future message
00124     changes.  You cannot mix in-order arguments and keyword arguments.
00125 
00126     The available fields are:
00127        header,goal_id,goal
00128 
00129     :param args: complete set of field values, in .msg order
00130     :param kwds: use keyword arguments corresponding to message field names
00131     to set specific fields.
00132     """
00133     if args or kwds:
00134       super(EECartImpedActionGoal, self).__init__(*args, **kwds)
00135       #message fields cannot be None, assign default values for those that are
00136       if self.header is None:
00137         self.header = std_msgs.msg.Header()
00138       if self.goal_id is None:
00139         self.goal_id = actionlib_msgs.msg.GoalID()
00140       if self.goal is None:
00141         self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal()
00142     else:
00143       self.header = std_msgs.msg.Header()
00144       self.goal_id = actionlib_msgs.msg.GoalID()
00145       self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal()
00146 
00147   def _get_types(self):
00148     """
00149     internal API method
00150     """
00151     return self._slot_types
00152 
00153   def serialize(self, buff):
00154     """
00155     serialize message into buffer
00156     :param buff: buffer, ``StringIO``
00157     """
00158     try:
00159       _x = self
00160       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00161       _x = self.header.frame_id
00162       length = len(_x)
00163       if python3 or type(_x) == unicode:
00164         _x = _x.encode('utf-8')
00165         length = len(_x)
00166       buff.write(struct.pack('<I%ss'%length, length, _x))
00167       _x = self
00168       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00169       _x = self.goal_id.id
00170       length = len(_x)
00171       if python3 or type(_x) == unicode:
00172         _x = _x.encode('utf-8')
00173         length = len(_x)
00174       buff.write(struct.pack('<I%ss'%length, length, _x))
00175       _x = self
00176       buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs))
00177       _x = self.goal.header.frame_id
00178       length = len(_x)
00179       if python3 or type(_x) == unicode:
00180         _x = _x.encode('utf-8')
00181         length = len(_x)
00182       buff.write(struct.pack('<I%ss'%length, length, _x))
00183       length = len(self.goal.trajectory)
00184       buff.write(_struct_I.pack(length))
00185       for val1 in self.goal.trajectory:
00186         _v1 = val1.header
00187         buff.write(_struct_I.pack(_v1.seq))
00188         _v2 = _v1.stamp
00189         _x = _v2
00190         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00191         _x = _v1.frame_id
00192         length = len(_x)
00193         if python3 or type(_x) == unicode:
00194           _x = _x.encode('utf-8')
00195           length = len(_x)
00196         buff.write(struct.pack('<I%ss'%length, length, _x))
00197         _v3 = val1.pose
00198         _v4 = _v3.position
00199         _x = _v4
00200         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00201         _v5 = _v3.orientation
00202         _x = _v5
00203         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00204         _v6 = val1.wrench_or_stiffness
00205         _v7 = _v6.force
00206         _x = _v7
00207         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00208         _v8 = _v6.torque
00209         _x = _v8
00210         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00211         _x = val1
00212         buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ))
00213         _v9 = val1.time_from_start
00214         _x = _v9
00215         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00216     except struct.error as se: self._check_types(se)
00217     except TypeError as te: self._check_types(te)
00218 
00219   def deserialize(self, str):
00220     """
00221     unpack serialized message in str into this message instance
00222     :param str: byte array of serialized message, ``str``
00223     """
00224     try:
00225       if self.header is None:
00226         self.header = std_msgs.msg.Header()
00227       if self.goal_id is None:
00228         self.goal_id = actionlib_msgs.msg.GoalID()
00229       if self.goal is None:
00230         self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal()
00231       end = 0
00232       _x = self
00233       start = end
00234       end += 12
00235       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00236       start = end
00237       end += 4
00238       (length,) = _struct_I.unpack(str[start:end])
00239       start = end
00240       end += length
00241       if python3:
00242         self.header.frame_id = str[start:end].decode('utf-8')
00243       else:
00244         self.header.frame_id = str[start:end]
00245       _x = self
00246       start = end
00247       end += 8
00248       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00249       start = end
00250       end += 4
00251       (length,) = _struct_I.unpack(str[start:end])
00252       start = end
00253       end += length
00254       if python3:
00255         self.goal_id.id = str[start:end].decode('utf-8')
00256       else:
00257         self.goal_id.id = str[start:end]
00258       _x = self
00259       start = end
00260       end += 12
00261       (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00262       start = end
00263       end += 4
00264       (length,) = _struct_I.unpack(str[start:end])
00265       start = end
00266       end += length
00267       if python3:
00268         self.goal.header.frame_id = str[start:end].decode('utf-8')
00269       else:
00270         self.goal.header.frame_id = str[start:end]
00271       start = end
00272       end += 4
00273       (length,) = _struct_I.unpack(str[start:end])
00274       self.goal.trajectory = []
00275       for i in range(0, length):
00276         val1 = ee_cart_imped_msgs.msg.StiffPoint()
00277         _v10 = val1.header
00278         start = end
00279         end += 4
00280         (_v10.seq,) = _struct_I.unpack(str[start:end])
00281         _v11 = _v10.stamp
00282         _x = _v11
00283         start = end
00284         end += 8
00285         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00286         start = end
00287         end += 4
00288         (length,) = _struct_I.unpack(str[start:end])
00289         start = end
00290         end += length
00291         if python3:
00292           _v10.frame_id = str[start:end].decode('utf-8')
00293         else:
00294           _v10.frame_id = str[start:end]
00295         _v12 = val1.pose
00296         _v13 = _v12.position
00297         _x = _v13
00298         start = end
00299         end += 24
00300         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00301         _v14 = _v12.orientation
00302         _x = _v14
00303         start = end
00304         end += 32
00305         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00306         _v15 = val1.wrench_or_stiffness
00307         _v16 = _v15.force
00308         _x = _v16
00309         start = end
00310         end += 24
00311         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00312         _v17 = _v15.torque
00313         _x = _v17
00314         start = end
00315         end += 24
00316         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00317         _x = val1
00318         start = end
00319         end += 6
00320         (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end])
00321         val1.isForceX = bool(val1.isForceX)
00322         val1.isForceY = bool(val1.isForceY)
00323         val1.isForceZ = bool(val1.isForceZ)
00324         val1.isTorqueX = bool(val1.isTorqueX)
00325         val1.isTorqueY = bool(val1.isTorqueY)
00326         val1.isTorqueZ = bool(val1.isTorqueZ)
00327         _v18 = val1.time_from_start
00328         _x = _v18
00329         start = end
00330         end += 8
00331         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00332         self.goal.trajectory.append(val1)
00333       return self
00334     except struct.error as e:
00335       raise genpy.DeserializationError(e) #most likely buffer underfill
00336 
00337 
00338   def serialize_numpy(self, buff, numpy):
00339     """
00340     serialize message with numpy array types into buffer
00341     :param buff: buffer, ``StringIO``
00342     :param numpy: numpy python module
00343     """
00344     try:
00345       _x = self
00346       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00347       _x = self.header.frame_id
00348       length = len(_x)
00349       if python3 or type(_x) == unicode:
00350         _x = _x.encode('utf-8')
00351         length = len(_x)
00352       buff.write(struct.pack('<I%ss'%length, length, _x))
00353       _x = self
00354       buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs))
00355       _x = self.goal_id.id
00356       length = len(_x)
00357       if python3 or type(_x) == unicode:
00358         _x = _x.encode('utf-8')
00359         length = len(_x)
00360       buff.write(struct.pack('<I%ss'%length, length, _x))
00361       _x = self
00362       buff.write(_struct_3I.pack(_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs))
00363       _x = self.goal.header.frame_id
00364       length = len(_x)
00365       if python3 or type(_x) == unicode:
00366         _x = _x.encode('utf-8')
00367         length = len(_x)
00368       buff.write(struct.pack('<I%ss'%length, length, _x))
00369       length = len(self.goal.trajectory)
00370       buff.write(_struct_I.pack(length))
00371       for val1 in self.goal.trajectory:
00372         _v19 = val1.header
00373         buff.write(_struct_I.pack(_v19.seq))
00374         _v20 = _v19.stamp
00375         _x = _v20
00376         buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00377         _x = _v19.frame_id
00378         length = len(_x)
00379         if python3 or type(_x) == unicode:
00380           _x = _x.encode('utf-8')
00381           length = len(_x)
00382         buff.write(struct.pack('<I%ss'%length, length, _x))
00383         _v21 = val1.pose
00384         _v22 = _v21.position
00385         _x = _v22
00386         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00387         _v23 = _v21.orientation
00388         _x = _v23
00389         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00390         _v24 = val1.wrench_or_stiffness
00391         _v25 = _v24.force
00392         _x = _v25
00393         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00394         _v26 = _v24.torque
00395         _x = _v26
00396         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00397         _x = val1
00398         buff.write(_struct_6B.pack(_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ))
00399         _v27 = val1.time_from_start
00400         _x = _v27
00401         buff.write(_struct_2i.pack(_x.secs, _x.nsecs))
00402     except struct.error as se: self._check_types(se)
00403     except TypeError as te: self._check_types(te)
00404 
00405   def deserialize_numpy(self, str, numpy):
00406     """
00407     unpack serialized message in str into this message instance using numpy for array types
00408     :param str: byte array of serialized message, ``str``
00409     :param numpy: numpy python module
00410     """
00411     try:
00412       if self.header is None:
00413         self.header = std_msgs.msg.Header()
00414       if self.goal_id is None:
00415         self.goal_id = actionlib_msgs.msg.GoalID()
00416       if self.goal is None:
00417         self.goal = ee_cart_imped_msgs.msg.EECartImpedGoal()
00418       end = 0
00419       _x = self
00420       start = end
00421       end += 12
00422       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00423       start = end
00424       end += 4
00425       (length,) = _struct_I.unpack(str[start:end])
00426       start = end
00427       end += length
00428       if python3:
00429         self.header.frame_id = str[start:end].decode('utf-8')
00430       else:
00431         self.header.frame_id = str[start:end]
00432       _x = self
00433       start = end
00434       end += 8
00435       (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00436       start = end
00437       end += 4
00438       (length,) = _struct_I.unpack(str[start:end])
00439       start = end
00440       end += length
00441       if python3:
00442         self.goal_id.id = str[start:end].decode('utf-8')
00443       else:
00444         self.goal_id.id = str[start:end]
00445       _x = self
00446       start = end
00447       end += 12
00448       (_x.goal.header.seq, _x.goal.header.stamp.secs, _x.goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00449       start = end
00450       end += 4
00451       (length,) = _struct_I.unpack(str[start:end])
00452       start = end
00453       end += length
00454       if python3:
00455         self.goal.header.frame_id = str[start:end].decode('utf-8')
00456       else:
00457         self.goal.header.frame_id = str[start:end]
00458       start = end
00459       end += 4
00460       (length,) = _struct_I.unpack(str[start:end])
00461       self.goal.trajectory = []
00462       for i in range(0, length):
00463         val1 = ee_cart_imped_msgs.msg.StiffPoint()
00464         _v28 = val1.header
00465         start = end
00466         end += 4
00467         (_v28.seq,) = _struct_I.unpack(str[start:end])
00468         _v29 = _v28.stamp
00469         _x = _v29
00470         start = end
00471         end += 8
00472         (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00473         start = end
00474         end += 4
00475         (length,) = _struct_I.unpack(str[start:end])
00476         start = end
00477         end += length
00478         if python3:
00479           _v28.frame_id = str[start:end].decode('utf-8')
00480         else:
00481           _v28.frame_id = str[start:end]
00482         _v30 = val1.pose
00483         _v31 = _v30.position
00484         _x = _v31
00485         start = end
00486         end += 24
00487         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00488         _v32 = _v30.orientation
00489         _x = _v32
00490         start = end
00491         end += 32
00492         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00493         _v33 = val1.wrench_or_stiffness
00494         _v34 = _v33.force
00495         _x = _v34
00496         start = end
00497         end += 24
00498         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00499         _v35 = _v33.torque
00500         _x = _v35
00501         start = end
00502         end += 24
00503         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00504         _x = val1
00505         start = end
00506         end += 6
00507         (_x.isForceX, _x.isForceY, _x.isForceZ, _x.isTorqueX, _x.isTorqueY, _x.isTorqueZ,) = _struct_6B.unpack(str[start:end])
00508         val1.isForceX = bool(val1.isForceX)
00509         val1.isForceY = bool(val1.isForceY)
00510         val1.isForceZ = bool(val1.isForceZ)
00511         val1.isTorqueX = bool(val1.isTorqueX)
00512         val1.isTorqueY = bool(val1.isTorqueY)
00513         val1.isTorqueZ = bool(val1.isTorqueZ)
00514         _v36 = val1.time_from_start
00515         _x = _v36
00516         start = end
00517         end += 8
00518         (_x.secs, _x.nsecs,) = _struct_2i.unpack(str[start:end])
00519         self.goal.trajectory.append(val1)
00520       return self
00521     except struct.error as e:
00522       raise genpy.DeserializationError(e) #most likely buffer underfill
00523 
00524 _struct_I = genpy.struct_I
00525 _struct_6B = struct.Struct("<6B")
00526 _struct_2i = struct.Struct("<2i")
00527 _struct_3I = struct.Struct("<3I")
00528 _struct_4d = struct.Struct("<4d")
00529 _struct_2I = struct.Struct("<2I")
00530 _struct_3d = struct.Struct("<3d")


ee_cart_imped_msgs
Author(s): Jenny Barry, Mario Bollini, and Huan Liu
autogenerated on Sun Jan 5 2014 11:14:34