_TaskFrameFormalism.py
Go to the documentation of this file.
00001 """autogenerated by genpy from tff_controller/TaskFrameFormalism.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 TaskFrameFormalism(genpy.Message):
00011   _md5sum = "416dd51e810e3302c824ad3a87e77e02"
00012   _type = "tff_controller/TaskFrameFormalism"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 geometry_msgs/Twist mode
00016 geometry_msgs/Twist value
00017 int32 FORCE=1
00018 int32 VELOCITY=2
00019 int32 POSITION=3
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: geometry_msgs/Twist
00041 # This expresses velocity in free space broken into it's linear and angular parts. 
00042 Vector3  linear
00043 Vector3  angular
00044 
00045 ================================================================================
00046 MSG: geometry_msgs/Vector3
00047 # This represents a vector in free space. 
00048 
00049 float64 x
00050 float64 y
00051 float64 z
00052 """
00053   # Pseudo-constants
00054   FORCE = 1
00055   VELOCITY = 2
00056   POSITION = 3
00057 
00058   __slots__ = ['header','mode','value']
00059   _slot_types = ['std_msgs/Header','geometry_msgs/Twist','geometry_msgs/Twist']
00060 
00061   def __init__(self, *args, **kwds):
00062     """
00063     Constructor. Any message fields that are implicitly/explicitly
00064     set to None will be assigned a default value. The recommend
00065     use is keyword arguments as this is more robust to future message
00066     changes.  You cannot mix in-order arguments and keyword arguments.
00067 
00068     The available fields are:
00069        header,mode,value
00070 
00071     :param args: complete set of field values, in .msg order
00072     :param kwds: use keyword arguments corresponding to message field names
00073     to set specific fields.
00074     """
00075     if args or kwds:
00076       super(TaskFrameFormalism, self).__init__(*args, **kwds)
00077       #message fields cannot be None, assign default values for those that are
00078       if self.header is None:
00079         self.header = std_msgs.msg.Header()
00080       if self.mode is None:
00081         self.mode = geometry_msgs.msg.Twist()
00082       if self.value is None:
00083         self.value = geometry_msgs.msg.Twist()
00084     else:
00085       self.header = std_msgs.msg.Header()
00086       self.mode = geometry_msgs.msg.Twist()
00087       self.value = geometry_msgs.msg.Twist()
00088 
00089   def _get_types(self):
00090     """
00091     internal API method
00092     """
00093     return self._slot_types
00094 
00095   def serialize(self, buff):
00096     """
00097     serialize message into buffer
00098     :param buff: buffer, ``StringIO``
00099     """
00100     try:
00101       _x = self
00102       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00103       _x = self.header.frame_id
00104       length = len(_x)
00105       if python3 or type(_x) == unicode:
00106         _x = _x.encode('utf-8')
00107         length = len(_x)
00108       buff.write(struct.pack('<I%ss'%length, length, _x))
00109       _x = self
00110       buff.write(_struct_12d.pack(_x.mode.linear.x, _x.mode.linear.y, _x.mode.linear.z, _x.mode.angular.x, _x.mode.angular.y, _x.mode.angular.z, _x.value.linear.x, _x.value.linear.y, _x.value.linear.z, _x.value.angular.x, _x.value.angular.y, _x.value.angular.z))
00111     except struct.error as se: self._check_types(se)
00112     except TypeError as te: self._check_types(te)
00113 
00114   def deserialize(self, str):
00115     """
00116     unpack serialized message in str into this message instance
00117     :param str: byte array of serialized message, ``str``
00118     """
00119     try:
00120       if self.header is None:
00121         self.header = std_msgs.msg.Header()
00122       if self.mode is None:
00123         self.mode = geometry_msgs.msg.Twist()
00124       if self.value is None:
00125         self.value = geometry_msgs.msg.Twist()
00126       end = 0
00127       _x = self
00128       start = end
00129       end += 12
00130       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00131       start = end
00132       end += 4
00133       (length,) = _struct_I.unpack(str[start:end])
00134       start = end
00135       end += length
00136       if python3:
00137         self.header.frame_id = str[start:end].decode('utf-8')
00138       else:
00139         self.header.frame_id = str[start:end]
00140       _x = self
00141       start = end
00142       end += 96
00143       (_x.mode.linear.x, _x.mode.linear.y, _x.mode.linear.z, _x.mode.angular.x, _x.mode.angular.y, _x.mode.angular.z, _x.value.linear.x, _x.value.linear.y, _x.value.linear.z, _x.value.angular.x, _x.value.angular.y, _x.value.angular.z,) = _struct_12d.unpack(str[start:end])
00144       return self
00145     except struct.error as e:
00146       raise genpy.DeserializationError(e) #most likely buffer underfill
00147 
00148 
00149   def serialize_numpy(self, buff, numpy):
00150     """
00151     serialize message with numpy array types into buffer
00152     :param buff: buffer, ``StringIO``
00153     :param numpy: numpy python module
00154     """
00155     try:
00156       _x = self
00157       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00158       _x = self.header.frame_id
00159       length = len(_x)
00160       if python3 or type(_x) == unicode:
00161         _x = _x.encode('utf-8')
00162         length = len(_x)
00163       buff.write(struct.pack('<I%ss'%length, length, _x))
00164       _x = self
00165       buff.write(_struct_12d.pack(_x.mode.linear.x, _x.mode.linear.y, _x.mode.linear.z, _x.mode.angular.x, _x.mode.angular.y, _x.mode.angular.z, _x.value.linear.x, _x.value.linear.y, _x.value.linear.z, _x.value.angular.x, _x.value.angular.y, _x.value.angular.z))
00166     except struct.error as se: self._check_types(se)
00167     except TypeError as te: self._check_types(te)
00168 
00169   def deserialize_numpy(self, str, numpy):
00170     """
00171     unpack serialized message in str into this message instance using numpy for array types
00172     :param str: byte array of serialized message, ``str``
00173     :param numpy: numpy python module
00174     """
00175     try:
00176       if self.header is None:
00177         self.header = std_msgs.msg.Header()
00178       if self.mode is None:
00179         self.mode = geometry_msgs.msg.Twist()
00180       if self.value is None:
00181         self.value = geometry_msgs.msg.Twist()
00182       end = 0
00183       _x = self
00184       start = end
00185       end += 12
00186       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00187       start = end
00188       end += 4
00189       (length,) = _struct_I.unpack(str[start:end])
00190       start = end
00191       end += length
00192       if python3:
00193         self.header.frame_id = str[start:end].decode('utf-8')
00194       else:
00195         self.header.frame_id = str[start:end]
00196       _x = self
00197       start = end
00198       end += 96
00199       (_x.mode.linear.x, _x.mode.linear.y, _x.mode.linear.z, _x.mode.angular.x, _x.mode.angular.y, _x.mode.angular.z, _x.value.linear.x, _x.value.linear.y, _x.value.linear.z, _x.value.angular.x, _x.value.angular.y, _x.value.angular.z,) = _struct_12d.unpack(str[start:end])
00200       return self
00201     except struct.error as e:
00202       raise genpy.DeserializationError(e) #most likely buffer underfill
00203 
00204 _struct_I = genpy.struct_I
00205 _struct_3I = struct.Struct("<3I")
00206 _struct_12d = struct.Struct("<12d")


tff_controller
Author(s): Wim Meeussen
autogenerated on Wed Dec 11 2013 14:17:33