00001
00002 #ifndef PR2_MECHANISM_MSGS_MESSAGE_JOINTSTATISTICS_H
00003 #define PR2_MECHANISM_MSGS_MESSAGE_JOINTSTATISTICS_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_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct JointStatistics_ : public ros::Message
00018 {
00019 typedef JointStatistics_<ContainerAllocator> Type;
00020
00021 JointStatistics_()
00022 : name()
00023 , timestamp()
00024 , position(0.0)
00025 , velocity(0.0)
00026 , measured_effort(0.0)
00027 , commanded_effort(0.0)
00028 , is_calibrated(false)
00029 , violated_limits(false)
00030 , odometer(0.0)
00031 , min_position(0.0)
00032 , max_position(0.0)
00033 , max_abs_velocity(0.0)
00034 , max_abs_effort(0.0)
00035 {
00036 }
00037
00038 JointStatistics_(const ContainerAllocator& _alloc)
00039 : name(_alloc)
00040 , timestamp()
00041 , position(0.0)
00042 , velocity(0.0)
00043 , measured_effort(0.0)
00044 , commanded_effort(0.0)
00045 , is_calibrated(false)
00046 , violated_limits(false)
00047 , odometer(0.0)
00048 , min_position(0.0)
00049 , max_position(0.0)
00050 , max_abs_velocity(0.0)
00051 , max_abs_effort(0.0)
00052 {
00053 }
00054
00055 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00056 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00057
00058 typedef ros::Time _timestamp_type;
00059 ros::Time timestamp;
00060
00061 typedef double _position_type;
00062 double position;
00063
00064 typedef double _velocity_type;
00065 double velocity;
00066
00067 typedef double _measured_effort_type;
00068 double measured_effort;
00069
00070 typedef double _commanded_effort_type;
00071 double commanded_effort;
00072
00073 typedef uint8_t _is_calibrated_type;
00074 uint8_t is_calibrated;
00075
00076 typedef uint8_t _violated_limits_type;
00077 uint8_t violated_limits;
00078
00079 typedef double _odometer_type;
00080 double odometer;
00081
00082 typedef double _min_position_type;
00083 double min_position;
00084
00085 typedef double _max_position_type;
00086 double max_position;
00087
00088 typedef double _max_abs_velocity_type;
00089 double max_abs_velocity;
00090
00091 typedef double _max_abs_effort_type;
00092 double max_abs_effort;
00093
00094
00095 private:
00096 static const char* __s_getDataType_() { return "pr2_mechanism_msgs/JointStatistics"; }
00097 public:
00098 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00099
00100 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00101
00102 private:
00103 static const char* __s_getMD5Sum_() { return "90fdc8acbce5bc783d8b4aec49af6590"; }
00104 public:
00105 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00106
00107 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00108
00109 private:
00110 static const char* __s_getMessageDefinition_() { return "# This message contains the state of one joint of the pr2 robot.\n\
00111 # This message is specificly designed for the pr2 robot. \n\
00112 # A generic joint state message can be found in sensor_msgs::JointState\n\
00113 \n\
00114 # the name of the joint\n\
00115 string name\n\
00116 \n\
00117 # the time at which these joint statistics were measured\n\
00118 time timestamp\n\
00119 \n\
00120 # the position of the joint in radians\n\
00121 float64 position\n\
00122 \n\
00123 # the velocity of the joint in radians per second\n\
00124 float64 velocity\n\
00125 \n\
00126 # the measured joint effort \n\
00127 float64 measured_effort\n\
00128 \n\
00129 # the effort that was commanded to the joint.\n\
00130 # the actual applied effort might be different\n\
00131 # because the safety code can limit the effort\n\
00132 # a joint can apply\n\
00133 float64 commanded_effort\n\
00134 \n\
00135 # a flag indicating if the joint is calibrated or not\n\
00136 bool is_calibrated\n\
00137 \n\
00138 # a flag inidcating if the joint violated one of its position/velocity/effort limits\n\
00139 # in the last publish cycle\n\
00140 bool violated_limits\n\
00141 \n\
00142 # the total distance travelled by the joint, measured in radians.\n\
00143 float64 odometer\n\
00144 \n\
00145 # the lowest position reached by the joint in the last publish cycle\n\
00146 float64 min_position\n\
00147 \n\
00148 # the highest position reached by the joint in the last publish cycle\n\
00149 float64 max_position\n\
00150 \n\
00151 # the maximum absolute velocity reached by the joint in the last publish cycle\n\
00152 float64 max_abs_velocity\n\
00153 \n\
00154 # the maximum absolute effort applied by the joint in the last publish cycle\n\
00155 float64 max_abs_effort\n\
00156 \n\
00157 "; }
00158 public:
00159 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00160
00161 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00162
00163 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00164 {
00165 ros::serialization::OStream stream(write_ptr, 1000000000);
00166 ros::serialization::serialize(stream, name);
00167 ros::serialization::serialize(stream, timestamp);
00168 ros::serialization::serialize(stream, position);
00169 ros::serialization::serialize(stream, velocity);
00170 ros::serialization::serialize(stream, measured_effort);
00171 ros::serialization::serialize(stream, commanded_effort);
00172 ros::serialization::serialize(stream, is_calibrated);
00173 ros::serialization::serialize(stream, violated_limits);
00174 ros::serialization::serialize(stream, odometer);
00175 ros::serialization::serialize(stream, min_position);
00176 ros::serialization::serialize(stream, max_position);
00177 ros::serialization::serialize(stream, max_abs_velocity);
00178 ros::serialization::serialize(stream, max_abs_effort);
00179 return stream.getData();
00180 }
00181
00182 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00183 {
00184 ros::serialization::IStream stream(read_ptr, 1000000000);
00185 ros::serialization::deserialize(stream, name);
00186 ros::serialization::deserialize(stream, timestamp);
00187 ros::serialization::deserialize(stream, position);
00188 ros::serialization::deserialize(stream, velocity);
00189 ros::serialization::deserialize(stream, measured_effort);
00190 ros::serialization::deserialize(stream, commanded_effort);
00191 ros::serialization::deserialize(stream, is_calibrated);
00192 ros::serialization::deserialize(stream, violated_limits);
00193 ros::serialization::deserialize(stream, odometer);
00194 ros::serialization::deserialize(stream, min_position);
00195 ros::serialization::deserialize(stream, max_position);
00196 ros::serialization::deserialize(stream, max_abs_velocity);
00197 ros::serialization::deserialize(stream, max_abs_effort);
00198 return stream.getData();
00199 }
00200
00201 ROS_DEPRECATED virtual uint32_t serializationLength() const
00202 {
00203 uint32_t size = 0;
00204 size += ros::serialization::serializationLength(name);
00205 size += ros::serialization::serializationLength(timestamp);
00206 size += ros::serialization::serializationLength(position);
00207 size += ros::serialization::serializationLength(velocity);
00208 size += ros::serialization::serializationLength(measured_effort);
00209 size += ros::serialization::serializationLength(commanded_effort);
00210 size += ros::serialization::serializationLength(is_calibrated);
00211 size += ros::serialization::serializationLength(violated_limits);
00212 size += ros::serialization::serializationLength(odometer);
00213 size += ros::serialization::serializationLength(min_position);
00214 size += ros::serialization::serializationLength(max_position);
00215 size += ros::serialization::serializationLength(max_abs_velocity);
00216 size += ros::serialization::serializationLength(max_abs_effort);
00217 return size;
00218 }
00219
00220 typedef boost::shared_ptr< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> > Ptr;
00221 typedef boost::shared_ptr< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> const> ConstPtr;
00222 };
00223 typedef ::pr2_mechanism_msgs::JointStatistics_<std::allocator<void> > JointStatistics;
00224
00225 typedef boost::shared_ptr< ::pr2_mechanism_msgs::JointStatistics> JointStatisticsPtr;
00226 typedef boost::shared_ptr< ::pr2_mechanism_msgs::JointStatistics const> JointStatisticsConstPtr;
00227
00228
00229 template<typename ContainerAllocator>
00230 std::ostream& operator<<(std::ostream& s, const ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> & v)
00231 {
00232 ros::message_operations::Printer< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> >::stream(s, "", v);
00233 return s;}
00234
00235 }
00236
00237 namespace ros
00238 {
00239 namespace message_traits
00240 {
00241 template<class ContainerAllocator>
00242 struct MD5Sum< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> > {
00243 static const char* value()
00244 {
00245 return "90fdc8acbce5bc783d8b4aec49af6590";
00246 }
00247
00248 static const char* value(const ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> &) { return value(); }
00249 static const uint64_t static_value1 = 0x90fdc8acbce5bc78ULL;
00250 static const uint64_t static_value2 = 0x3d8b4aec49af6590ULL;
00251 };
00252
00253 template<class ContainerAllocator>
00254 struct DataType< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> > {
00255 static const char* value()
00256 {
00257 return "pr2_mechanism_msgs/JointStatistics";
00258 }
00259
00260 static const char* value(const ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> &) { return value(); }
00261 };
00262
00263 template<class ContainerAllocator>
00264 struct Definition< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> > {
00265 static const char* value()
00266 {
00267 return "# This message contains the state of one joint of the pr2 robot.\n\
00268 # This message is specificly designed for the pr2 robot. \n\
00269 # A generic joint state message can be found in sensor_msgs::JointState\n\
00270 \n\
00271 # the name of the joint\n\
00272 string name\n\
00273 \n\
00274 # the time at which these joint statistics were measured\n\
00275 time timestamp\n\
00276 \n\
00277 # the position of the joint in radians\n\
00278 float64 position\n\
00279 \n\
00280 # the velocity of the joint in radians per second\n\
00281 float64 velocity\n\
00282 \n\
00283 # the measured joint effort \n\
00284 float64 measured_effort\n\
00285 \n\
00286 # the effort that was commanded to the joint.\n\
00287 # the actual applied effort might be different\n\
00288 # because the safety code can limit the effort\n\
00289 # a joint can apply\n\
00290 float64 commanded_effort\n\
00291 \n\
00292 # a flag indicating if the joint is calibrated or not\n\
00293 bool is_calibrated\n\
00294 \n\
00295 # a flag inidcating if the joint violated one of its position/velocity/effort limits\n\
00296 # in the last publish cycle\n\
00297 bool violated_limits\n\
00298 \n\
00299 # the total distance travelled by the joint, measured in radians.\n\
00300 float64 odometer\n\
00301 \n\
00302 # the lowest position reached by the joint in the last publish cycle\n\
00303 float64 min_position\n\
00304 \n\
00305 # the highest position reached by the joint in the last publish cycle\n\
00306 float64 max_position\n\
00307 \n\
00308 # the maximum absolute velocity reached by the joint in the last publish cycle\n\
00309 float64 max_abs_velocity\n\
00310 \n\
00311 # the maximum absolute effort applied by the joint in the last publish cycle\n\
00312 float64 max_abs_effort\n\
00313 \n\
00314 ";
00315 }
00316
00317 static const char* value(const ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> &) { return value(); }
00318 };
00319
00320 }
00321 }
00322
00323 namespace ros
00324 {
00325 namespace serialization
00326 {
00327
00328 template<class ContainerAllocator> struct Serializer< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> >
00329 {
00330 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00331 {
00332 stream.next(m.name);
00333 stream.next(m.timestamp);
00334 stream.next(m.position);
00335 stream.next(m.velocity);
00336 stream.next(m.measured_effort);
00337 stream.next(m.commanded_effort);
00338 stream.next(m.is_calibrated);
00339 stream.next(m.violated_limits);
00340 stream.next(m.odometer);
00341 stream.next(m.min_position);
00342 stream.next(m.max_position);
00343 stream.next(m.max_abs_velocity);
00344 stream.next(m.max_abs_effort);
00345 }
00346
00347 ROS_DECLARE_ALLINONE_SERIALIZER;
00348 };
00349 }
00350 }
00351
00352 namespace ros
00353 {
00354 namespace message_operations
00355 {
00356
00357 template<class ContainerAllocator>
00358 struct Printer< ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> >
00359 {
00360 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_mechanism_msgs::JointStatistics_<ContainerAllocator> & v)
00361 {
00362 s << indent << "name: ";
00363 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00364 s << indent << "timestamp: ";
00365 Printer<ros::Time>::stream(s, indent + " ", v.timestamp);
00366 s << indent << "position: ";
00367 Printer<double>::stream(s, indent + " ", v.position);
00368 s << indent << "velocity: ";
00369 Printer<double>::stream(s, indent + " ", v.velocity);
00370 s << indent << "measured_effort: ";
00371 Printer<double>::stream(s, indent + " ", v.measured_effort);
00372 s << indent << "commanded_effort: ";
00373 Printer<double>::stream(s, indent + " ", v.commanded_effort);
00374 s << indent << "is_calibrated: ";
00375 Printer<uint8_t>::stream(s, indent + " ", v.is_calibrated);
00376 s << indent << "violated_limits: ";
00377 Printer<uint8_t>::stream(s, indent + " ", v.violated_limits);
00378 s << indent << "odometer: ";
00379 Printer<double>::stream(s, indent + " ", v.odometer);
00380 s << indent << "min_position: ";
00381 Printer<double>::stream(s, indent + " ", v.min_position);
00382 s << indent << "max_position: ";
00383 Printer<double>::stream(s, indent + " ", v.max_position);
00384 s << indent << "max_abs_velocity: ";
00385 Printer<double>::stream(s, indent + " ", v.max_abs_velocity);
00386 s << indent << "max_abs_effort: ";
00387 Printer<double>::stream(s, indent + " ", v.max_abs_effort);
00388 }
00389 };
00390
00391
00392 }
00393 }
00394
00395 #endif // PR2_MECHANISM_MSGS_MESSAGE_JOINTSTATISTICS_H
00396