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


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