00001
00002 #ifndef DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_H
00003 #define DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_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 dynamixel_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct MotorState_ : public ros::Message
00018 {
00019 typedef MotorState_<ContainerAllocator> Type;
00020
00021 MotorState_()
00022 : timestamp(0.0)
00023 , id(0)
00024 , goal(0)
00025 , position(0)
00026 , error(0)
00027 , speed(0)
00028 , load(0.0)
00029 , voltage(0.0)
00030 , temperature(0)
00031 , moving(false)
00032 {
00033 }
00034
00035 MotorState_(const ContainerAllocator& _alloc)
00036 : timestamp(0.0)
00037 , id(0)
00038 , goal(0)
00039 , position(0)
00040 , error(0)
00041 , speed(0)
00042 , load(0.0)
00043 , voltage(0.0)
00044 , temperature(0)
00045 , moving(false)
00046 {
00047 }
00048
00049 typedef double _timestamp_type;
00050 double timestamp;
00051
00052 typedef int32_t _id_type;
00053 int32_t id;
00054
00055 typedef int32_t _goal_type;
00056 int32_t goal;
00057
00058 typedef int32_t _position_type;
00059 int32_t position;
00060
00061 typedef int32_t _error_type;
00062 int32_t error;
00063
00064 typedef int32_t _speed_type;
00065 int32_t speed;
00066
00067 typedef double _load_type;
00068 double load;
00069
00070 typedef double _voltage_type;
00071 double voltage;
00072
00073 typedef int32_t _temperature_type;
00074 int32_t temperature;
00075
00076 typedef uint8_t _moving_type;
00077 uint8_t moving;
00078
00079
00080 private:
00081 static const char* __s_getDataType_() { return "dynamixel_msgs/MotorState"; }
00082 public:
00083 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00084
00085 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00086
00087 private:
00088 static const char* __s_getMD5Sum_() { return "1cefdc3ff0c7d52e475886024476b74d"; }
00089 public:
00090 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00091
00092 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00093
00094 private:
00095 static const char* __s_getMessageDefinition_() { return "float64 timestamp # motor state is at this time\n\
00096 int32 id # motor id\n\
00097 int32 goal # commanded position (in encoder units)\n\
00098 int32 position # current position (in encoder units)\n\
00099 int32 error # difference between current and goal positions\n\
00100 int32 speed # current speed (0.111 rpm per unit)\n\
00101 float64 load # current load - ratio of applied torque over maximum torque\n\
00102 float64 voltage # current voltage (V)\n\
00103 int32 temperature # current temperature (degrees Celsius)\n\
00104 bool moving # whether the motor is currently in motion\n\
00105 \n\
00106 "; }
00107 public:
00108 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00111
00112 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00113 {
00114 ros::serialization::OStream stream(write_ptr, 1000000000);
00115 ros::serialization::serialize(stream, timestamp);
00116 ros::serialization::serialize(stream, id);
00117 ros::serialization::serialize(stream, goal);
00118 ros::serialization::serialize(stream, position);
00119 ros::serialization::serialize(stream, error);
00120 ros::serialization::serialize(stream, speed);
00121 ros::serialization::serialize(stream, load);
00122 ros::serialization::serialize(stream, voltage);
00123 ros::serialization::serialize(stream, temperature);
00124 ros::serialization::serialize(stream, moving);
00125 return stream.getData();
00126 }
00127
00128 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00129 {
00130 ros::serialization::IStream stream(read_ptr, 1000000000);
00131 ros::serialization::deserialize(stream, timestamp);
00132 ros::serialization::deserialize(stream, id);
00133 ros::serialization::deserialize(stream, goal);
00134 ros::serialization::deserialize(stream, position);
00135 ros::serialization::deserialize(stream, error);
00136 ros::serialization::deserialize(stream, speed);
00137 ros::serialization::deserialize(stream, load);
00138 ros::serialization::deserialize(stream, voltage);
00139 ros::serialization::deserialize(stream, temperature);
00140 ros::serialization::deserialize(stream, moving);
00141 return stream.getData();
00142 }
00143
00144 ROS_DEPRECATED virtual uint32_t serializationLength() const
00145 {
00146 uint32_t size = 0;
00147 size += ros::serialization::serializationLength(timestamp);
00148 size += ros::serialization::serializationLength(id);
00149 size += ros::serialization::serializationLength(goal);
00150 size += ros::serialization::serializationLength(position);
00151 size += ros::serialization::serializationLength(error);
00152 size += ros::serialization::serializationLength(speed);
00153 size += ros::serialization::serializationLength(load);
00154 size += ros::serialization::serializationLength(voltage);
00155 size += ros::serialization::serializationLength(temperature);
00156 size += ros::serialization::serializationLength(moving);
00157 return size;
00158 }
00159
00160 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState_<ContainerAllocator> > Ptr;
00161 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState_<ContainerAllocator> const> ConstPtr;
00162 };
00163 typedef ::dynamixel_msgs::MotorState_<std::allocator<void> > MotorState;
00164
00165 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState> MotorStatePtr;
00166 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState const> MotorStateConstPtr;
00167
00168
00169 template<typename ContainerAllocator>
00170 std::ostream& operator<<(std::ostream& s, const ::dynamixel_msgs::MotorState_<ContainerAllocator> & v)
00171 {
00172 ros::message_operations::Printer< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::stream(s, "", v);
00173 return s;}
00174
00175 }
00176
00177 namespace ros
00178 {
00179 namespace message_traits
00180 {
00181 template<class ContainerAllocator>
00182 struct MD5Sum< ::dynamixel_msgs::MotorState_<ContainerAllocator> > {
00183 static const char* value()
00184 {
00185 return "1cefdc3ff0c7d52e475886024476b74d";
00186 }
00187
00188 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); }
00189 static const uint64_t static_value1 = 0x1cefdc3ff0c7d52eULL;
00190 static const uint64_t static_value2 = 0x475886024476b74dULL;
00191 };
00192
00193 template<class ContainerAllocator>
00194 struct DataType< ::dynamixel_msgs::MotorState_<ContainerAllocator> > {
00195 static const char* value()
00196 {
00197 return "dynamixel_msgs/MotorState";
00198 }
00199
00200 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); }
00201 };
00202
00203 template<class ContainerAllocator>
00204 struct Definition< ::dynamixel_msgs::MotorState_<ContainerAllocator> > {
00205 static const char* value()
00206 {
00207 return "float64 timestamp # motor state is at this time\n\
00208 int32 id # motor id\n\
00209 int32 goal # commanded position (in encoder units)\n\
00210 int32 position # current position (in encoder units)\n\
00211 int32 error # difference between current and goal positions\n\
00212 int32 speed # current speed (0.111 rpm per unit)\n\
00213 float64 load # current load - ratio of applied torque over maximum torque\n\
00214 float64 voltage # current voltage (V)\n\
00215 int32 temperature # current temperature (degrees Celsius)\n\
00216 bool moving # whether the motor is currently in motion\n\
00217 \n\
00218 ";
00219 }
00220
00221 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); }
00222 };
00223
00224 template<class ContainerAllocator> struct IsFixedSize< ::dynamixel_msgs::MotorState_<ContainerAllocator> > : public TrueType {};
00225 }
00226 }
00227
00228 namespace ros
00229 {
00230 namespace serialization
00231 {
00232
00233 template<class ContainerAllocator> struct Serializer< ::dynamixel_msgs::MotorState_<ContainerAllocator> >
00234 {
00235 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00236 {
00237 stream.next(m.timestamp);
00238 stream.next(m.id);
00239 stream.next(m.goal);
00240 stream.next(m.position);
00241 stream.next(m.error);
00242 stream.next(m.speed);
00243 stream.next(m.load);
00244 stream.next(m.voltage);
00245 stream.next(m.temperature);
00246 stream.next(m.moving);
00247 }
00248
00249 ROS_DECLARE_ALLINONE_SERIALIZER;
00250 };
00251 }
00252 }
00253
00254 namespace ros
00255 {
00256 namespace message_operations
00257 {
00258
00259 template<class ContainerAllocator>
00260 struct Printer< ::dynamixel_msgs::MotorState_<ContainerAllocator> >
00261 {
00262 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_msgs::MotorState_<ContainerAllocator> & v)
00263 {
00264 s << indent << "timestamp: ";
00265 Printer<double>::stream(s, indent + " ", v.timestamp);
00266 s << indent << "id: ";
00267 Printer<int32_t>::stream(s, indent + " ", v.id);
00268 s << indent << "goal: ";
00269 Printer<int32_t>::stream(s, indent + " ", v.goal);
00270 s << indent << "position: ";
00271 Printer<int32_t>::stream(s, indent + " ", v.position);
00272 s << indent << "error: ";
00273 Printer<int32_t>::stream(s, indent + " ", v.error);
00274 s << indent << "speed: ";
00275 Printer<int32_t>::stream(s, indent + " ", v.speed);
00276 s << indent << "load: ";
00277 Printer<double>::stream(s, indent + " ", v.load);
00278 s << indent << "voltage: ";
00279 Printer<double>::stream(s, indent + " ", v.voltage);
00280 s << indent << "temperature: ";
00281 Printer<int32_t>::stream(s, indent + " ", v.temperature);
00282 s << indent << "moving: ";
00283 Printer<uint8_t>::stream(s, indent + " ", v.moving);
00284 }
00285 };
00286
00287
00288 }
00289 }
00290
00291 #endif // DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_H
00292