00001
00002 #ifndef PR2_MECHANISM_CONTROLLERS_MESSAGE_ODOMETER_H
00003 #define PR2_MECHANISM_CONTROLLERS_MESSAGE_ODOMETER_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
00014 namespace pr2_mechanism_controllers
00015 {
00016 template <class ContainerAllocator>
00017 struct Odometer_ : public ros::Message
00018 {
00019 typedef Odometer_<ContainerAllocator> Type;
00020
00021 Odometer_()
00022 : distance(0.0)
00023 , angle(0.0)
00024 {
00025 }
00026
00027 Odometer_(const ContainerAllocator& _alloc)
00028 : distance(0.0)
00029 , angle(0.0)
00030 {
00031 }
00032
00033 typedef double _distance_type;
00034 double distance;
00035
00036 typedef double _angle_type;
00037 double angle;
00038
00039
00040 private:
00041 static const char* __s_getDataType_() { return "pr2_mechanism_controllers/Odometer"; }
00042 public:
00043 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00044
00045 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00046
00047 private:
00048 static const char* __s_getMD5Sum_() { return "1f1d53743f4592ee455aa3eaf9019457"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00051
00052 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00053
00054 private:
00055 static const char* __s_getMessageDefinition_() { return "float64 distance #total distance traveled (meters)\n\
00056 float64 angle #total angle traveled (radians)\n\
00057 "; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00060
00061 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00062
00063 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00064 {
00065 ros::serialization::OStream stream(write_ptr, 1000000000);
00066 ros::serialization::serialize(stream, distance);
00067 ros::serialization::serialize(stream, angle);
00068 return stream.getData();
00069 }
00070
00071 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00072 {
00073 ros::serialization::IStream stream(read_ptr, 1000000000);
00074 ros::serialization::deserialize(stream, distance);
00075 ros::serialization::deserialize(stream, angle);
00076 return stream.getData();
00077 }
00078
00079 ROS_DEPRECATED virtual uint32_t serializationLength() const
00080 {
00081 uint32_t size = 0;
00082 size += ros::serialization::serializationLength(distance);
00083 size += ros::serialization::serializationLength(angle);
00084 return size;
00085 }
00086
00087 typedef boost::shared_ptr< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> > Ptr;
00088 typedef boost::shared_ptr< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> const> ConstPtr;
00089 };
00090 typedef ::pr2_mechanism_controllers::Odometer_<std::allocator<void> > Odometer;
00091
00092 typedef boost::shared_ptr< ::pr2_mechanism_controllers::Odometer> OdometerPtr;
00093 typedef boost::shared_ptr< ::pr2_mechanism_controllers::Odometer const> OdometerConstPtr;
00094
00095
00096 template<typename ContainerAllocator>
00097 std::ostream& operator<<(std::ostream& s, const ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> & v)
00098 {
00099 ros::message_operations::Printer< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> >::stream(s, "", v);
00100 return s;}
00101
00102 }
00103
00104 namespace ros
00105 {
00106 namespace message_traits
00107 {
00108 template<class ContainerAllocator>
00109 struct MD5Sum< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> > {
00110 static const char* value()
00111 {
00112 return "1f1d53743f4592ee455aa3eaf9019457";
00113 }
00114
00115 static const char* value(const ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> &) { return value(); }
00116 static const uint64_t static_value1 = 0x1f1d53743f4592eeULL;
00117 static const uint64_t static_value2 = 0x455aa3eaf9019457ULL;
00118 };
00119
00120 template<class ContainerAllocator>
00121 struct DataType< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> > {
00122 static const char* value()
00123 {
00124 return "pr2_mechanism_controllers/Odometer";
00125 }
00126
00127 static const char* value(const ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> &) { return value(); }
00128 };
00129
00130 template<class ContainerAllocator>
00131 struct Definition< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "float64 distance #total distance traveled (meters)\n\
00135 float64 angle #total angle traveled (radians)\n\
00136 ";
00137 }
00138
00139 static const char* value(const ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> &) { return value(); }
00140 };
00141
00142 template<class ContainerAllocator> struct IsFixedSize< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> > : public TrueType {};
00143 }
00144 }
00145
00146 namespace ros
00147 {
00148 namespace serialization
00149 {
00150
00151 template<class ContainerAllocator> struct Serializer< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> >
00152 {
00153 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00154 {
00155 stream.next(m.distance);
00156 stream.next(m.angle);
00157 }
00158
00159 ROS_DECLARE_ALLINONE_SERIALIZER;
00160 };
00161 }
00162 }
00163
00164 namespace ros
00165 {
00166 namespace message_operations
00167 {
00168
00169 template<class ContainerAllocator>
00170 struct Printer< ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> >
00171 {
00172 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_mechanism_controllers::Odometer_<ContainerAllocator> & v)
00173 {
00174 s << indent << "distance: ";
00175 Printer<double>::stream(s, indent + " ", v.distance);
00176 s << indent << "angle: ";
00177 Printer<double>::stream(s, indent + " ", v.angle);
00178 }
00179 };
00180
00181
00182 }
00183 }
00184
00185 #endif // PR2_MECHANISM_CONTROLLERS_MESSAGE_ODOMETER_H
00186