_WrenchPoseArrayStamped.py
Go to the documentation of this file.
00001 """autogenerated by genpy from hrl_lib/WrenchPoseArrayStamped.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 WrenchPoseArrayStamped(genpy.Message):
00011   _md5sum = "327486bfeb5bbc48d8eb365e9d139038"
00012   _type = "hrl_lib/WrenchPoseArrayStamped"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 geometry_msgs/Wrench wrench
00016 geometry_msgs/Pose[] poses
00017 
00018 ================================================================================
00019 MSG: std_msgs/Header
00020 # Standard metadata for higher-level stamped data types.
00021 # This is generally used to communicate timestamped data 
00022 # in a particular coordinate frame.
00023 # 
00024 # sequence ID: consecutively increasing ID 
00025 uint32 seq
00026 #Two-integer timestamp that is expressed as:
00027 # * stamp.secs: seconds (stamp_secs) since epoch
00028 # * stamp.nsecs: nanoseconds since stamp_secs
00029 # time-handling sugar is provided by the client library
00030 time stamp
00031 #Frame this data is associated with
00032 # 0: no frame
00033 # 1: global frame
00034 string frame_id
00035 
00036 ================================================================================
00037 MSG: geometry_msgs/Wrench
00038 # This represents force in free space, seperated into 
00039 # it's linear and angular parts.  
00040 Vector3  force
00041 Vector3  torque
00042 
00043 ================================================================================
00044 MSG: geometry_msgs/Vector3
00045 # This represents a vector in free space. 
00046 
00047 float64 x
00048 float64 y
00049 float64 z
00050 ================================================================================
00051 MSG: geometry_msgs/Pose
00052 # A representation of pose in free space, composed of postion and orientation. 
00053 Point position
00054 Quaternion orientation
00055 
00056 ================================================================================
00057 MSG: geometry_msgs/Point
00058 # This contains the position of a point in free space
00059 float64 x
00060 float64 y
00061 float64 z
00062 
00063 ================================================================================
00064 MSG: geometry_msgs/Quaternion
00065 # This represents an orientation in free space in quaternion form.
00066 
00067 float64 x
00068 float64 y
00069 float64 z
00070 float64 w
00071 
00072 """
00073   __slots__ = ['header','wrench','poses']
00074   _slot_types = ['std_msgs/Header','geometry_msgs/Wrench','geometry_msgs/Pose[]']
00075 
00076   def __init__(self, *args, **kwds):
00077     """
00078     Constructor. Any message fields that are implicitly/explicitly
00079     set to None will be assigned a default value. The recommend
00080     use is keyword arguments as this is more robust to future message
00081     changes.  You cannot mix in-order arguments and keyword arguments.
00082 
00083     The available fields are:
00084        header,wrench,poses
00085 
00086     :param args: complete set of field values, in .msg order
00087     :param kwds: use keyword arguments corresponding to message field names
00088     to set specific fields.
00089     """
00090     if args or kwds:
00091       super(WrenchPoseArrayStamped, self).__init__(*args, **kwds)
00092       #message fields cannot be None, assign default values for those that are
00093       if self.header is None:
00094         self.header = std_msgs.msg.Header()
00095       if self.wrench is None:
00096         self.wrench = geometry_msgs.msg.Wrench()
00097       if self.poses is None:
00098         self.poses = []
00099     else:
00100       self.header = std_msgs.msg.Header()
00101       self.wrench = geometry_msgs.msg.Wrench()
00102       self.poses = []
00103 
00104   def _get_types(self):
00105     """
00106     internal API method
00107     """
00108     return self._slot_types
00109 
00110   def serialize(self, buff):
00111     """
00112     serialize message into buffer
00113     :param buff: buffer, ``StringIO``
00114     """
00115     try:
00116       _x = self
00117       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00118       _x = self.header.frame_id
00119       length = len(_x)
00120       if python3 or type(_x) == unicode:
00121         _x = _x.encode('utf-8')
00122         length = len(_x)
00123       buff.write(struct.pack('<I%ss'%length, length, _x))
00124       _x = self
00125       buff.write(_struct_6d.pack(_x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z))
00126       length = len(self.poses)
00127       buff.write(_struct_I.pack(length))
00128       for val1 in self.poses:
00129         _v1 = val1.position
00130         _x = _v1
00131         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00132         _v2 = val1.orientation
00133         _x = _v2
00134         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00135     except struct.error as se: self._check_types(se)
00136     except TypeError as te: self._check_types(te)
00137 
00138   def deserialize(self, str):
00139     """
00140     unpack serialized message in str into this message instance
00141     :param str: byte array of serialized message, ``str``
00142     """
00143     try:
00144       if self.header is None:
00145         self.header = std_msgs.msg.Header()
00146       if self.wrench is None:
00147         self.wrench = geometry_msgs.msg.Wrench()
00148       if self.poses is None:
00149         self.poses = None
00150       end = 0
00151       _x = self
00152       start = end
00153       end += 12
00154       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00155       start = end
00156       end += 4
00157       (length,) = _struct_I.unpack(str[start:end])
00158       start = end
00159       end += length
00160       if python3:
00161         self.header.frame_id = str[start:end].decode('utf-8')
00162       else:
00163         self.header.frame_id = str[start:end]
00164       _x = self
00165       start = end
00166       end += 48
00167       (_x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z,) = _struct_6d.unpack(str[start:end])
00168       start = end
00169       end += 4
00170       (length,) = _struct_I.unpack(str[start:end])
00171       self.poses = []
00172       for i in range(0, length):
00173         val1 = geometry_msgs.msg.Pose()
00174         _v3 = val1.position
00175         _x = _v3
00176         start = end
00177         end += 24
00178         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00179         _v4 = val1.orientation
00180         _x = _v4
00181         start = end
00182         end += 32
00183         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00184         self.poses.append(val1)
00185       return self
00186     except struct.error as e:
00187       raise genpy.DeserializationError(e) #most likely buffer underfill
00188 
00189 
00190   def serialize_numpy(self, buff, numpy):
00191     """
00192     serialize message with numpy array types into buffer
00193     :param buff: buffer, ``StringIO``
00194     :param numpy: numpy python module
00195     """
00196     try:
00197       _x = self
00198       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00199       _x = self.header.frame_id
00200       length = len(_x)
00201       if python3 or type(_x) == unicode:
00202         _x = _x.encode('utf-8')
00203         length = len(_x)
00204       buff.write(struct.pack('<I%ss'%length, length, _x))
00205       _x = self
00206       buff.write(_struct_6d.pack(_x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z))
00207       length = len(self.poses)
00208       buff.write(_struct_I.pack(length))
00209       for val1 in self.poses:
00210         _v5 = val1.position
00211         _x = _v5
00212         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00213         _v6 = val1.orientation
00214         _x = _v6
00215         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00216     except struct.error as se: self._check_types(se)
00217     except TypeError as te: self._check_types(te)
00218 
00219   def deserialize_numpy(self, str, numpy):
00220     """
00221     unpack serialized message in str into this message instance using numpy for array types
00222     :param str: byte array of serialized message, ``str``
00223     :param numpy: numpy python module
00224     """
00225     try:
00226       if self.header is None:
00227         self.header = std_msgs.msg.Header()
00228       if self.wrench is None:
00229         self.wrench = geometry_msgs.msg.Wrench()
00230       if self.poses is None:
00231         self.poses = None
00232       end = 0
00233       _x = self
00234       start = end
00235       end += 12
00236       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00237       start = end
00238       end += 4
00239       (length,) = _struct_I.unpack(str[start:end])
00240       start = end
00241       end += length
00242       if python3:
00243         self.header.frame_id = str[start:end].decode('utf-8')
00244       else:
00245         self.header.frame_id = str[start:end]
00246       _x = self
00247       start = end
00248       end += 48
00249       (_x.wrench.force.x, _x.wrench.force.y, _x.wrench.force.z, _x.wrench.torque.x, _x.wrench.torque.y, _x.wrench.torque.z,) = _struct_6d.unpack(str[start:end])
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       self.poses = []
00254       for i in range(0, length):
00255         val1 = geometry_msgs.msg.Pose()
00256         _v7 = val1.position
00257         _x = _v7
00258         start = end
00259         end += 24
00260         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00261         _v8 = val1.orientation
00262         _x = _v8
00263         start = end
00264         end += 32
00265         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00266         self.poses.append(val1)
00267       return self
00268     except struct.error as e:
00269       raise genpy.DeserializationError(e) #most likely buffer underfill
00270 
00271 _struct_I = genpy.struct_I
00272 _struct_3I = struct.Struct("<3I")
00273 _struct_6d = struct.Struct("<6d")
00274 _struct_4d = struct.Struct("<4d")
00275 _struct_3d = struct.Struct("<3d")


hrl_lib
Author(s): Cressel Anderson, Travis Deyle, Advait Jain, Hai Nguyen, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:34:06