00001
00002 #ifndef DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_H
00003 #define DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_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
00015 namespace dynamixel_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct JointState_ : public ros::Message
00019 {
00020 typedef JointState_<ContainerAllocator> Type;
00021
00022 JointState_()
00023 : header()
00024 , name()
00025 , motor_ids()
00026 , motor_temps()
00027 , goal_pos(0.0)
00028 , current_pos(0.0)
00029 , error(0.0)
00030 , velocity(0.0)
00031 , load(0.0)
00032 , is_moving(false)
00033 {
00034 }
00035
00036 JointState_(const ContainerAllocator& _alloc)
00037 : header(_alloc)
00038 , name(_alloc)
00039 , motor_ids(_alloc)
00040 , motor_temps(_alloc)
00041 , goal_pos(0.0)
00042 , current_pos(0.0)
00043 , error(0.0)
00044 , velocity(0.0)
00045 , load(0.0)
00046 , is_moving(false)
00047 {
00048 }
00049
00050 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00051 ::std_msgs::Header_<ContainerAllocator> header;
00052
00053 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00054 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00055
00056 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _motor_ids_type;
00057 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > motor_ids;
00058
00059 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _motor_temps_type;
00060 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > motor_temps;
00061
00062 typedef double _goal_pos_type;
00063 double goal_pos;
00064
00065 typedef double _current_pos_type;
00066 double current_pos;
00067
00068 typedef double _error_type;
00069 double error;
00070
00071 typedef double _velocity_type;
00072 double velocity;
00073
00074 typedef double _load_type;
00075 double load;
00076
00077 typedef uint8_t _is_moving_type;
00078 uint8_t is_moving;
00079
00080
00081 ROS_DEPRECATED uint32_t get_motor_ids_size() const { return (uint32_t)motor_ids.size(); }
00082 ROS_DEPRECATED void set_motor_ids_size(uint32_t size) { motor_ids.resize((size_t)size); }
00083 ROS_DEPRECATED void get_motor_ids_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->motor_ids; }
00084 ROS_DEPRECATED void set_motor_ids_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->motor_ids = vec; }
00085 ROS_DEPRECATED uint32_t get_motor_temps_size() const { return (uint32_t)motor_temps.size(); }
00086 ROS_DEPRECATED void set_motor_temps_size(uint32_t size) { motor_temps.resize((size_t)size); }
00087 ROS_DEPRECATED void get_motor_temps_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->motor_temps; }
00088 ROS_DEPRECATED void set_motor_temps_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->motor_temps = vec; }
00089 private:
00090 static const char* __s_getDataType_() { return "dynamixel_msgs/JointState"; }
00091 public:
00092 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00093
00094 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00095
00096 private:
00097 static const char* __s_getMD5Sum_() { return "2b8449320cde76616338e2539db27c32"; }
00098 public:
00099 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00100
00101 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00102
00103 private:
00104 static const char* __s_getMessageDefinition_() { return "Header header\n\
00105 string name # joint name\n\
00106 int32[] motor_ids # motor ids controlling this joint\n\
00107 int32[] motor_temps # motor temperatures, same order as motor_ids\n\
00108 \n\
00109 float64 goal_pos # commanded position (in radians)\n\
00110 float64 current_pos # current joint position (in radians)\n\
00111 float64 error # error between commanded and current positions (in radians)\n\
00112 float64 velocity # current joint speed (in radians per second)\n\
00113 float64 load # current load\n\
00114 bool is_moving # is joint currently in motion\n\
00115 \n\
00116 \n\
00117 ================================================================================\n\
00118 MSG: std_msgs/Header\n\
00119 # Standard metadata for higher-level stamped data types.\n\
00120 # This is generally used to communicate timestamped data \n\
00121 # in a particular coordinate frame.\n\
00122 # \n\
00123 # sequence ID: consecutively increasing ID \n\
00124 uint32 seq\n\
00125 #Two-integer timestamp that is expressed as:\n\
00126 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00127 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00128 # time-handling sugar is provided by the client library\n\
00129 time stamp\n\
00130 #Frame this data is associated with\n\
00131 # 0: no frame\n\
00132 # 1: global frame\n\
00133 string frame_id\n\
00134 \n\
00135 "; }
00136 public:
00137 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00138
00139 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00140
00141 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00142 {
00143 ros::serialization::OStream stream(write_ptr, 1000000000);
00144 ros::serialization::serialize(stream, header);
00145 ros::serialization::serialize(stream, name);
00146 ros::serialization::serialize(stream, motor_ids);
00147 ros::serialization::serialize(stream, motor_temps);
00148 ros::serialization::serialize(stream, goal_pos);
00149 ros::serialization::serialize(stream, current_pos);
00150 ros::serialization::serialize(stream, error);
00151 ros::serialization::serialize(stream, velocity);
00152 ros::serialization::serialize(stream, load);
00153 ros::serialization::serialize(stream, is_moving);
00154 return stream.getData();
00155 }
00156
00157 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00158 {
00159 ros::serialization::IStream stream(read_ptr, 1000000000);
00160 ros::serialization::deserialize(stream, header);
00161 ros::serialization::deserialize(stream, name);
00162 ros::serialization::deserialize(stream, motor_ids);
00163 ros::serialization::deserialize(stream, motor_temps);
00164 ros::serialization::deserialize(stream, goal_pos);
00165 ros::serialization::deserialize(stream, current_pos);
00166 ros::serialization::deserialize(stream, error);
00167 ros::serialization::deserialize(stream, velocity);
00168 ros::serialization::deserialize(stream, load);
00169 ros::serialization::deserialize(stream, is_moving);
00170 return stream.getData();
00171 }
00172
00173 ROS_DEPRECATED virtual uint32_t serializationLength() const
00174 {
00175 uint32_t size = 0;
00176 size += ros::serialization::serializationLength(header);
00177 size += ros::serialization::serializationLength(name);
00178 size += ros::serialization::serializationLength(motor_ids);
00179 size += ros::serialization::serializationLength(motor_temps);
00180 size += ros::serialization::serializationLength(goal_pos);
00181 size += ros::serialization::serializationLength(current_pos);
00182 size += ros::serialization::serializationLength(error);
00183 size += ros::serialization::serializationLength(velocity);
00184 size += ros::serialization::serializationLength(load);
00185 size += ros::serialization::serializationLength(is_moving);
00186 return size;
00187 }
00188
00189 typedef boost::shared_ptr< ::dynamixel_msgs::JointState_<ContainerAllocator> > Ptr;
00190 typedef boost::shared_ptr< ::dynamixel_msgs::JointState_<ContainerAllocator> const> ConstPtr;
00191 };
00192 typedef ::dynamixel_msgs::JointState_<std::allocator<void> > JointState;
00193
00194 typedef boost::shared_ptr< ::dynamixel_msgs::JointState> JointStatePtr;
00195 typedef boost::shared_ptr< ::dynamixel_msgs::JointState const> JointStateConstPtr;
00196
00197
00198 template<typename ContainerAllocator>
00199 std::ostream& operator<<(std::ostream& s, const ::dynamixel_msgs::JointState_<ContainerAllocator> & v)
00200 {
00201 ros::message_operations::Printer< ::dynamixel_msgs::JointState_<ContainerAllocator> >::stream(s, "", v);
00202 return s;}
00203
00204 }
00205
00206 namespace ros
00207 {
00208 namespace message_traits
00209 {
00210 template<class ContainerAllocator>
00211 struct MD5Sum< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00212 static const char* value()
00213 {
00214 return "2b8449320cde76616338e2539db27c32";
00215 }
00216
00217 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00218 static const uint64_t static_value1 = 0x2b8449320cde7661ULL;
00219 static const uint64_t static_value2 = 0x6338e2539db27c32ULL;
00220 };
00221
00222 template<class ContainerAllocator>
00223 struct DataType< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00224 static const char* value()
00225 {
00226 return "dynamixel_msgs/JointState";
00227 }
00228
00229 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00230 };
00231
00232 template<class ContainerAllocator>
00233 struct Definition< ::dynamixel_msgs::JointState_<ContainerAllocator> > {
00234 static const char* value()
00235 {
00236 return "Header header\n\
00237 string name # joint name\n\
00238 int32[] motor_ids # motor ids controlling this joint\n\
00239 int32[] motor_temps # motor temperatures, same order as motor_ids\n\
00240 \n\
00241 float64 goal_pos # commanded position (in radians)\n\
00242 float64 current_pos # current joint position (in radians)\n\
00243 float64 error # error between commanded and current positions (in radians)\n\
00244 float64 velocity # current joint speed (in radians per second)\n\
00245 float64 load # current load\n\
00246 bool is_moving # is joint currently in motion\n\
00247 \n\
00248 \n\
00249 ================================================================================\n\
00250 MSG: std_msgs/Header\n\
00251 # Standard metadata for higher-level stamped data types.\n\
00252 # This is generally used to communicate timestamped data \n\
00253 # in a particular coordinate frame.\n\
00254 # \n\
00255 # sequence ID: consecutively increasing ID \n\
00256 uint32 seq\n\
00257 #Two-integer timestamp that is expressed as:\n\
00258 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00259 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00260 # time-handling sugar is provided by the client library\n\
00261 time stamp\n\
00262 #Frame this data is associated with\n\
00263 # 0: no frame\n\
00264 # 1: global frame\n\
00265 string frame_id\n\
00266 \n\
00267 ";
00268 }
00269
00270 static const char* value(const ::dynamixel_msgs::JointState_<ContainerAllocator> &) { return value(); }
00271 };
00272
00273 template<class ContainerAllocator> struct HasHeader< ::dynamixel_msgs::JointState_<ContainerAllocator> > : public TrueType {};
00274 template<class ContainerAllocator> struct HasHeader< const ::dynamixel_msgs::JointState_<ContainerAllocator> > : public TrueType {};
00275 }
00276 }
00277
00278 namespace ros
00279 {
00280 namespace serialization
00281 {
00282
00283 template<class ContainerAllocator> struct Serializer< ::dynamixel_msgs::JointState_<ContainerAllocator> >
00284 {
00285 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00286 {
00287 stream.next(m.header);
00288 stream.next(m.name);
00289 stream.next(m.motor_ids);
00290 stream.next(m.motor_temps);
00291 stream.next(m.goal_pos);
00292 stream.next(m.current_pos);
00293 stream.next(m.error);
00294 stream.next(m.velocity);
00295 stream.next(m.load);
00296 stream.next(m.is_moving);
00297 }
00298
00299 ROS_DECLARE_ALLINONE_SERIALIZER;
00300 };
00301 }
00302 }
00303
00304 namespace ros
00305 {
00306 namespace message_operations
00307 {
00308
00309 template<class ContainerAllocator>
00310 struct Printer< ::dynamixel_msgs::JointState_<ContainerAllocator> >
00311 {
00312 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_msgs::JointState_<ContainerAllocator> & v)
00313 {
00314 s << indent << "header: ";
00315 s << std::endl;
00316 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00317 s << indent << "name: ";
00318 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00319 s << indent << "motor_ids[]" << std::endl;
00320 for (size_t i = 0; i < v.motor_ids.size(); ++i)
00321 {
00322 s << indent << " motor_ids[" << i << "]: ";
00323 Printer<int32_t>::stream(s, indent + " ", v.motor_ids[i]);
00324 }
00325 s << indent << "motor_temps[]" << std::endl;
00326 for (size_t i = 0; i < v.motor_temps.size(); ++i)
00327 {
00328 s << indent << " motor_temps[" << i << "]: ";
00329 Printer<int32_t>::stream(s, indent + " ", v.motor_temps[i]);
00330 }
00331 s << indent << "goal_pos: ";
00332 Printer<double>::stream(s, indent + " ", v.goal_pos);
00333 s << indent << "current_pos: ";
00334 Printer<double>::stream(s, indent + " ", v.current_pos);
00335 s << indent << "error: ";
00336 Printer<double>::stream(s, indent + " ", v.error);
00337 s << indent << "velocity: ";
00338 Printer<double>::stream(s, indent + " ", v.velocity);
00339 s << indent << "load: ";
00340 Printer<double>::stream(s, indent + " ", v.load);
00341 s << indent << "is_moving: ";
00342 Printer<uint8_t>::stream(s, indent + " ", v.is_moving);
00343 }
00344 };
00345
00346
00347 }
00348 }
00349
00350 #endif // DYNAMIXEL_MSGS_MESSAGE_JOINTSTATE_H
00351