00001
00002 #ifndef ART_MSGS_MESSAGE_CARDRIVE_H
00003 #define ART_MSGS_MESSAGE_CARDRIVE_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "art_msgs/Gear.h"
00014 #include "art_msgs/PilotBehavior.h"
00015
00016 namespace art_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct CarDrive_ : public ros::Message
00020 {
00021 typedef CarDrive_<ContainerAllocator> Type;
00022
00023 CarDrive_()
00024 : speed(0.0)
00025 , acceleration(0.0)
00026 , jerk(0.0)
00027 , steering_angle(0.0)
00028 , gear()
00029 , behavior()
00030 {
00031 }
00032
00033 CarDrive_(const ContainerAllocator& _alloc)
00034 : speed(0.0)
00035 , acceleration(0.0)
00036 , jerk(0.0)
00037 , steering_angle(0.0)
00038 , gear(_alloc)
00039 , behavior(_alloc)
00040 {
00041 }
00042
00043 typedef float _speed_type;
00044 float speed;
00045
00046 typedef float _acceleration_type;
00047 float acceleration;
00048
00049 typedef float _jerk_type;
00050 float jerk;
00051
00052 typedef float _steering_angle_type;
00053 float steering_angle;
00054
00055 typedef ::art_msgs::Gear_<ContainerAllocator> _gear_type;
00056 ::art_msgs::Gear_<ContainerAllocator> gear;
00057
00058 typedef ::art_msgs::PilotBehavior_<ContainerAllocator> _behavior_type;
00059 ::art_msgs::PilotBehavior_<ContainerAllocator> behavior;
00060
00061
00062 private:
00063 static const char* __s_getDataType_() { return "art_msgs/CarDrive"; }
00064 public:
00065 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00066
00067 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00068
00069 private:
00070 static const char* __s_getMD5Sum_() { return "977b12f7daeec4c2a2276732baf95662"; }
00071 public:
00072 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00073
00074 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00075
00076 private:
00077 static const char* __s_getMessageDefinition_() { return "# Driving command for a car-like vehicle using Ackermann steering.\n\
00078 # $Id: CarDrive.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00079 \n\
00080 # Drive at requested speed, acceleration and jerk (the 1st, 2nd and\n\
00081 # 3rd derivatives of position). All are non-negative scalars. \n\
00082 #\n\
00083 # Speed is defined as the scalar magnitude of the velocity\n\
00084 # vector. Direction (forwards or backwards) is determined by the gear.\n\
00085 #\n\
00086 # Zero acceleration means change speed as quickly as\n\
00087 # possible. Positive acceleration may include deceleration as needed\n\
00088 # to match the desired speed. It represents a desired rate and also a\n\
00089 # limit not to exceed.\n\
00090 #\n\
00091 # Zero jerk means change acceleration as quickly as possible. Positive\n\
00092 # jerk describes the desired rate of acceleration change in both\n\
00093 # directions (positive and negative).\n\
00094 #\n\
00095 float32 speed # magnitude of velocity vector (m/s)\n\
00096 float32 acceleration # desired acceleration (m/s^2)\n\
00097 float32 jerk # desired jerk (m/s^3)\n\
00098 \n\
00099 # Assumes Ackermann (front-wheel) steering. This angle is the average\n\
00100 # yaw of the two front wheels in the vehicle frame of reference\n\
00101 # (positive left), ignoring their slightly differing angles as if it\n\
00102 # were a tricycle. This is *not* the angle of the steering wheel\n\
00103 # inside the passenger compartment.\n\
00104 #\n\
00105 float32 steering_angle # steering angle (radians)\n\
00106 \n\
00107 Gear gear # requested gear (no change if Naught)\n\
00108 PilotBehavior behavior # requested pilot behavior\n\
00109 \n\
00110 ================================================================================\n\
00111 MSG: art_msgs/Gear\n\
00112 # ART vehicle transmission gear numbers\n\
00113 #\n\
00114 # Used by several different messages.\n\
00115 \n\
00116 # $Id: Gear.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00117 \n\
00118 # Gear numbers. \n\
00119 #\n\
00120 # Naught means: reset all Shifter relays; no change of CarDrive gear.\n\
00121 uint8 Naught = 0\n\
00122 uint8 Park = 1\n\
00123 uint8 Reverse = 2\n\
00124 uint8 Neutral = 3\n\
00125 uint8 Drive = 4\n\
00126 uint8 N_gears = 5\n\
00127 \n\
00128 uint8 value # requested or reported gear number\n\
00129 \n\
00130 ================================================================================\n\
00131 MSG: art_msgs/PilotBehavior\n\
00132 # ART autonomous vehicle pilot node behaviors.\n\
00133 #\n\
00134 # Normally, the pilot node does Run, continually sending commands to\n\
00135 # the servo device actuators and monitoring their state. With Pause,\n\
00136 # the pilot becomes passive, allowing a learning algorithm or human\n\
00137 # controller direct access to those devices. In the Off state,\n\
00138 # various devices are shut down: the transmission in Park, the brake\n\
00139 # released, the throttle at idle. The engine is not turned off, but\n\
00140 # it could be.\n\
00141 \n\
00142 # $Id: PilotBehavior.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00143 \n\
00144 # Behavior value\n\
00145 uint8 value\n\
00146 \n\
00147 # Behavior numbers:\n\
00148 uint8 Run = 0 # normal driving\n\
00149 uint8 Pause = 1 # stop issuing servo commands\n\
00150 uint8 Off = 2 # turn off devices\n\
00151 uint8 N_behaviors = 3\n\
00152 \n\
00153 "; }
00154 public:
00155 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00156
00157 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00158
00159 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00160 {
00161 ros::serialization::OStream stream(write_ptr, 1000000000);
00162 ros::serialization::serialize(stream, speed);
00163 ros::serialization::serialize(stream, acceleration);
00164 ros::serialization::serialize(stream, jerk);
00165 ros::serialization::serialize(stream, steering_angle);
00166 ros::serialization::serialize(stream, gear);
00167 ros::serialization::serialize(stream, behavior);
00168 return stream.getData();
00169 }
00170
00171 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00172 {
00173 ros::serialization::IStream stream(read_ptr, 1000000000);
00174 ros::serialization::deserialize(stream, speed);
00175 ros::serialization::deserialize(stream, acceleration);
00176 ros::serialization::deserialize(stream, jerk);
00177 ros::serialization::deserialize(stream, steering_angle);
00178 ros::serialization::deserialize(stream, gear);
00179 ros::serialization::deserialize(stream, behavior);
00180 return stream.getData();
00181 }
00182
00183 ROS_DEPRECATED virtual uint32_t serializationLength() const
00184 {
00185 uint32_t size = 0;
00186 size += ros::serialization::serializationLength(speed);
00187 size += ros::serialization::serializationLength(acceleration);
00188 size += ros::serialization::serializationLength(jerk);
00189 size += ros::serialization::serializationLength(steering_angle);
00190 size += ros::serialization::serializationLength(gear);
00191 size += ros::serialization::serializationLength(behavior);
00192 return size;
00193 }
00194
00195 typedef boost::shared_ptr< ::art_msgs::CarDrive_<ContainerAllocator> > Ptr;
00196 typedef boost::shared_ptr< ::art_msgs::CarDrive_<ContainerAllocator> const> ConstPtr;
00197 };
00198 typedef ::art_msgs::CarDrive_<std::allocator<void> > CarDrive;
00199
00200 typedef boost::shared_ptr< ::art_msgs::CarDrive> CarDrivePtr;
00201 typedef boost::shared_ptr< ::art_msgs::CarDrive const> CarDriveConstPtr;
00202
00203
00204 template<typename ContainerAllocator>
00205 std::ostream& operator<<(std::ostream& s, const ::art_msgs::CarDrive_<ContainerAllocator> & v)
00206 {
00207 ros::message_operations::Printer< ::art_msgs::CarDrive_<ContainerAllocator> >::stream(s, "", v);
00208 return s;}
00209
00210 }
00211
00212 namespace ros
00213 {
00214 namespace message_traits
00215 {
00216 template<class ContainerAllocator>
00217 struct MD5Sum< ::art_msgs::CarDrive_<ContainerAllocator> > {
00218 static const char* value()
00219 {
00220 return "977b12f7daeec4c2a2276732baf95662";
00221 }
00222
00223 static const char* value(const ::art_msgs::CarDrive_<ContainerAllocator> &) { return value(); }
00224 static const uint64_t static_value1 = 0x977b12f7daeec4c2ULL;
00225 static const uint64_t static_value2 = 0xa2276732baf95662ULL;
00226 };
00227
00228 template<class ContainerAllocator>
00229 struct DataType< ::art_msgs::CarDrive_<ContainerAllocator> > {
00230 static const char* value()
00231 {
00232 return "art_msgs/CarDrive";
00233 }
00234
00235 static const char* value(const ::art_msgs::CarDrive_<ContainerAllocator> &) { return value(); }
00236 };
00237
00238 template<class ContainerAllocator>
00239 struct Definition< ::art_msgs::CarDrive_<ContainerAllocator> > {
00240 static const char* value()
00241 {
00242 return "# Driving command for a car-like vehicle using Ackermann steering.\n\
00243 # $Id: CarDrive.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00244 \n\
00245 # Drive at requested speed, acceleration and jerk (the 1st, 2nd and\n\
00246 # 3rd derivatives of position). All are non-negative scalars. \n\
00247 #\n\
00248 # Speed is defined as the scalar magnitude of the velocity\n\
00249 # vector. Direction (forwards or backwards) is determined by the gear.\n\
00250 #\n\
00251 # Zero acceleration means change speed as quickly as\n\
00252 # possible. Positive acceleration may include deceleration as needed\n\
00253 # to match the desired speed. It represents a desired rate and also a\n\
00254 # limit not to exceed.\n\
00255 #\n\
00256 # Zero jerk means change acceleration as quickly as possible. Positive\n\
00257 # jerk describes the desired rate of acceleration change in both\n\
00258 # directions (positive and negative).\n\
00259 #\n\
00260 float32 speed # magnitude of velocity vector (m/s)\n\
00261 float32 acceleration # desired acceleration (m/s^2)\n\
00262 float32 jerk # desired jerk (m/s^3)\n\
00263 \n\
00264 # Assumes Ackermann (front-wheel) steering. This angle is the average\n\
00265 # yaw of the two front wheels in the vehicle frame of reference\n\
00266 # (positive left), ignoring their slightly differing angles as if it\n\
00267 # were a tricycle. This is *not* the angle of the steering wheel\n\
00268 # inside the passenger compartment.\n\
00269 #\n\
00270 float32 steering_angle # steering angle (radians)\n\
00271 \n\
00272 Gear gear # requested gear (no change if Naught)\n\
00273 PilotBehavior behavior # requested pilot behavior\n\
00274 \n\
00275 ================================================================================\n\
00276 MSG: art_msgs/Gear\n\
00277 # ART vehicle transmission gear numbers\n\
00278 #\n\
00279 # Used by several different messages.\n\
00280 \n\
00281 # $Id: Gear.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00282 \n\
00283 # Gear numbers. \n\
00284 #\n\
00285 # Naught means: reset all Shifter relays; no change of CarDrive gear.\n\
00286 uint8 Naught = 0\n\
00287 uint8 Park = 1\n\
00288 uint8 Reverse = 2\n\
00289 uint8 Neutral = 3\n\
00290 uint8 Drive = 4\n\
00291 uint8 N_gears = 5\n\
00292 \n\
00293 uint8 value # requested or reported gear number\n\
00294 \n\
00295 ================================================================================\n\
00296 MSG: art_msgs/PilotBehavior\n\
00297 # ART autonomous vehicle pilot node behaviors.\n\
00298 #\n\
00299 # Normally, the pilot node does Run, continually sending commands to\n\
00300 # the servo device actuators and monitoring their state. With Pause,\n\
00301 # the pilot becomes passive, allowing a learning algorithm or human\n\
00302 # controller direct access to those devices. In the Off state,\n\
00303 # various devices are shut down: the transmission in Park, the brake\n\
00304 # released, the throttle at idle. The engine is not turned off, but\n\
00305 # it could be.\n\
00306 \n\
00307 # $Id: PilotBehavior.msg 1539 2011-05-09 04:09:20Z jack.oquin $\n\
00308 \n\
00309 # Behavior value\n\
00310 uint8 value\n\
00311 \n\
00312 # Behavior numbers:\n\
00313 uint8 Run = 0 # normal driving\n\
00314 uint8 Pause = 1 # stop issuing servo commands\n\
00315 uint8 Off = 2 # turn off devices\n\
00316 uint8 N_behaviors = 3\n\
00317 \n\
00318 ";
00319 }
00320
00321 static const char* value(const ::art_msgs::CarDrive_<ContainerAllocator> &) { return value(); }
00322 };
00323
00324 template<class ContainerAllocator> struct IsFixedSize< ::art_msgs::CarDrive_<ContainerAllocator> > : public TrueType {};
00325 }
00326 }
00327
00328 namespace ros
00329 {
00330 namespace serialization
00331 {
00332
00333 template<class ContainerAllocator> struct Serializer< ::art_msgs::CarDrive_<ContainerAllocator> >
00334 {
00335 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00336 {
00337 stream.next(m.speed);
00338 stream.next(m.acceleration);
00339 stream.next(m.jerk);
00340 stream.next(m.steering_angle);
00341 stream.next(m.gear);
00342 stream.next(m.behavior);
00343 }
00344
00345 ROS_DECLARE_ALLINONE_SERIALIZER;
00346 };
00347 }
00348 }
00349
00350 namespace ros
00351 {
00352 namespace message_operations
00353 {
00354
00355 template<class ContainerAllocator>
00356 struct Printer< ::art_msgs::CarDrive_<ContainerAllocator> >
00357 {
00358 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::CarDrive_<ContainerAllocator> & v)
00359 {
00360 s << indent << "speed: ";
00361 Printer<float>::stream(s, indent + " ", v.speed);
00362 s << indent << "acceleration: ";
00363 Printer<float>::stream(s, indent + " ", v.acceleration);
00364 s << indent << "jerk: ";
00365 Printer<float>::stream(s, indent + " ", v.jerk);
00366 s << indent << "steering_angle: ";
00367 Printer<float>::stream(s, indent + " ", v.steering_angle);
00368 s << indent << "gear: ";
00369 s << std::endl;
00370 Printer< ::art_msgs::Gear_<ContainerAllocator> >::stream(s, indent + " ", v.gear);
00371 s << indent << "behavior: ";
00372 s << std::endl;
00373 Printer< ::art_msgs::PilotBehavior_<ContainerAllocator> >::stream(s, indent + " ", v.behavior);
00374 }
00375 };
00376
00377
00378 }
00379 }
00380
00381 #endif // ART_MSGS_MESSAGE_CARDRIVE_H
00382