00001 """autogenerated by genpy from telekyb_msgs/TKTrajectory.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 TKTrajectory(genpy.Message):
00011 _md5sum = "a280cd51c8c8e68c09773125129803bb"
00012 _type = "telekyb_msgs/TKTrajectory"
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 # Input Pos
00035 geometry_msgs/Vector3 position
00036 geometry_msgs/Vector3 velocity
00037 geometry_msgs/Vector3 acceleration
00038 geometry_msgs/Vector3 jerk
00039 geometry_msgs/Vector3 snap
00040
00041 #TELEKYB_ENUM_VALUES(PosControlType, const char*,
00042 # (Position)("Position Control Mode")
00043 # (Velocity)("Velocity Control Mode")
00044 # (Acceleration)("Acceleration Control Mode")
00045 #)
00046
00047 uint8 POS_MODE=0
00048 uint8 VEL_MODE=1
00049 uint8 ACC_MODE=2
00050
00051 uint8 xAxisCtrlType
00052 uint8 yAxisCtrlType
00053 uint8 zAxisCtrlType
00054
00055 float64 yawAngle
00056 float64 yawRate
00057 float64 yawAcceleration
00058
00059 #TELEKYB_ENUM_VALUES(YawControlType, const char*,
00060 # (AngleMode)("Angle Mode")
00061 # (RateMode)("Rate Mode")
00062 # (AccelerationMode)("Acceleration Mode")
00063 #)
00064
00065 uint8 YAWANGLE_MODE=0
00066 uint8 YAWRATE_MODE=1
00067 uint8 YAWACC_MODE=2
00068
00069 uint8 yawCtrlType
00070
00071
00072 ================================================================================
00073 MSG: std_msgs/Header
00074 # Standard metadata for higher-level stamped data types.
00075 # This is generally used to communicate timestamped data
00076 # in a particular coordinate frame.
00077 #
00078 # sequence ID: consecutively increasing ID
00079 uint32 seq
00080 #Two-integer timestamp that is expressed as:
00081 # * stamp.secs: seconds (stamp_secs) since epoch
00082 # * stamp.nsecs: nanoseconds since stamp_secs
00083 # time-handling sugar is provided by the client library
00084 time stamp
00085 #Frame this data is associated with
00086 # 0: no frame
00087 # 1: global frame
00088 string frame_id
00089
00090 ================================================================================
00091 MSG: geometry_msgs/Vector3
00092 # This represents a vector in free space.
00093
00094 float64 x
00095 float64 y
00096 float64 z
00097 """
00098
00099 POS_MODE = 0
00100 VEL_MODE = 1
00101 ACC_MODE = 2
00102 YAWANGLE_MODE = 0
00103 YAWRATE_MODE = 1
00104 YAWACC_MODE = 2
00105
00106 __slots__ = ['header','position','velocity','acceleration','jerk','snap','xAxisCtrlType','yAxisCtrlType','zAxisCtrlType','yawAngle','yawRate','yawAcceleration','yawCtrlType']
00107 _slot_types = ['std_msgs/Header','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','geometry_msgs/Vector3','uint8','uint8','uint8','float64','float64','float64','uint8']
00108
00109 def __init__(self, *args, **kwds):
00110 """
00111 Constructor. Any message fields that are implicitly/explicitly
00112 set to None will be assigned a default value. The recommend
00113 use is keyword arguments as this is more robust to future message
00114 changes. You cannot mix in-order arguments and keyword arguments.
00115
00116 The available fields are:
00117 header,position,velocity,acceleration,jerk,snap,xAxisCtrlType,yAxisCtrlType,zAxisCtrlType,yawAngle,yawRate,yawAcceleration,yawCtrlType
00118
00119 :param args: complete set of field values, in .msg order
00120 :param kwds: use keyword arguments corresponding to message field names
00121 to set specific fields.
00122 """
00123 if args or kwds:
00124 super(TKTrajectory, self).__init__(*args, **kwds)
00125
00126 if self.header is None:
00127 self.header = std_msgs.msg.Header()
00128 if self.position is None:
00129 self.position = geometry_msgs.msg.Vector3()
00130 if self.velocity is None:
00131 self.velocity = geometry_msgs.msg.Vector3()
00132 if self.acceleration is None:
00133 self.acceleration = geometry_msgs.msg.Vector3()
00134 if self.jerk is None:
00135 self.jerk = geometry_msgs.msg.Vector3()
00136 if self.snap is None:
00137 self.snap = geometry_msgs.msg.Vector3()
00138 if self.xAxisCtrlType is None:
00139 self.xAxisCtrlType = 0
00140 if self.yAxisCtrlType is None:
00141 self.yAxisCtrlType = 0
00142 if self.zAxisCtrlType is None:
00143 self.zAxisCtrlType = 0
00144 if self.yawAngle is None:
00145 self.yawAngle = 0.
00146 if self.yawRate is None:
00147 self.yawRate = 0.
00148 if self.yawAcceleration is None:
00149 self.yawAcceleration = 0.
00150 if self.yawCtrlType is None:
00151 self.yawCtrlType = 0
00152 else:
00153 self.header = std_msgs.msg.Header()
00154 self.position = geometry_msgs.msg.Vector3()
00155 self.velocity = geometry_msgs.msg.Vector3()
00156 self.acceleration = geometry_msgs.msg.Vector3()
00157 self.jerk = geometry_msgs.msg.Vector3()
00158 self.snap = geometry_msgs.msg.Vector3()
00159 self.xAxisCtrlType = 0
00160 self.yAxisCtrlType = 0
00161 self.zAxisCtrlType = 0
00162 self.yawAngle = 0.
00163 self.yawRate = 0.
00164 self.yawAcceleration = 0.
00165 self.yawCtrlType = 0
00166
00167 def _get_types(self):
00168 """
00169 internal API method
00170 """
00171 return self._slot_types
00172
00173 def serialize(self, buff):
00174 """
00175 serialize message into buffer
00176 :param buff: buffer, ``StringIO``
00177 """
00178 try:
00179 _x = self
00180 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00181 _x = self.header.frame_id
00182 length = len(_x)
00183 if python3 or type(_x) == unicode:
00184 _x = _x.encode('utf-8')
00185 length = len(_x)
00186 buff.write(struct.pack('<I%ss'%length, length, _x))
00187 _x = self
00188 buff.write(_struct_15d3B3dB.pack(_x.position.x, _x.position.y, _x.position.z, _x.velocity.x, _x.velocity.y, _x.velocity.z, _x.acceleration.x, _x.acceleration.y, _x.acceleration.z, _x.jerk.x, _x.jerk.y, _x.jerk.z, _x.snap.x, _x.snap.y, _x.snap.z, _x.xAxisCtrlType, _x.yAxisCtrlType, _x.zAxisCtrlType, _x.yawAngle, _x.yawRate, _x.yawAcceleration, _x.yawCtrlType))
00189 except struct.error as se: self._check_types(se)
00190 except TypeError as te: self._check_types(te)
00191
00192 def deserialize(self, str):
00193 """
00194 unpack serialized message in str into this message instance
00195 :param str: byte array of serialized message, ``str``
00196 """
00197 try:
00198 if self.header is None:
00199 self.header = std_msgs.msg.Header()
00200 if self.position is None:
00201 self.position = geometry_msgs.msg.Vector3()
00202 if self.velocity is None:
00203 self.velocity = geometry_msgs.msg.Vector3()
00204 if self.acceleration is None:
00205 self.acceleration = geometry_msgs.msg.Vector3()
00206 if self.jerk is None:
00207 self.jerk = geometry_msgs.msg.Vector3()
00208 if self.snap is None:
00209 self.snap = geometry_msgs.msg.Vector3()
00210 end = 0
00211 _x = self
00212 start = end
00213 end += 12
00214 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 start = end
00219 end += length
00220 if python3:
00221 self.header.frame_id = str[start:end].decode('utf-8')
00222 else:
00223 self.header.frame_id = str[start:end]
00224 _x = self
00225 start = end
00226 end += 148
00227 (_x.position.x, _x.position.y, _x.position.z, _x.velocity.x, _x.velocity.y, _x.velocity.z, _x.acceleration.x, _x.acceleration.y, _x.acceleration.z, _x.jerk.x, _x.jerk.y, _x.jerk.z, _x.snap.x, _x.snap.y, _x.snap.z, _x.xAxisCtrlType, _x.yAxisCtrlType, _x.zAxisCtrlType, _x.yawAngle, _x.yawRate, _x.yawAcceleration, _x.yawCtrlType,) = _struct_15d3B3dB.unpack(str[start:end])
00228 return self
00229 except struct.error as e:
00230 raise genpy.DeserializationError(e)
00231
00232
00233 def serialize_numpy(self, buff, numpy):
00234 """
00235 serialize message with numpy array types into buffer
00236 :param buff: buffer, ``StringIO``
00237 :param numpy: numpy python module
00238 """
00239 try:
00240 _x = self
00241 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00242 _x = self.header.frame_id
00243 length = len(_x)
00244 if python3 or type(_x) == unicode:
00245 _x = _x.encode('utf-8')
00246 length = len(_x)
00247 buff.write(struct.pack('<I%ss'%length, length, _x))
00248 _x = self
00249 buff.write(_struct_15d3B3dB.pack(_x.position.x, _x.position.y, _x.position.z, _x.velocity.x, _x.velocity.y, _x.velocity.z, _x.acceleration.x, _x.acceleration.y, _x.acceleration.z, _x.jerk.x, _x.jerk.y, _x.jerk.z, _x.snap.x, _x.snap.y, _x.snap.z, _x.xAxisCtrlType, _x.yAxisCtrlType, _x.zAxisCtrlType, _x.yawAngle, _x.yawRate, _x.yawAcceleration, _x.yawCtrlType))
00250 except struct.error as se: self._check_types(se)
00251 except TypeError as te: self._check_types(te)
00252
00253 def deserialize_numpy(self, str, numpy):
00254 """
00255 unpack serialized message in str into this message instance using numpy for array types
00256 :param str: byte array of serialized message, ``str``
00257 :param numpy: numpy python module
00258 """
00259 try:
00260 if self.header is None:
00261 self.header = std_msgs.msg.Header()
00262 if self.position is None:
00263 self.position = geometry_msgs.msg.Vector3()
00264 if self.velocity is None:
00265 self.velocity = geometry_msgs.msg.Vector3()
00266 if self.acceleration is None:
00267 self.acceleration = geometry_msgs.msg.Vector3()
00268 if self.jerk is None:
00269 self.jerk = geometry_msgs.msg.Vector3()
00270 if self.snap is None:
00271 self.snap = geometry_msgs.msg.Vector3()
00272 end = 0
00273 _x = self
00274 start = end
00275 end += 12
00276 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00277 start = end
00278 end += 4
00279 (length,) = _struct_I.unpack(str[start:end])
00280 start = end
00281 end += length
00282 if python3:
00283 self.header.frame_id = str[start:end].decode('utf-8')
00284 else:
00285 self.header.frame_id = str[start:end]
00286 _x = self
00287 start = end
00288 end += 148
00289 (_x.position.x, _x.position.y, _x.position.z, _x.velocity.x, _x.velocity.y, _x.velocity.z, _x.acceleration.x, _x.acceleration.y, _x.acceleration.z, _x.jerk.x, _x.jerk.y, _x.jerk.z, _x.snap.x, _x.snap.y, _x.snap.z, _x.xAxisCtrlType, _x.yAxisCtrlType, _x.zAxisCtrlType, _x.yawAngle, _x.yawRate, _x.yawAcceleration, _x.yawCtrlType,) = _struct_15d3B3dB.unpack(str[start:end])
00290 return self
00291 except struct.error as e:
00292 raise genpy.DeserializationError(e)
00293
00294 _struct_I = genpy.struct_I
00295 _struct_3I = struct.Struct("<3I")
00296 _struct_15d3B3dB = struct.Struct("<15d3B3dB")