00001
00002 #ifndef DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_H
00003 #define DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "std_msgs/Header.h"
00018
00019 namespace dynamixel_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct JointState_ {
00023 typedef JointState_<ContainerAllocator> Type;
00024
00025 JointState_()
00026 : header()
00027 , name()
00028 , motor_ids()
00029 , motor_temps()
00030 , goal_pos(0.0)
00031 , current_pos(0.0)
00032 , error(0.0)
00033 , velocity(0.0)
00034 , load(0.0)
00035 , is_moving(false)
00036 {
00037 }
00038
00039 JointState_(const ContainerAllocator& _alloc)
00040 : header(_alloc)
00041 , name(_alloc)
00042 , motor_ids(_alloc)
00043 , motor_temps(_alloc)
00044 , goal_pos(0.0)
00045 , current_pos(0.0)
00046 , error(0.0)
00047 , velocity(0.0)
00048 , load(0.0)
00049 , is_moving(false)
00050 {
00051 }
00052
00053 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00054 ::std_msgs::Header_<ContainerAllocator> header;
00055
00056 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00057 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00058
00059 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _motor_ids_type;
00060 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > motor_ids;
00061
00062 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _motor_temps_type;
00063 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > motor_temps;
00064
00065 typedef double _goal_pos_type;
00066 double goal_pos;
00067
00068 typedef double _current_pos_type;
00069 double current_pos;
00070
00071 typedef double _error_type;
00072 double error;
00073
00074 typedef double _velocity_type;
00075 double velocity;
00076
00077 typedef double _load_type;
00078 double load;
00079
00080 typedef uint8_t _is_moving_type;
00081 uint8_t is_moving;
00082
00083
00084 typedef boost::shared_ptr< ::dynamixel_msgs::JointState_<ContainerAllocator> > Ptr;
00085 typedef boost::shared_ptr< ::dynamixel_msgs::JointState_<ContainerAllocator> const> ConstPtr;
00086 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00087 };
00088 typedef ::dynamixel_msgs::JointState_<std::allocator<void> > JointState;
00089
00090 typedef boost::shared_ptr< ::dynamixel_msgs::JointState> JointStatePtr;
00091 typedef boost::shared_ptr< ::dynamixel_msgs::JointState const> JointStateConstPtr;
00092
00093
00094 template<typename ContainerAllocator>
00095 std::ostream& operator<<(std::ostream& s, const ::dynamixel_msgs::JointState_<ContainerAllocator> & v)
00096 {
00097 ros::message_operations::Printer< ::dynamixel_msgs::JointState_<ContainerAllocator> >::stream(s, "", v);
00098 return s;}
00099
00100 }
00101
00102 namespace ros
00103 {
00104 namespace message_traits
00105 {
00106 template<class ContainerAllocator> struct IsMessage< ::dynamixel_msgs::JointState_<ContainerAllocator> > : public TrueType {};
00107 template<class ContainerAllocator> struct IsMessage< ::dynamixel_msgs::JointState_<ContainerAllocator> const> : public TrueType {};
00108 template<class ContainerAllocator>
00109 struct MD5Sum< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00110 static const char* value()
00111 {
00112 return "2b8449320cde76616338e2539db27c32";
00113 }
00114
00115 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00116 static const uint64_t static_value1 = 0x2b8449320cde7661ULL;
00117 static const uint64_t static_value2 = 0x6338e2539db27c32ULL;
00118 };
00119
00120 template<class ContainerAllocator>
00121 struct DataType< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00122 static const char* value()
00123 {
00124 return "dynamixel_msgs/JointState";
00125 }
00126
00127 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00128 };
00129
00130 template<class ContainerAllocator>
00131 struct Definition< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "Header header\n\
00135 string name # joint name\n\
00136 int32[] motor_ids # motor ids controlling this joint\n\
00137 int32[] motor_temps # motor temperatures, same order as motor_ids\n\
00138 \n\
00139 float64 goal_pos # commanded position (in radians)\n\
00140 float64 current_pos # current joint position (in radians)\n\
00141 float64 error # error between commanded and current positions (in radians)\n\
00142 float64 velocity # current joint speed (in radians per second)\n\
00143 float64 load # current load\n\
00144 bool is_moving # is joint currently in motion\n\
00145 \n\
00146 \n\
00147 ================================================================================\n\
00148 MSG: std_msgs/Header\n\
00149 # Standard metadata for higher-level stamped data types.\n\
00150 # This is generally used to communicate timestamped data \n\
00151 # in a particular coordinate frame.\n\
00152 # \n\
00153 # sequence ID: consecutively increasing ID \n\
00154 uint32 seq\n\
00155 #Two-integer timestamp that is expressed as:\n\
00156 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00157 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00158 # time-handling sugar is provided by the client library\n\
00159 time stamp\n\
00160 #Frame this data is associated with\n\
00161 # 0: no frame\n\
00162 # 1: global frame\n\
00163 string frame_id\n\
00164 \n\
00165 ";
00166 }
00167
00168 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00169 };
00170
00171 template<class ContainerAllocator> struct HasHeader< ::dynamixel_msgs::JointState_<ContainerAllocator> > : public TrueType {};
00172 template<class ContainerAllocator> struct HasHeader< const ::dynamixel_msgs::JointState_<ContainerAllocator> > : public TrueType {};
00173 }
00174 }
00175
00176 namespace ros
00177 {
00178 namespace serialization
00179 {
00180
00181 template<class ContainerAllocator> struct Serializer< ::dynamixel_msgs::JointState_<ContainerAllocator> >
00182 {
00183 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00184 {
00185 stream.next(m.header);
00186 stream.next(m.name);
00187 stream.next(m.motor_ids);
00188 stream.next(m.motor_temps);
00189 stream.next(m.goal_pos);
00190 stream.next(m.current_pos);
00191 stream.next(m.error);
00192 stream.next(m.velocity);
00193 stream.next(m.load);
00194 stream.next(m.is_moving);
00195 }
00196
00197 ROS_DECLARE_ALLINONE_SERIALIZER;
00198 };
00199 }
00200 }
00201
00202 namespace ros
00203 {
00204 namespace message_operations
00205 {
00206
00207 template<class ContainerAllocator>
00208 struct Printer< ::dynamixel_msgs::JointState_<ContainerAllocator> >
00209 {
00210 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_msgs::JointState_<ContainerAllocator> & v)
00211 {
00212 s << indent << "header: ";
00213 s << std::endl;
00214 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00215 s << indent << "name: ";
00216 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00217 s << indent << "motor_ids[]" << std::endl;
00218 for (size_t i = 0; i < v.motor_ids.size(); ++i)
00219 {
00220 s << indent << " motor_ids[" << i << "]: ";
00221 Printer<int32_t>::stream(s, indent + " ", v.motor_ids[i]);
00222 }
00223 s << indent << "motor_temps[]" << std::endl;
00224 for (size_t i = 0; i < v.motor_temps.size(); ++i)
00225 {
00226 s << indent << " motor_temps[" << i << "]: ";
00227 Printer<int32_t>::stream(s, indent + " ", v.motor_temps[i]);
00228 }
00229 s << indent << "goal_pos: ";
00230 Printer<double>::stream(s, indent + " ", v.goal_pos);
00231 s << indent << "current_pos: ";
00232 Printer<double>::stream(s, indent + " ", v.current_pos);
00233 s << indent << "error: ";
00234 Printer<double>::stream(s, indent + " ", v.error);
00235 s << indent << "velocity: ";
00236 Printer<double>::stream(s, indent + " ", v.velocity);
00237 s << indent << "load: ";
00238 Printer<double>::stream(s, indent + " ", v.load);
00239 s << indent << "is_moving: ";
00240 Printer<uint8_t>::stream(s, indent + " ", v.is_moving);
00241 }
00242 };
00243
00244
00245 }
00246 }
00247
00248 #endif // DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_H
00249