00001
00002 #ifndef DYNAMIXEL_HARDWARE_INTERFACE_MESSAGE_MOTORSTATE_H
00003 #define DYNAMIXEL_HARDWARE_INTERFACE_MESSAGE_MOTORSTATE_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
00018 namespace dynamixel_hardware_interface
00019 {
00020 template <class ContainerAllocator>
00021 struct MotorState_ {
00022 typedef MotorState_<ContainerAllocator> Type;
00023
00024 MotorState_()
00025 : timestamp(0.0)
00026 , id(0)
00027 , target_position(0)
00028 , target_velocity(0)
00029 , position(0)
00030 , velocity(0)
00031 , torque_limit(0)
00032 , load(0)
00033 , moving(false)
00034 , voltage(0)
00035 , temperature(0)
00036 {
00037 }
00038
00039 MotorState_(const ContainerAllocator& _alloc)
00040 : timestamp(0.0)
00041 , id(0)
00042 , target_position(0)
00043 , target_velocity(0)
00044 , position(0)
00045 , velocity(0)
00046 , torque_limit(0)
00047 , load(0)
00048 , moving(false)
00049 , voltage(0)
00050 , temperature(0)
00051 {
00052 }
00053
00054 typedef double _timestamp_type;
00055 double timestamp;
00056
00057 typedef int32_t _id_type;
00058 int32_t id;
00059
00060 typedef int32_t _target_position_type;
00061 int32_t target_position;
00062
00063 typedef int32_t _target_velocity_type;
00064 int32_t target_velocity;
00065
00066 typedef int32_t _position_type;
00067 int32_t position;
00068
00069 typedef int32_t _velocity_type;
00070 int32_t velocity;
00071
00072 typedef int32_t _torque_limit_type;
00073 int32_t torque_limit;
00074
00075 typedef int32_t _load_type;
00076 int32_t load;
00077
00078 typedef uint8_t _moving_type;
00079 uint8_t moving;
00080
00081 typedef int32_t _voltage_type;
00082 int32_t voltage;
00083
00084 typedef int32_t _temperature_type;
00085 int32_t temperature;
00086
00087
00088 typedef boost::shared_ptr< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > Ptr;
00089 typedef boost::shared_ptr< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> const> ConstPtr;
00090 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00091 };
00092 typedef ::dynamixel_hardware_interface::MotorState_<std::allocator<void> > MotorState;
00093
00094 typedef boost::shared_ptr< ::dynamixel_hardware_interface::MotorState> MotorStatePtr;
00095 typedef boost::shared_ptr< ::dynamixel_hardware_interface::MotorState const> MotorStateConstPtr;
00096
00097
00098 template<typename ContainerAllocator>
00099 std::ostream& operator<<(std::ostream& s, const ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> & v)
00100 {
00101 ros::message_operations::Printer< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> >::stream(s, "", v);
00102 return s;}
00103
00104 }
00105
00106 namespace ros
00107 {
00108 namespace message_traits
00109 {
00110 template<class ContainerAllocator> struct IsMessage< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > : public TrueType {};
00111 template<class ContainerAllocator> struct IsMessage< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> const> : public TrueType {};
00112 template<class ContainerAllocator>
00113 struct MD5Sum< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > {
00114 static const char* value()
00115 {
00116 return "96055d7680f5f0b2177ce65f44ce437f";
00117 }
00118
00119 static const char* value(const ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> &) { return value(); }
00120 static const uint64_t static_value1 = 0x96055d7680f5f0b2ULL;
00121 static const uint64_t static_value2 = 0x177ce65f44ce437fULL;
00122 };
00123
00124 template<class ContainerAllocator>
00125 struct DataType< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > {
00126 static const char* value()
00127 {
00128 return "dynamixel_hardware_interface/MotorState";
00129 }
00130
00131 static const char* value(const ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> &) { return value(); }
00132 };
00133
00134 template<class ContainerAllocator>
00135 struct Definition< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > {
00136 static const char* value()
00137 {
00138 return "# all values are in encoder units unless otherwise specified\n\
00139 \n\
00140 float64 timestamp # motor state is at this time\n\
00141 \n\
00142 int32 id # motor id\n\
00143 int32 target_position # commanded position\n\
00144 int32 target_velocity # commanded velocity\n\
00145 int32 position # current position\n\
00146 int32 velocity # current velocity\n\
00147 int32 torque_limit # current torque limit\n\
00148 int32 load # current load - ratio of applied torque over maximum torque\n\
00149 bool moving # whether the motor is currently in motion\n\
00150 \n\
00151 int32 voltage # current voltage (V * 10)\n\
00152 int32 temperature # current temperature (degrees Celsius)\n\
00153 \n\
00154 \n\
00155 ";
00156 }
00157
00158 static const char* value(const ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> &) { return value(); }
00159 };
00160
00161 template<class ContainerAllocator> struct IsFixedSize< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> > : public TrueType {};
00162 }
00163 }
00164
00165 namespace ros
00166 {
00167 namespace serialization
00168 {
00169
00170 template<class ContainerAllocator> struct Serializer< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> >
00171 {
00172 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00173 {
00174 stream.next(m.timestamp);
00175 stream.next(m.id);
00176 stream.next(m.target_position);
00177 stream.next(m.target_velocity);
00178 stream.next(m.position);
00179 stream.next(m.velocity);
00180 stream.next(m.torque_limit);
00181 stream.next(m.load);
00182 stream.next(m.moving);
00183 stream.next(m.voltage);
00184 stream.next(m.temperature);
00185 }
00186
00187 ROS_DECLARE_ALLINONE_SERIALIZER;
00188 };
00189 }
00190 }
00191
00192 namespace ros
00193 {
00194 namespace message_operations
00195 {
00196
00197 template<class ContainerAllocator>
00198 struct Printer< ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> >
00199 {
00200 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_hardware_interface::MotorState_<ContainerAllocator> & v)
00201 {
00202 s << indent << "timestamp: ";
00203 Printer<double>::stream(s, indent + " ", v.timestamp);
00204 s << indent << "id: ";
00205 Printer<int32_t>::stream(s, indent + " ", v.id);
00206 s << indent << "target_position: ";
00207 Printer<int32_t>::stream(s, indent + " ", v.target_position);
00208 s << indent << "target_velocity: ";
00209 Printer<int32_t>::stream(s, indent + " ", v.target_velocity);
00210 s << indent << "position: ";
00211 Printer<int32_t>::stream(s, indent + " ", v.position);
00212 s << indent << "velocity: ";
00213 Printer<int32_t>::stream(s, indent + " ", v.velocity);
00214 s << indent << "torque_limit: ";
00215 Printer<int32_t>::stream(s, indent + " ", v.torque_limit);
00216 s << indent << "load: ";
00217 Printer<int32_t>::stream(s, indent + " ", v.load);
00218 s << indent << "moving: ";
00219 Printer<uint8_t>::stream(s, indent + " ", v.moving);
00220 s << indent << "voltage: ";
00221 Printer<int32_t>::stream(s, indent + " ", v.voltage);
00222 s << indent << "temperature: ";
00223 Printer<int32_t>::stream(s, indent + " ", v.temperature);
00224 }
00225 };
00226
00227
00228 }
00229 }
00230
00231 #endif // DYNAMIXEL_HARDWARE_INTERFACE_MESSAGE_MOTORSTATE_H
00232