00001
00002 #ifndef PR2_MSGS_MESSAGE_ACCELEROMETERSTATE_H
00003 #define PR2_MSGS_MESSAGE_ACCELEROMETERSTATE_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 "std_msgs/Header.h"
00014 #include "geometry_msgs/Vector3.h"
00015
00016 namespace pr2_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct AccelerometerState_ : public ros::Message
00020 {
00021 typedef AccelerometerState_<ContainerAllocator> Type;
00022
00023 AccelerometerState_()
00024 : header()
00025 , samples()
00026 {
00027 }
00028
00029 AccelerometerState_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , samples(_alloc)
00032 {
00033 }
00034
00035 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00036 ::std_msgs::Header_<ContainerAllocator> header;
00037
00038 typedef std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > _samples_type;
00039 std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > samples;
00040
00041
00042 ROS_DEPRECATED uint32_t get_samples_size() const { return (uint32_t)samples.size(); }
00043 ROS_DEPRECATED void set_samples_size(uint32_t size) { samples.resize((size_t)size); }
00044 ROS_DEPRECATED void get_samples_vec(std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) const { vec = this->samples; }
00045 ROS_DEPRECATED void set_samples_vec(const std::vector< ::geometry_msgs::Vector3_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Vector3_<ContainerAllocator> >::other > & vec) { this->samples = vec; }
00046 private:
00047 static const char* __s_getDataType_() { return "pr2_msgs/AccelerometerState"; }
00048 public:
00049 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00050
00051 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00052
00053 private:
00054 static const char* __s_getMD5Sum_() { return "26492e97ed8c13252c4a85592d3e93fd"; }
00055 public:
00056 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00057
00058 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00059
00060 private:
00061 static const char* __s_getMessageDefinition_() { return "#This captures acceleration measurements from the 3-dof accelerometer in the hand of the PR2\n\
00062 #Units are meters / second / second\n\
00063 #Vectors should be <X, Y, Z> in the frame of the gripper\n\
00064 \n\
00065 #The communication with the accelerometer is at approximately 3khz, but there is only good timestamping every 1ms\n\
00066 #This means the samples should be interpreted as all having come from the 1 ms before the time in the header\n\
00067 \n\
00068 Header header\n\
00069 geometry_msgs/Vector3[] samples\n\
00070 \n\
00071 ================================================================================\n\
00072 MSG: std_msgs/Header\n\
00073 # Standard metadata for higher-level stamped data types.\n\
00074 # This is generally used to communicate timestamped data \n\
00075 # in a particular coordinate frame.\n\
00076 # \n\
00077 # sequence ID: consecutively increasing ID \n\
00078 uint32 seq\n\
00079 #Two-integer timestamp that is expressed as:\n\
00080 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00081 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00082 # time-handling sugar is provided by the client library\n\
00083 time stamp\n\
00084 #Frame this data is associated with\n\
00085 # 0: no frame\n\
00086 # 1: global frame\n\
00087 string frame_id\n\
00088 \n\
00089 ================================================================================\n\
00090 MSG: geometry_msgs/Vector3\n\
00091 # This represents a vector in free space. \n\
00092 \n\
00093 float64 x\n\
00094 float64 y\n\
00095 float64 z\n\
00096 "; }
00097 public:
00098 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00099
00100 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00101
00102 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00103 {
00104 ros::serialization::OStream stream(write_ptr, 1000000000);
00105 ros::serialization::serialize(stream, header);
00106 ros::serialization::serialize(stream, samples);
00107 return stream.getData();
00108 }
00109
00110 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00111 {
00112 ros::serialization::IStream stream(read_ptr, 1000000000);
00113 ros::serialization::deserialize(stream, header);
00114 ros::serialization::deserialize(stream, samples);
00115 return stream.getData();
00116 }
00117
00118 ROS_DEPRECATED virtual uint32_t serializationLength() const
00119 {
00120 uint32_t size = 0;
00121 size += ros::serialization::serializationLength(header);
00122 size += ros::serialization::serializationLength(samples);
00123 return size;
00124 }
00125
00126 typedef boost::shared_ptr< ::pr2_msgs::AccelerometerState_<ContainerAllocator> > Ptr;
00127 typedef boost::shared_ptr< ::pr2_msgs::AccelerometerState_<ContainerAllocator> const> ConstPtr;
00128 };
00129 typedef ::pr2_msgs::AccelerometerState_<std::allocator<void> > AccelerometerState;
00130
00131 typedef boost::shared_ptr< ::pr2_msgs::AccelerometerState> AccelerometerStatePtr;
00132 typedef boost::shared_ptr< ::pr2_msgs::AccelerometerState const> AccelerometerStateConstPtr;
00133
00134
00135 template<typename ContainerAllocator>
00136 std::ostream& operator<<(std::ostream& s, const ::pr2_msgs::AccelerometerState_<ContainerAllocator> & v)
00137 {
00138 ros::message_operations::Printer< ::pr2_msgs::AccelerometerState_<ContainerAllocator> >::stream(s, "", v);
00139 return s;}
00140
00141 }
00142
00143 namespace ros
00144 {
00145 namespace message_traits
00146 {
00147 template<class ContainerAllocator>
00148 struct MD5Sum< ::pr2_msgs::AccelerometerState_<ContainerAllocator> > {
00149 static const char* value()
00150 {
00151 return "26492e97ed8c13252c4a85592d3e93fd";
00152 }
00153
00154 static const char* value(const ::pr2_msgs::AccelerometerState_<ContainerAllocator> &) { return value(); }
00155 static const uint64_t static_value1 = 0x26492e97ed8c1325ULL;
00156 static const uint64_t static_value2 = 0x2c4a85592d3e93fdULL;
00157 };
00158
00159 template<class ContainerAllocator>
00160 struct DataType< ::pr2_msgs::AccelerometerState_<ContainerAllocator> > {
00161 static const char* value()
00162 {
00163 return "pr2_msgs/AccelerometerState";
00164 }
00165
00166 static const char* value(const ::pr2_msgs::AccelerometerState_<ContainerAllocator> &) { return value(); }
00167 };
00168
00169 template<class ContainerAllocator>
00170 struct Definition< ::pr2_msgs::AccelerometerState_<ContainerAllocator> > {
00171 static const char* value()
00172 {
00173 return "#This captures acceleration measurements from the 3-dof accelerometer in the hand of the PR2\n\
00174 #Units are meters / second / second\n\
00175 #Vectors should be <X, Y, Z> in the frame of the gripper\n\
00176 \n\
00177 #The communication with the accelerometer is at approximately 3khz, but there is only good timestamping every 1ms\n\
00178 #This means the samples should be interpreted as all having come from the 1 ms before the time in the header\n\
00179 \n\
00180 Header header\n\
00181 geometry_msgs/Vector3[] samples\n\
00182 \n\
00183 ================================================================================\n\
00184 MSG: std_msgs/Header\n\
00185 # Standard metadata for higher-level stamped data types.\n\
00186 # This is generally used to communicate timestamped data \n\
00187 # in a particular coordinate frame.\n\
00188 # \n\
00189 # sequence ID: consecutively increasing ID \n\
00190 uint32 seq\n\
00191 #Two-integer timestamp that is expressed as:\n\
00192 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00193 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00194 # time-handling sugar is provided by the client library\n\
00195 time stamp\n\
00196 #Frame this data is associated with\n\
00197 # 0: no frame\n\
00198 # 1: global frame\n\
00199 string frame_id\n\
00200 \n\
00201 ================================================================================\n\
00202 MSG: geometry_msgs/Vector3\n\
00203 # This represents a vector in free space. \n\
00204 \n\
00205 float64 x\n\
00206 float64 y\n\
00207 float64 z\n\
00208 ";
00209 }
00210
00211 static const char* value(const ::pr2_msgs::AccelerometerState_<ContainerAllocator> &) { return value(); }
00212 };
00213
00214 template<class ContainerAllocator> struct HasHeader< ::pr2_msgs::AccelerometerState_<ContainerAllocator> > : public TrueType {};
00215 template<class ContainerAllocator> struct HasHeader< const ::pr2_msgs::AccelerometerState_<ContainerAllocator> > : public TrueType {};
00216 }
00217 }
00218
00219 namespace ros
00220 {
00221 namespace serialization
00222 {
00223
00224 template<class ContainerAllocator> struct Serializer< ::pr2_msgs::AccelerometerState_<ContainerAllocator> >
00225 {
00226 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00227 {
00228 stream.next(m.header);
00229 stream.next(m.samples);
00230 }
00231
00232 ROS_DECLARE_ALLINONE_SERIALIZER;
00233 };
00234 }
00235 }
00236
00237 namespace ros
00238 {
00239 namespace message_operations
00240 {
00241
00242 template<class ContainerAllocator>
00243 struct Printer< ::pr2_msgs::AccelerometerState_<ContainerAllocator> >
00244 {
00245 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_msgs::AccelerometerState_<ContainerAllocator> & v)
00246 {
00247 s << indent << "header: ";
00248 s << std::endl;
00249 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00250 s << indent << "samples[]" << std::endl;
00251 for (size_t i = 0; i < v.samples.size(); ++i)
00252 {
00253 s << indent << " samples[" << i << "]: ";
00254 s << std::endl;
00255 s << indent;
00256 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.samples[i]);
00257 }
00258 }
00259 };
00260
00261
00262 }
00263 }
00264
00265 #endif // PR2_MSGS_MESSAGE_ACCELEROMETERSTATE_H
00266