00001 """autogenerated by genpy from telekyb_msgs/TKState.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 TKState(genpy.Message):
00011 _md5sum = "a296da29623d3a182b44fee95e8415a4"
00012 _type = "telekyb_msgs/TKState"
00013 _has_header = True
00014 _full_text = """#
00015 # Copyright 2011 Antonio Franchi and Martin Riedel
00016 #
00017 # This file is part of TeleKyb.
00018 #
00019 # TeleKyb is free software: you can redistribute it and/or modify
00020 # it under the terms of the GNU General Public License as published by
00021 # the Free Software Foundation, either version 3 of the License, or
00022 # (at your option) any later version.
00023 #
00024 # TeleKyb is distributed in the hope that it will be useful,
00025 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00026 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00027 # GNU General Public License for more details.
00028 #
00029 # You should have received a copy of the GNU General Public License
00030 # along with TeleKyb. If not, see <http://www.gnu.org/licenses/>.
00031
00032 Header header
00033
00034 # Pose
00035 geometry_msgs/Pose pose
00036
00037 # Twist
00038 geometry_msgs/Twist twist
00039
00040
00041 ================================================================================
00042 MSG: std_msgs/Header
00043 # Standard metadata for higher-level stamped data types.
00044 # This is generally used to communicate timestamped data
00045 # in a particular coordinate frame.
00046 #
00047 # sequence ID: consecutively increasing ID
00048 uint32 seq
00049 #Two-integer timestamp that is expressed as:
00050 # * stamp.secs: seconds (stamp_secs) since epoch
00051 # * stamp.nsecs: nanoseconds since stamp_secs
00052 # time-handling sugar is provided by the client library
00053 time stamp
00054 #Frame this data is associated with
00055 # 0: no frame
00056 # 1: global frame
00057 string frame_id
00058
00059 ================================================================================
00060 MSG: geometry_msgs/Pose
00061 # A representation of pose in free space, composed of postion and orientation.
00062 Point position
00063 Quaternion orientation
00064
00065 ================================================================================
00066 MSG: geometry_msgs/Point
00067 # This contains the position of a point in free space
00068 float64 x
00069 float64 y
00070 float64 z
00071
00072 ================================================================================
00073 MSG: geometry_msgs/Quaternion
00074 # This represents an orientation in free space in quaternion form.
00075
00076 float64 x
00077 float64 y
00078 float64 z
00079 float64 w
00080
00081 ================================================================================
00082 MSG: geometry_msgs/Twist
00083 # This expresses velocity in free space broken into it's linear and angular parts.
00084 Vector3 linear
00085 Vector3 angular
00086
00087 ================================================================================
00088 MSG: geometry_msgs/Vector3
00089 # This represents a vector in free space.
00090
00091 float64 x
00092 float64 y
00093 float64 z
00094 """
00095 __slots__ = ['header','pose','twist']
00096 _slot_types = ['std_msgs/Header','geometry_msgs/Pose','geometry_msgs/Twist']
00097
00098 def __init__(self, *args, **kwds):
00099 """
00100 Constructor. Any message fields that are implicitly/explicitly
00101 set to None will be assigned a default value. The recommend
00102 use is keyword arguments as this is more robust to future message
00103 changes. You cannot mix in-order arguments and keyword arguments.
00104
00105 The available fields are:
00106 header,pose,twist
00107
00108 :param args: complete set of field values, in .msg order
00109 :param kwds: use keyword arguments corresponding to message field names
00110 to set specific fields.
00111 """
00112 if args or kwds:
00113 super(TKState, self).__init__(*args, **kwds)
00114
00115 if self.header is None:
00116 self.header = std_msgs.msg.Header()
00117 if self.pose is None:
00118 self.pose = geometry_msgs.msg.Pose()
00119 if self.twist is None:
00120 self.twist = geometry_msgs.msg.Twist()
00121 else:
00122 self.header = std_msgs.msg.Header()
00123 self.pose = geometry_msgs.msg.Pose()
00124 self.twist = geometry_msgs.msg.Twist()
00125
00126 def _get_types(self):
00127 """
00128 internal API method
00129 """
00130 return self._slot_types
00131
00132 def serialize(self, buff):
00133 """
00134 serialize message into buffer
00135 :param buff: buffer, ``StringIO``
00136 """
00137 try:
00138 _x = self
00139 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00140 _x = self.header.frame_id
00141 length = len(_x)
00142 if python3 or type(_x) == unicode:
00143 _x = _x.encode('utf-8')
00144 length = len(_x)
00145 buff.write(struct.pack('<I%ss'%length, length, _x))
00146 _x = self
00147 buff.write(_struct_13d.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.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z))
00148 except struct.error as se: self._check_types(se)
00149 except TypeError as te: self._check_types(te)
00150
00151 def deserialize(self, str):
00152 """
00153 unpack serialized message in str into this message instance
00154 :param str: byte array of serialized message, ``str``
00155 """
00156 try:
00157 if self.header is None:
00158 self.header = std_msgs.msg.Header()
00159 if self.pose is None:
00160 self.pose = geometry_msgs.msg.Pose()
00161 if self.twist is None:
00162 self.twist = geometry_msgs.msg.Twist()
00163 end = 0
00164 _x = self
00165 start = end
00166 end += 12
00167 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00168 start = end
00169 end += 4
00170 (length,) = _struct_I.unpack(str[start:end])
00171 start = end
00172 end += length
00173 if python3:
00174 self.header.frame_id = str[start:end].decode('utf-8')
00175 else:
00176 self.header.frame_id = str[start:end]
00177 _x = self
00178 start = end
00179 end += 104
00180 (_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.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_13d.unpack(str[start:end])
00181 return self
00182 except struct.error as e:
00183 raise genpy.DeserializationError(e)
00184
00185
00186 def serialize_numpy(self, buff, numpy):
00187 """
00188 serialize message with numpy array types into buffer
00189 :param buff: buffer, ``StringIO``
00190 :param numpy: numpy python module
00191 """
00192 try:
00193 _x = self
00194 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00195 _x = self.header.frame_id
00196 length = len(_x)
00197 if python3 or type(_x) == unicode:
00198 _x = _x.encode('utf-8')
00199 length = len(_x)
00200 buff.write(struct.pack('<I%ss'%length, length, _x))
00201 _x = self
00202 buff.write(_struct_13d.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.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z))
00203 except struct.error as se: self._check_types(se)
00204 except TypeError as te: self._check_types(te)
00205
00206 def deserialize_numpy(self, str, numpy):
00207 """
00208 unpack serialized message in str into this message instance using numpy for array types
00209 :param str: byte array of serialized message, ``str``
00210 :param numpy: numpy python module
00211 """
00212 try:
00213 if self.header is None:
00214 self.header = std_msgs.msg.Header()
00215 if self.pose is None:
00216 self.pose = geometry_msgs.msg.Pose()
00217 if self.twist is None:
00218 self.twist = geometry_msgs.msg.Twist()
00219 end = 0
00220 _x = self
00221 start = end
00222 end += 12
00223 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00224 start = end
00225 end += 4
00226 (length,) = _struct_I.unpack(str[start:end])
00227 start = end
00228 end += length
00229 if python3:
00230 self.header.frame_id = str[start:end].decode('utf-8')
00231 else:
00232 self.header.frame_id = str[start:end]
00233 _x = self
00234 start = end
00235 end += 104
00236 (_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.twist.linear.x, _x.twist.linear.y, _x.twist.linear.z, _x.twist.angular.x, _x.twist.angular.y, _x.twist.angular.z,) = _struct_13d.unpack(str[start:end])
00237 return self
00238 except struct.error as e:
00239 raise genpy.DeserializationError(e)
00240
00241 _struct_I = genpy.struct_I
00242 _struct_3I = struct.Struct("<3I")
00243 _struct_13d = struct.Struct("<13d")