_ForceProcessed.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_phri_2011/ForceProcessed.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 std_msgs.msg
00009 
00010 class ForceProcessed(genpy.Message):
00011   _md5sum = "5e1a218134302a1948d1586068f579b8"
00012   _type = "hrl_phri_2011/ForceProcessed"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 float32 time_offset
00016 geometry_msgs/TransformStamped tool_frame
00017 
00018 # pointcloud data
00019 int32 pc_ind
00020 geometry_msgs/Point pc_pt
00021 float32 pc_dist
00022 geometry_msgs/Vector3 pc_normal
00023 
00024 # wrench data
00025 geometry_msgs/Wrench wrench
00026 geometry_msgs/Wrench raw_wrench
00027 float32 force_magnitude
00028 float32 force_normal
00029 float32 force_tangental
00030 
00031 # semantic data
00032 geometry_msgs/Point ell_coords
00033 geometry_msgs/Transform tool_ell_frame
00034 string region
00035 string user
00036 int32 contact_period
00037 float32 time_from_contact_start
00038 
00039 ================================================================================
00040 MSG: std_msgs/Header
00041 # Standard metadata for higher-level stamped data types.
00042 # This is generally used to communicate timestamped data 
00043 # in a particular coordinate frame.
00044 # 
00045 # sequence ID: consecutively increasing ID 
00046 uint32 seq
00047 #Two-integer timestamp that is expressed as:
00048 # * stamp.secs: seconds (stamp_secs) since epoch
00049 # * stamp.nsecs: nanoseconds since stamp_secs
00050 # time-handling sugar is provided by the client library
00051 time stamp
00052 #Frame this data is associated with
00053 # 0: no frame
00054 # 1: global frame
00055 string frame_id
00056 
00057 ================================================================================
00058 MSG: geometry_msgs/TransformStamped
00059 # This expresses a transform from coordinate frame header.frame_id
00060 # to the coordinate frame child_frame_id
00061 #
00062 # This message is mostly used by the 
00063 # <a href="http://www.ros.org/wiki/tf">tf</a> package. 
00064 # See it's documentation for more information.
00065 
00066 Header header
00067 string child_frame_id # the frame id of the child frame
00068 Transform transform
00069 
00070 ================================================================================
00071 MSG: geometry_msgs/Transform
00072 # This represents the transform between two coordinate frames in free space.
00073 
00074 Vector3 translation
00075 Quaternion rotation
00076 
00077 ================================================================================
00078 MSG: geometry_msgs/Vector3
00079 # This represents a vector in free space. 
00080 
00081 float64 x
00082 float64 y
00083 float64 z
00084 ================================================================================
00085 MSG: geometry_msgs/Quaternion
00086 # This represents an orientation in free space in quaternion form.
00087 
00088 float64 x
00089 float64 y
00090 float64 z
00091 float64 w
00092 
00093 ================================================================================
00094 MSG: geometry_msgs/Point
00095 # This contains the position of a point in free space
00096 float64 x
00097 float64 y
00098 float64 z
00099 
00100 ================================================================================
00101 MSG: geometry_msgs/Wrench
00102 # This represents force in free space, seperated into 
00103 # it's linear and angular parts.  
00104 Vector3  force
00105 Vector3  torque
00106 
00107 """
00108   __slots__ = ['header','time_offset','tool_frame','pc_ind','pc_pt','pc_dist','pc_normal','wrench','raw_wrench','force_magnitude','force_normal','force_tangental','ell_coords','tool_ell_frame','region','user','contact_period','time_from_contact_start']
00109   _slot_types = ['std_msgs/Header','float32','geometry_msgs/TransformStamped','int32','geometry_msgs/Point','float32','geometry_msgs/Vector3','geometry_msgs/Wrench','geometry_msgs/Wrench','float32','float32','float32','geometry_msgs/Point','geometry_msgs/Transform','string','string','int32','float32']
00110 
00111   def __init__(self, *args, **kwds):
00112     """
00113     Constructor. Any message fields that are implicitly/explicitly
00114     set to None will be assigned a default value. The recommend
00115     use is keyword arguments as this is more robust to future message
00116     changes.  You cannot mix in-order arguments and keyword arguments.
00117 
00118     The available fields are:
00119        header,time_offset,tool_frame,pc_ind,pc_pt,pc_dist,pc_normal,wrench,raw_wrench,force_magnitude,force_normal,force_tangental,ell_coords,tool_ell_frame,region,user,contact_period,time_from_contact_start
00120 
00121     :param args: complete set of field values, in .msg order
00122     :param kwds: use keyword arguments corresponding to message field names
00123     to set specific fields.
00124     """
00125     if args or kwds:
00126       super(ForceProcessed, self).__init__(*args, **kwds)
00127       #message fields cannot be None, assign default values for those that are
00128       if self.header is None:
00129         self.header = std_msgs.msg.Header()
00130       if self.time_offset is None:
00131         self.time_offset = 0.
00132       if self.tool_frame is None:
00133         self.tool_frame = geometry_msgs.msg.TransformStamped()
00134       if self.pc_ind is None:
00135         self.pc_ind = 0
00136       if self.pc_pt is None:
00137         self.pc_pt = geometry_msgs.msg.Point()
00138       if self.pc_dist is None:
00139         self.pc_dist = 0.
00140       if self.pc_normal is None:
00141         self.pc_normal = geometry_msgs.msg.Vector3()
00142       if self.wrench is None:
00143         self.wrench = geometry_msgs.msg.Wrench()
00144       if self.raw_wrench is None:
00145         self.raw_wrench = geometry_msgs.msg.Wrench()
00146       if self.force_magnitude is None:
00147         self.force_magnitude = 0.
00148       if self.force_normal is None:
00149         self.force_normal = 0.
00150       if self.force_tangental is None:
00151         self.force_tangental = 0.
00152       if self.ell_coords is None:
00153         self.ell_coords = geometry_msgs.msg.Point()
00154       if self.tool_ell_frame is None:
00155         self.tool_ell_frame = geometry_msgs.msg.Transform()
00156       if self.region is None:
00157         self.region = ''
00158       if self.user is None:
00159         self.user = ''
00160       if self.contact_period is None:
00161         self.contact_period = 0
00162       if self.time_from_contact_start is None:
00163         self.time_from_contact_start = 0.
00164     else:
00165       self.header = std_msgs.msg.Header()
00166       self.time_offset = 0.
00167       self.tool_frame = geometry_msgs.msg.TransformStamped()
00168       self.pc_ind = 0
00169       self.pc_pt = geometry_msgs.msg.Point()
00170       self.pc_dist = 0.
00171       self.pc_normal = geometry_msgs.msg.Vector3()
00172       self.wrench = geometry_msgs.msg.Wrench()
00173       self.raw_wrench = geometry_msgs.msg.Wrench()
00174       self.force_magnitude = 0.
00175       self.force_normal = 0.
00176       self.force_tangental = 0.
00177       self.ell_coords = geometry_msgs.msg.Point()
00178       self.tool_ell_frame = geometry_msgs.msg.Transform()
00179       self.region = ''
00180       self.user = ''
00181       self.contact_period = 0
00182       self.time_from_contact_start = 0.
00183 
00184   def _get_types(self):
00185     """
00186     internal API method
00187     """
00188     return self._slot_types
00189 
00190   def serialize(self, buff):
00191     """
00192     serialize message into buffer
00193     :param buff: buffer, ``StringIO``
00194     """
00195     try:
00196       _x = self
00197       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00198       _x = self.header.frame_id
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204       _x = self
00205       buff.write(_struct_f3I.pack(_x.time_offset, _x.tool_frame.header.seq, _x.tool_frame.header.stamp.secs, _x.tool_frame.header.stamp.nsecs))
00206       _x = self.tool_frame.header.frame_id
00207       length = len(_x)
00208       if python3 or type(_x) == unicode:
00209         _x = _x.encode('utf-8')
00210         length = len(_x)
00211       buff.write(struct.pack('<I%ss'%length, length, _x))
00212       _x = self.tool_frame.child_frame_id
00213       length = len(_x)
00214       if python3 or type(_x) == unicode:
00215         _x = _x.encode('utf-8')
00216         length = len(_x)
00217       buff.write(struct.pack('<I%ss'%length, length, _x))
00218       _x = self
00219       buff.write(_struct_7di3df15d3f10d.pack(_x.tool_frame.transform.translation.x, _x.tool_frame.transform.translation.y, _x.tool_frame.transform.translation.z, _x.tool_frame.transform.rotation.x, _x.tool_frame.transform.rotation.y, _x.tool_frame.transform.rotation.z, _x.tool_frame.transform.rotation.w, _x.pc_ind, _x.pc_pt.x, _x.pc_pt.y, _x.pc_pt.z, _x.pc_dist, _x.pc_normal.x, _x.pc_normal.y, _x.pc_normal.z, _x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z, _x.raw_wrench.force.x, _x.raw_wrench.force.y, _x.raw_wrench.force.z, _x.raw_wrench.torque.x, _x.raw_wrench.torque.y, _x.raw_wrench.torque.z, _x.force_magnitude, _x.force_normal, _x.force_tangental, _x.ell_coords.x, _x.ell_coords.y, _x.ell_coords.z, _x.tool_ell_frame.translation.x, _x.tool_ell_frame.translation.y, _x.tool_ell_frame.translation.z, _x.tool_ell_frame.rotation.x, _x.tool_ell_frame.rotation.y, _x.tool_ell_frame.rotation.z, _x.tool_ell_frame.rotation.w))
00220       _x = self.region
00221       length = len(_x)
00222       if python3 or type(_x) == unicode:
00223         _x = _x.encode('utf-8')
00224         length = len(_x)
00225       buff.write(struct.pack('<I%ss'%length, length, _x))
00226       _x = self.user
00227       length = len(_x)
00228       if python3 or type(_x) == unicode:
00229         _x = _x.encode('utf-8')
00230         length = len(_x)
00231       buff.write(struct.pack('<I%ss'%length, length, _x))
00232       _x = self
00233       buff.write(_struct_if.pack(_x.contact_period, _x.time_from_contact_start))
00234     except struct.error as se: self._check_types(se)
00235     except TypeError as te: self._check_types(te)
00236 
00237   def deserialize(self, str):
00238     """
00239     unpack serialized message in str into this message instance
00240     :param str: byte array of serialized message, ``str``
00241     """
00242     try:
00243       if self.header is None:
00244         self.header = std_msgs.msg.Header()
00245       if self.tool_frame is None:
00246         self.tool_frame = geometry_msgs.msg.TransformStamped()
00247       if self.pc_pt is None:
00248         self.pc_pt = geometry_msgs.msg.Point()
00249       if self.pc_normal is None:
00250         self.pc_normal = geometry_msgs.msg.Vector3()
00251       if self.wrench is None:
00252         self.wrench = geometry_msgs.msg.Wrench()
00253       if self.raw_wrench is None:
00254         self.raw_wrench = geometry_msgs.msg.Wrench()
00255       if self.ell_coords is None:
00256         self.ell_coords = geometry_msgs.msg.Point()
00257       if self.tool_ell_frame is None:
00258         self.tool_ell_frame = geometry_msgs.msg.Transform()
00259       end = 0
00260       _x = self
00261       start = end
00262       end += 12
00263       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00264       start = end
00265       end += 4
00266       (length,) = _struct_I.unpack(str[start:end])
00267       start = end
00268       end += length
00269       if python3:
00270         self.header.frame_id = str[start:end].decode('utf-8')
00271       else:
00272         self.header.frame_id = str[start:end]
00273       _x = self
00274       start = end
00275       end += 16
00276       (_x.time_offset, _x.tool_frame.header.seq, _x.tool_frame.header.stamp.secs, _x.tool_frame.header.stamp.nsecs,) = _struct_f3I.unpack(str[start:end])
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       start = end
00281       end += length
00282       if python3:
00283         self.tool_frame.header.frame_id = str[start:end].decode('utf-8')
00284       else:
00285         self.tool_frame.header.frame_id = 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         self.tool_frame.child_frame_id = str[start:end].decode('utf-8')
00293       else:
00294         self.tool_frame.child_frame_id = str[start:end]
00295       _x = self
00296       start = end
00297       end += 300
00298       (_x.tool_frame.transform.translation.x, _x.tool_frame.transform.translation.y, _x.tool_frame.transform.translation.z, _x.tool_frame.transform.rotation.x, _x.tool_frame.transform.rotation.y, _x.tool_frame.transform.rotation.z, _x.tool_frame.transform.rotation.w, _x.pc_ind, _x.pc_pt.x, _x.pc_pt.y, _x.pc_pt.z, _x.pc_dist, _x.pc_normal.x, _x.pc_normal.y, _x.pc_normal.z, _x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z, _x.raw_wrench.force.x, _x.raw_wrench.force.y, _x.raw_wrench.force.z, _x.raw_wrench.torque.x, _x.raw_wrench.torque.y, _x.raw_wrench.torque.z, _x.force_magnitude, _x.force_normal, _x.force_tangental, _x.ell_coords.x, _x.ell_coords.y, _x.ell_coords.z, _x.tool_ell_frame.translation.x, _x.tool_ell_frame.translation.y, _x.tool_ell_frame.translation.z, _x.tool_ell_frame.rotation.x, _x.tool_ell_frame.rotation.y, _x.tool_ell_frame.rotation.z, _x.tool_ell_frame.rotation.w,) = _struct_7di3df15d3f10d.unpack(str[start:end])
00299       start = end
00300       end += 4
00301       (length,) = _struct_I.unpack(str[start:end])
00302       start = end
00303       end += length
00304       if python3:
00305         self.region = str[start:end].decode('utf-8')
00306       else:
00307         self.region = str[start:end]
00308       start = end
00309       end += 4
00310       (length,) = _struct_I.unpack(str[start:end])
00311       start = end
00312       end += length
00313       if python3:
00314         self.user = str[start:end].decode('utf-8')
00315       else:
00316         self.user = str[start:end]
00317       _x = self
00318       start = end
00319       end += 8
00320       (_x.contact_period, _x.time_from_contact_start,) = _struct_if.unpack(str[start:end])
00321       return self
00322     except struct.error as e:
00323       raise genpy.DeserializationError(e) #most likely buffer underfill
00324 
00325 
00326   def serialize_numpy(self, buff, numpy):
00327     """
00328     serialize message with numpy array types into buffer
00329     :param buff: buffer, ``StringIO``
00330     :param numpy: numpy python module
00331     """
00332     try:
00333       _x = self
00334       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00335       _x = self.header.frame_id
00336       length = len(_x)
00337       if python3 or type(_x) == unicode:
00338         _x = _x.encode('utf-8')
00339         length = len(_x)
00340       buff.write(struct.pack('<I%ss'%length, length, _x))
00341       _x = self
00342       buff.write(_struct_f3I.pack(_x.time_offset, _x.tool_frame.header.seq, _x.tool_frame.header.stamp.secs, _x.tool_frame.header.stamp.nsecs))
00343       _x = self.tool_frame.header.frame_id
00344       length = len(_x)
00345       if python3 or type(_x) == unicode:
00346         _x = _x.encode('utf-8')
00347         length = len(_x)
00348       buff.write(struct.pack('<I%ss'%length, length, _x))
00349       _x = self.tool_frame.child_frame_id
00350       length = len(_x)
00351       if python3 or type(_x) == unicode:
00352         _x = _x.encode('utf-8')
00353         length = len(_x)
00354       buff.write(struct.pack('<I%ss'%length, length, _x))
00355       _x = self
00356       buff.write(_struct_7di3df15d3f10d.pack(_x.tool_frame.transform.translation.x, _x.tool_frame.transform.translation.y, _x.tool_frame.transform.translation.z, _x.tool_frame.transform.rotation.x, _x.tool_frame.transform.rotation.y, _x.tool_frame.transform.rotation.z, _x.tool_frame.transform.rotation.w, _x.pc_ind, _x.pc_pt.x, _x.pc_pt.y, _x.pc_pt.z, _x.pc_dist, _x.pc_normal.x, _x.pc_normal.y, _x.pc_normal.z, _x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z, _x.raw_wrench.force.x, _x.raw_wrench.force.y, _x.raw_wrench.force.z, _x.raw_wrench.torque.x, _x.raw_wrench.torque.y, _x.raw_wrench.torque.z, _x.force_magnitude, _x.force_normal, _x.force_tangental, _x.ell_coords.x, _x.ell_coords.y, _x.ell_coords.z, _x.tool_ell_frame.translation.x, _x.tool_ell_frame.translation.y, _x.tool_ell_frame.translation.z, _x.tool_ell_frame.rotation.x, _x.tool_ell_frame.rotation.y, _x.tool_ell_frame.rotation.z, _x.tool_ell_frame.rotation.w))
00357       _x = self.region
00358       length = len(_x)
00359       if python3 or type(_x) == unicode:
00360         _x = _x.encode('utf-8')
00361         length = len(_x)
00362       buff.write(struct.pack('<I%ss'%length, length, _x))
00363       _x = self.user
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       _x = self
00370       buff.write(_struct_if.pack(_x.contact_period, _x.time_from_contact_start))
00371     except struct.error as se: self._check_types(se)
00372     except TypeError as te: self._check_types(te)
00373 
00374   def deserialize_numpy(self, str, numpy):
00375     """
00376     unpack serialized message in str into this message instance using numpy for array types
00377     :param str: byte array of serialized message, ``str``
00378     :param numpy: numpy python module
00379     """
00380     try:
00381       if self.header is None:
00382         self.header = std_msgs.msg.Header()
00383       if self.tool_frame is None:
00384         self.tool_frame = geometry_msgs.msg.TransformStamped()
00385       if self.pc_pt is None:
00386         self.pc_pt = geometry_msgs.msg.Point()
00387       if self.pc_normal is None:
00388         self.pc_normal = geometry_msgs.msg.Vector3()
00389       if self.wrench is None:
00390         self.wrench = geometry_msgs.msg.Wrench()
00391       if self.raw_wrench is None:
00392         self.raw_wrench = geometry_msgs.msg.Wrench()
00393       if self.ell_coords is None:
00394         self.ell_coords = geometry_msgs.msg.Point()
00395       if self.tool_ell_frame is None:
00396         self.tool_ell_frame = geometry_msgs.msg.Transform()
00397       end = 0
00398       _x = self
00399       start = end
00400       end += 12
00401       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00402       start = end
00403       end += 4
00404       (length,) = _struct_I.unpack(str[start:end])
00405       start = end
00406       end += length
00407       if python3:
00408         self.header.frame_id = str[start:end].decode('utf-8')
00409       else:
00410         self.header.frame_id = str[start:end]
00411       _x = self
00412       start = end
00413       end += 16
00414       (_x.time_offset, _x.tool_frame.header.seq, _x.tool_frame.header.stamp.secs, _x.tool_frame.header.stamp.nsecs,) = _struct_f3I.unpack(str[start:end])
00415       start = end
00416       end += 4
00417       (length,) = _struct_I.unpack(str[start:end])
00418       start = end
00419       end += length
00420       if python3:
00421         self.tool_frame.header.frame_id = str[start:end].decode('utf-8')
00422       else:
00423         self.tool_frame.header.frame_id = str[start:end]
00424       start = end
00425       end += 4
00426       (length,) = _struct_I.unpack(str[start:end])
00427       start = end
00428       end += length
00429       if python3:
00430         self.tool_frame.child_frame_id = str[start:end].decode('utf-8')
00431       else:
00432         self.tool_frame.child_frame_id = str[start:end]
00433       _x = self
00434       start = end
00435       end += 300
00436       (_x.tool_frame.transform.translation.x, _x.tool_frame.transform.translation.y, _x.tool_frame.transform.translation.z, _x.tool_frame.transform.rotation.x, _x.tool_frame.transform.rotation.y, _x.tool_frame.transform.rotation.z, _x.tool_frame.transform.rotation.w, _x.pc_ind, _x.pc_pt.x, _x.pc_pt.y, _x.pc_pt.z, _x.pc_dist, _x.pc_normal.x, _x.pc_normal.y, _x.pc_normal.z, _x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z, _x.raw_wrench.force.x, _x.raw_wrench.force.y, _x.raw_wrench.force.z, _x.raw_wrench.torque.x, _x.raw_wrench.torque.y, _x.raw_wrench.torque.z, _x.force_magnitude, _x.force_normal, _x.force_tangental, _x.ell_coords.x, _x.ell_coords.y, _x.ell_coords.z, _x.tool_ell_frame.translation.x, _x.tool_ell_frame.translation.y, _x.tool_ell_frame.translation.z, _x.tool_ell_frame.rotation.x, _x.tool_ell_frame.rotation.y, _x.tool_ell_frame.rotation.z, _x.tool_ell_frame.rotation.w,) = _struct_7di3df15d3f10d.unpack(str[start:end])
00437       start = end
00438       end += 4
00439       (length,) = _struct_I.unpack(str[start:end])
00440       start = end
00441       end += length
00442       if python3:
00443         self.region = str[start:end].decode('utf-8')
00444       else:
00445         self.region = str[start:end]
00446       start = end
00447       end += 4
00448       (length,) = _struct_I.unpack(str[start:end])
00449       start = end
00450       end += length
00451       if python3:
00452         self.user = str[start:end].decode('utf-8')
00453       else:
00454         self.user = str[start:end]
00455       _x = self
00456       start = end
00457       end += 8
00458       (_x.contact_period, _x.time_from_contact_start,) = _struct_if.unpack(str[start:end])
00459       return self
00460     except struct.error as e:
00461       raise genpy.DeserializationError(e) #most likely buffer underfill
00462 
00463 _struct_I = genpy.struct_I
00464 _struct_f3I = struct.Struct("<f3I")
00465 _struct_3I = struct.Struct("<3I")
00466 _struct_if = struct.Struct("<if")
00467 _struct_7di3df15d3f10d = struct.Struct("<7di3df15d3f10d")


hrl_phri_2011
Author(s): Kelsey Hawkins
autogenerated on Wed Nov 27 2013 12:22:39