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