$search
00001 """autogenerated by genmsg_py from AckermannDriveStamped.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import ackermann_msgs.msg 00006 import std_msgs.msg 00007 00008 class AckermannDriveStamped(roslib.message.Message): 00009 _md5sum = "1fd5d7f58889cefd44d29f6653240d0c" 00010 _type = "ackermann_msgs/AckermannDriveStamped" 00011 _has_header = True #flag to mark the presence of a Header object 00012 _full_text = """## Time stamped drive command for robots with Ackermann steering. 00013 # $Id: AckermannDriveStamped.msg 1958 2012-02-11 02:35:54Z jack.oquin $ 00014 00015 Header header 00016 AckermannDrive drive 00017 00018 ================================================================================ 00019 MSG: std_msgs/Header 00020 # Standard metadata for higher-level stamped data types. 00021 # This is generally used to communicate timestamped data 00022 # in a particular coordinate frame. 00023 # 00024 # sequence ID: consecutively increasing ID 00025 uint32 seq 00026 #Two-integer timestamp that is expressed as: 00027 # * stamp.secs: seconds (stamp_secs) since epoch 00028 # * stamp.nsecs: nanoseconds since stamp_secs 00029 # time-handling sugar is provided by the client library 00030 time stamp 00031 #Frame this data is associated with 00032 # 0: no frame 00033 # 1: global frame 00034 string frame_id 00035 00036 ================================================================================ 00037 MSG: ackermann_msgs/AckermannDrive 00038 ## Driving command for a car-like vehicle using Ackermann steering. 00039 # $Id: AckermannDrive.msg 1966 2012-02-11 17:52:11Z jack.oquin $ 00040 00041 # Assumes Ackermann front-wheel steering. The left and right front 00042 # wheels are generally at different angles. To simplify, the commanded 00043 # angle corresponds to the yaw of a virtual wheel located at the 00044 # center of the front axle, like on a tricycle. Positive yaw is to 00045 # the left. (This is *not* the angle of the steering wheel inside the 00046 # passenger compartment.) 00047 # 00048 # Zero steering angle velocity means change the steering angle as 00049 # quickly as possible. Positive velocity indicates a desired absolute 00050 # rate of change either left or right. The controller tries not to 00051 # exceed this limit in either direction, but sometimes it might. 00052 # 00053 float32 steering_angle # desired virtual angle (radians) 00054 float32 steering_angle_velocity # desired rate of change (radians/s) 00055 00056 # Drive at requested speed, acceleration and jerk (the 1st, 2nd and 00057 # 3rd derivatives of position). All are measured at the vehicle's 00058 # center of rotation, typically the center of the rear axle. The 00059 # controller tries not to exceed these limits in either direction, but 00060 # sometimes it might. 00061 # 00062 # Speed is the desired scalar magnitude of the velocity vector. 00063 # Direction is forward unless the sign is negative, indicating reverse. 00064 # 00065 # Zero acceleration means change speed as quickly as 00066 # possible. Positive acceleration indicates a desired absolute 00067 # magnitude; that includes deceleration. 00068 # 00069 # Zero jerk means change acceleration as quickly as possible. Positive 00070 # jerk indicates a desired absolute rate of acceleration change in 00071 # either direction (increasing or decreasing). 00072 # 00073 float32 speed # desired forward speed (m/s) 00074 float32 acceleration # desired acceleration (m/s^2) 00075 float32 jerk # desired jerk (m/s^3) 00076 00077 """ 00078 __slots__ = ['header','drive'] 00079 _slot_types = ['Header','ackermann_msgs/AckermannDrive'] 00080 00081 def __init__(self, *args, **kwds): 00082 """ 00083 Constructor. Any message fields that are implicitly/explicitly 00084 set to None will be assigned a default value. The recommend 00085 use is keyword arguments as this is more robust to future message 00086 changes. You cannot mix in-order arguments and keyword arguments. 00087 00088 The available fields are: 00089 header,drive 00090 00091 @param args: complete set of field values, in .msg order 00092 @param kwds: use keyword arguments corresponding to message field names 00093 to set specific fields. 00094 """ 00095 if args or kwds: 00096 super(AckermannDriveStamped, self).__init__(*args, **kwds) 00097 #message fields cannot be None, assign default values for those that are 00098 if self.header is None: 00099 self.header = std_msgs.msg._Header.Header() 00100 if self.drive is None: 00101 self.drive = ackermann_msgs.msg.AckermannDrive() 00102 else: 00103 self.header = std_msgs.msg._Header.Header() 00104 self.drive = ackermann_msgs.msg.AckermannDrive() 00105 00106 def _get_types(self): 00107 """ 00108 internal API method 00109 """ 00110 return self._slot_types 00111 00112 def serialize(self, buff): 00113 """ 00114 serialize message into buffer 00115 @param buff: buffer 00116 @type buff: StringIO 00117 """ 00118 try: 00119 _x = self 00120 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00121 _x = self.header.frame_id 00122 length = len(_x) 00123 buff.write(struct.pack('<I%ss'%length, length, _x)) 00124 _x = self 00125 buff.write(_struct_5f.pack(_x.drive.steering_angle, _x.drive.steering_angle_velocity, _x.drive.speed, _x.drive.acceleration, _x.drive.jerk)) 00126 except struct.error as se: self._check_types(se) 00127 except TypeError as te: self._check_types(te) 00128 00129 def deserialize(self, str): 00130 """ 00131 unpack serialized message in str into this message instance 00132 @param str: byte array of serialized message 00133 @type str: str 00134 """ 00135 try: 00136 if self.header is None: 00137 self.header = std_msgs.msg._Header.Header() 00138 if self.drive is None: 00139 self.drive = ackermann_msgs.msg.AckermannDrive() 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 12 00144 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00145 start = end 00146 end += 4 00147 (length,) = _struct_I.unpack(str[start:end]) 00148 start = end 00149 end += length 00150 self.header.frame_id = str[start:end] 00151 _x = self 00152 start = end 00153 end += 20 00154 (_x.drive.steering_angle, _x.drive.steering_angle_velocity, _x.drive.speed, _x.drive.acceleration, _x.drive.jerk,) = _struct_5f.unpack(str[start:end]) 00155 return self 00156 except struct.error as e: 00157 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00158 00159 00160 def serialize_numpy(self, buff, numpy): 00161 """ 00162 serialize message with numpy array types into buffer 00163 @param buff: buffer 00164 @type buff: StringIO 00165 @param numpy: numpy python module 00166 @type numpy module 00167 """ 00168 try: 00169 _x = self 00170 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00171 _x = self.header.frame_id 00172 length = len(_x) 00173 buff.write(struct.pack('<I%ss'%length, length, _x)) 00174 _x = self 00175 buff.write(_struct_5f.pack(_x.drive.steering_angle, _x.drive.steering_angle_velocity, _x.drive.speed, _x.drive.acceleration, _x.drive.jerk)) 00176 except struct.error as se: self._check_types(se) 00177 except TypeError as te: self._check_types(te) 00178 00179 def deserialize_numpy(self, str, numpy): 00180 """ 00181 unpack serialized message in str into this message instance using numpy for array types 00182 @param str: byte array of serialized message 00183 @type str: str 00184 @param numpy: numpy python module 00185 @type numpy: module 00186 """ 00187 try: 00188 if self.header is None: 00189 self.header = std_msgs.msg._Header.Header() 00190 if self.drive is None: 00191 self.drive = ackermann_msgs.msg.AckermannDrive() 00192 end = 0 00193 _x = self 00194 start = end 00195 end += 12 00196 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00197 start = end 00198 end += 4 00199 (length,) = _struct_I.unpack(str[start:end]) 00200 start = end 00201 end += length 00202 self.header.frame_id = str[start:end] 00203 _x = self 00204 start = end 00205 end += 20 00206 (_x.drive.steering_angle, _x.drive.steering_angle_velocity, _x.drive.speed, _x.drive.acceleration, _x.drive.jerk,) = _struct_5f.unpack(str[start:end]) 00207 return self 00208 except struct.error as e: 00209 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00210 00211 _struct_I = roslib.message.struct_I 00212 _struct_3I = struct.Struct("<3I") 00213 _struct_5f = struct.Struct("<5f")