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