00001 """autogenerated by genmsg_py from TaskFrameFormalism.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import geometry_msgs.msg
00006 import std_msgs.msg
00007
00008 class TaskFrameFormalism(roslib.message.Message):
00009 _md5sum = "416dd51e810e3302c824ad3a87e77e02"
00010 _type = "tff_controller/TaskFrameFormalism"
00011 _has_header = True
00012 _full_text = """Header header
00013 geometry_msgs/Twist mode
00014 geometry_msgs/Twist value
00015 int32 FORCE=1
00016 int32 VELOCITY=2
00017 int32 POSITION=3
00018
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data
00023 # in a particular coordinate frame.
00024 #
00025 # sequence ID: consecutively increasing ID
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036
00037 ================================================================================
00038 MSG: geometry_msgs/Twist
00039 # This expresses velocity in free space broken into it's linear and angular parts.
00040 Vector3 linear
00041 Vector3 angular
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
00052 FORCE = 1
00053 VELOCITY = 2
00054 POSITION = 3
00055
00056 __slots__ = ['header','mode','value']
00057 _slot_types = ['Header','geometry_msgs/Twist','geometry_msgs/Twist']
00058
00059 def __init__(self, *args, **kwds):
00060 """
00061 Constructor. Any message fields that are implicitly/explicitly
00062 set to None will be assigned a default value. The recommend
00063 use is keyword arguments as this is more robust to future message
00064 changes. You cannot mix in-order arguments and keyword arguments.
00065
00066 The available fields are:
00067 header,mode,value
00068
00069 @param args: complete set of field values, in .msg order
00070 @param kwds: use keyword arguments corresponding to message field names
00071 to set specific fields.
00072 """
00073 if args or kwds:
00074 super(TaskFrameFormalism, self).__init__(*args, **kwds)
00075
00076 if self.header is None:
00077 self.header = std_msgs.msg._Header.Header()
00078 if self.mode is None:
00079 self.mode = geometry_msgs.msg.Twist()
00080 if self.value is None:
00081 self.value = geometry_msgs.msg.Twist()
00082 else:
00083 self.header = std_msgs.msg._Header.Header()
00084 self.mode = geometry_msgs.msg.Twist()
00085 self.value = geometry_msgs.msg.Twist()
00086
00087 def _get_types(self):
00088 """
00089 internal API method
00090 """
00091 return self._slot_types
00092
00093 def serialize(self, buff):
00094 """
00095 serialize message into buffer
00096 @param buff: buffer
00097 @type buff: StringIO
00098 """
00099 try:
00100 _x = self
00101 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00102 _x = self.header.frame_id
00103 length = len(_x)
00104 buff.write(struct.pack('<I%ss'%length, length, _x))
00105 _x = self
00106 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))
00107 except struct.error, se: self._check_types(se)
00108 except TypeError, te: self._check_types(te)
00109
00110 def deserialize(self, str):
00111 """
00112 unpack serialized message in str into this message instance
00113 @param str: byte array of serialized message
00114 @type str: str
00115 """
00116 try:
00117 if self.header is None:
00118 self.header = std_msgs.msg._Header.Header()
00119 if self.mode is None:
00120 self.mode = geometry_msgs.msg.Twist()
00121 if self.value is None:
00122 self.value = geometry_msgs.msg.Twist()
00123 end = 0
00124 _x = self
00125 start = end
00126 end += 12
00127 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00128 start = end
00129 end += 4
00130 (length,) = _struct_I.unpack(str[start:end])
00131 start = end
00132 end += length
00133 self.header.frame_id = str[start:end]
00134 _x = self
00135 start = end
00136 end += 96
00137 (_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])
00138 return self
00139 except struct.error, e:
00140 raise roslib.message.DeserializationError(e)
00141
00142
00143 def serialize_numpy(self, buff, numpy):
00144 """
00145 serialize message with numpy array types into buffer
00146 @param buff: buffer
00147 @type buff: StringIO
00148 @param numpy: numpy python module
00149 @type numpy module
00150 """
00151 try:
00152 _x = self
00153 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00154 _x = self.header.frame_id
00155 length = len(_x)
00156 buff.write(struct.pack('<I%ss'%length, length, _x))
00157 _x = self
00158 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))
00159 except struct.error, se: self._check_types(se)
00160 except TypeError, te: self._check_types(te)
00161
00162 def deserialize_numpy(self, str, numpy):
00163 """
00164 unpack serialized message in str into this message instance using numpy for array types
00165 @param str: byte array of serialized message
00166 @type str: str
00167 @param numpy: numpy python module
00168 @type numpy: module
00169 """
00170 try:
00171 if self.header is None:
00172 self.header = std_msgs.msg._Header.Header()
00173 if self.mode is None:
00174 self.mode = geometry_msgs.msg.Twist()
00175 if self.value is None:
00176 self.value = geometry_msgs.msg.Twist()
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 self.header.frame_id = str[start:end]
00188 _x = self
00189 start = end
00190 end += 96
00191 (_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])
00192 return self
00193 except struct.error, e:
00194 raise roslib.message.DeserializationError(e)
00195
00196 _struct_I = roslib.message.struct_I
00197 _struct_3I = struct.Struct("<3I")
00198 _struct_12d = struct.Struct("<12d")