00001
00002 #ifndef ETHERCAT_HARDWARE_MESSAGE_MOTORTRACE_H
00003 #define ETHERCAT_HARDWARE_MESSAGE_MOTORTRACE_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 #include "ethercat_hardware/BoardInfo.h"
00015 #include "ethercat_hardware/ActuatorInfo.h"
00016 #include "ethercat_hardware/MotorTraceSample.h"
00017
00018 namespace ethercat_hardware
00019 {
00020 template <class ContainerAllocator>
00021 struct MotorTrace_ : public ros::Message
00022 {
00023 typedef MotorTrace_<ContainerAllocator> Type;
00024
00025 MotorTrace_()
00026 : header()
00027 , reason()
00028 , board_info()
00029 , actuator_info()
00030 , samples()
00031 {
00032 }
00033
00034 MotorTrace_(const ContainerAllocator& _alloc)
00035 : header(_alloc)
00036 , reason(_alloc)
00037 , board_info(_alloc)
00038 , actuator_info(_alloc)
00039 , samples(_alloc)
00040 {
00041 }
00042
00043 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00044 ::std_msgs::Header_<ContainerAllocator> header;
00045
00046 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _reason_type;
00047 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > reason;
00048
00049 typedef ::ethercat_hardware::BoardInfo_<ContainerAllocator> _board_info_type;
00050 ::ethercat_hardware::BoardInfo_<ContainerAllocator> board_info;
00051
00052 typedef ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> _actuator_info_type;
00053 ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> actuator_info;
00054
00055 typedef std::vector< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::other > _samples_type;
00056 std::vector< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::other > samples;
00057
00058
00059 ROS_DEPRECATED uint32_t get_samples_size() const { return (uint32_t)samples.size(); }
00060 ROS_DEPRECATED void set_samples_size(uint32_t size) { samples.resize((size_t)size); }
00061 ROS_DEPRECATED void get_samples_vec(std::vector< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::other > & vec) const { vec = this->samples; }
00062 ROS_DEPRECATED void set_samples_vec(const std::vector< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::other > & vec) { this->samples = vec; }
00063 private:
00064 static const char* __s_getDataType_() { return "ethercat_hardware/MotorTrace"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00067
00068 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00069
00070 private:
00071 static const char* __s_getMD5Sum_() { return "ada0b8b7f00967d292bd5bb4f59d4bd8"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00074
00075 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00076
00077 private:
00078 static const char* __s_getMessageDefinition_() { return "Header header\n\
00079 string reason\n\
00080 ethercat_hardware/BoardInfo board_info\n\
00081 ethercat_hardware/ActuatorInfo actuator_info\n\
00082 ethercat_hardware/MotorTraceSample[] samples\n\
00083 ================================================================================\n\
00084 MSG: std_msgs/Header\n\
00085 # Standard metadata for higher-level stamped data types.\n\
00086 # This is generally used to communicate timestamped data \n\
00087 # in a particular coordinate frame.\n\
00088 # \n\
00089 # sequence ID: consecutively increasing ID \n\
00090 uint32 seq\n\
00091 #Two-integer timestamp that is expressed as:\n\
00092 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00093 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00094 # time-handling sugar is provided by the client library\n\
00095 time stamp\n\
00096 #Frame this data is associated with\n\
00097 # 0: no frame\n\
00098 # 1: global frame\n\
00099 string frame_id\n\
00100 \n\
00101 ================================================================================\n\
00102 MSG: ethercat_hardware/BoardInfo\n\
00103 string description\n\
00104 uint32 product_code\n\
00105 uint32 pcb\n\
00106 uint32 pca\n\
00107 uint32 serial\n\
00108 uint32 firmware_major\n\
00109 uint32 firmware_minor\n\
00110 float64 board_resistance\n\
00111 float64 max_pwm_ratio\n\
00112 float64 hw_max_current\n\
00113 bool poor_measured_motor_voltage\n\
00114 ================================================================================\n\
00115 MSG: ethercat_hardware/ActuatorInfo\n\
00116 uint32 id\n\
00117 string name\n\
00118 string robot_name\n\
00119 string motor_make\n\
00120 string motor_model\n\
00121 float64 max_current\n\
00122 float64 speed_constant\n\
00123 float64 motor_resistance\n\
00124 float64 motor_torque_constant\n\
00125 float64 encoder_reduction\n\
00126 float64 pulses_per_revolution\n\
00127 ================================================================================\n\
00128 MSG: ethercat_hardware/MotorTraceSample\n\
00129 float64 timestamp\n\
00130 bool enabled\n\
00131 float64 supply_voltage\n\
00132 float64 measured_motor_voltage\n\
00133 float64 programmed_pwm\n\
00134 float64 executed_current\n\
00135 float64 measured_current\n\
00136 float64 velocity\n\
00137 float64 encoder_position\n\
00138 uint32 encoder_error_count\n\
00139 float64 motor_voltage_error_limit\n\
00140 float64 filtered_motor_voltage_error\n\
00141 float64 filtered_abs_motor_voltage_error\n\
00142 float64 filtered_measured_voltage_error\n\
00143 float64 filtered_abs_measured_voltage_error\n\
00144 float64 filtered_current_error\n\
00145 float64 filtered_abs_current_error\n\
00146 "; }
00147 public:
00148 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00149
00150 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00151
00152 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00153 {
00154 ros::serialization::OStream stream(write_ptr, 1000000000);
00155 ros::serialization::serialize(stream, header);
00156 ros::serialization::serialize(stream, reason);
00157 ros::serialization::serialize(stream, board_info);
00158 ros::serialization::serialize(stream, actuator_info);
00159 ros::serialization::serialize(stream, samples);
00160 return stream.getData();
00161 }
00162
00163 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00164 {
00165 ros::serialization::IStream stream(read_ptr, 1000000000);
00166 ros::serialization::deserialize(stream, header);
00167 ros::serialization::deserialize(stream, reason);
00168 ros::serialization::deserialize(stream, board_info);
00169 ros::serialization::deserialize(stream, actuator_info);
00170 ros::serialization::deserialize(stream, samples);
00171 return stream.getData();
00172 }
00173
00174 ROS_DEPRECATED virtual uint32_t serializationLength() const
00175 {
00176 uint32_t size = 0;
00177 size += ros::serialization::serializationLength(header);
00178 size += ros::serialization::serializationLength(reason);
00179 size += ros::serialization::serializationLength(board_info);
00180 size += ros::serialization::serializationLength(actuator_info);
00181 size += ros::serialization::serializationLength(samples);
00182 return size;
00183 }
00184
00185 typedef boost::shared_ptr< ::ethercat_hardware::MotorTrace_<ContainerAllocator> > Ptr;
00186 typedef boost::shared_ptr< ::ethercat_hardware::MotorTrace_<ContainerAllocator> const> ConstPtr;
00187 };
00188 typedef ::ethercat_hardware::MotorTrace_<std::allocator<void> > MotorTrace;
00189
00190 typedef boost::shared_ptr< ::ethercat_hardware::MotorTrace> MotorTracePtr;
00191 typedef boost::shared_ptr< ::ethercat_hardware::MotorTrace const> MotorTraceConstPtr;
00192
00193
00194 template<typename ContainerAllocator>
00195 std::ostream& operator<<(std::ostream& s, const ::ethercat_hardware::MotorTrace_<ContainerAllocator> & v)
00196 {
00197 ros::message_operations::Printer< ::ethercat_hardware::MotorTrace_<ContainerAllocator> >::stream(s, "", v);
00198 return s;}
00199
00200 }
00201
00202 namespace ros
00203 {
00204 namespace message_traits
00205 {
00206 template<class ContainerAllocator>
00207 struct MD5Sum< ::ethercat_hardware::MotorTrace_<ContainerAllocator> > {
00208 static const char* value()
00209 {
00210 return "ada0b8b7f00967d292bd5bb4f59d4bd8";
00211 }
00212
00213 static const char* value(const ::ethercat_hardware::MotorTrace_<ContainerAllocator> &) { return value(); }
00214 static const uint64_t static_value1 = 0xada0b8b7f00967d2ULL;
00215 static const uint64_t static_value2 = 0x92bd5bb4f59d4bd8ULL;
00216 };
00217
00218 template<class ContainerAllocator>
00219 struct DataType< ::ethercat_hardware::MotorTrace_<ContainerAllocator> > {
00220 static const char* value()
00221 {
00222 return "ethercat_hardware/MotorTrace";
00223 }
00224
00225 static const char* value(const ::ethercat_hardware::MotorTrace_<ContainerAllocator> &) { return value(); }
00226 };
00227
00228 template<class ContainerAllocator>
00229 struct Definition< ::ethercat_hardware::MotorTrace_<ContainerAllocator> > {
00230 static const char* value()
00231 {
00232 return "Header header\n\
00233 string reason\n\
00234 ethercat_hardware/BoardInfo board_info\n\
00235 ethercat_hardware/ActuatorInfo actuator_info\n\
00236 ethercat_hardware/MotorTraceSample[] samples\n\
00237 ================================================================================\n\
00238 MSG: std_msgs/Header\n\
00239 # Standard metadata for higher-level stamped data types.\n\
00240 # This is generally used to communicate timestamped data \n\
00241 # in a particular coordinate frame.\n\
00242 # \n\
00243 # sequence ID: consecutively increasing ID \n\
00244 uint32 seq\n\
00245 #Two-integer timestamp that is expressed as:\n\
00246 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00247 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00248 # time-handling sugar is provided by the client library\n\
00249 time stamp\n\
00250 #Frame this data is associated with\n\
00251 # 0: no frame\n\
00252 # 1: global frame\n\
00253 string frame_id\n\
00254 \n\
00255 ================================================================================\n\
00256 MSG: ethercat_hardware/BoardInfo\n\
00257 string description\n\
00258 uint32 product_code\n\
00259 uint32 pcb\n\
00260 uint32 pca\n\
00261 uint32 serial\n\
00262 uint32 firmware_major\n\
00263 uint32 firmware_minor\n\
00264 float64 board_resistance\n\
00265 float64 max_pwm_ratio\n\
00266 float64 hw_max_current\n\
00267 bool poor_measured_motor_voltage\n\
00268 ================================================================================\n\
00269 MSG: ethercat_hardware/ActuatorInfo\n\
00270 uint32 id\n\
00271 string name\n\
00272 string robot_name\n\
00273 string motor_make\n\
00274 string motor_model\n\
00275 float64 max_current\n\
00276 float64 speed_constant\n\
00277 float64 motor_resistance\n\
00278 float64 motor_torque_constant\n\
00279 float64 encoder_reduction\n\
00280 float64 pulses_per_revolution\n\
00281 ================================================================================\n\
00282 MSG: ethercat_hardware/MotorTraceSample\n\
00283 float64 timestamp\n\
00284 bool enabled\n\
00285 float64 supply_voltage\n\
00286 float64 measured_motor_voltage\n\
00287 float64 programmed_pwm\n\
00288 float64 executed_current\n\
00289 float64 measured_current\n\
00290 float64 velocity\n\
00291 float64 encoder_position\n\
00292 uint32 encoder_error_count\n\
00293 float64 motor_voltage_error_limit\n\
00294 float64 filtered_motor_voltage_error\n\
00295 float64 filtered_abs_motor_voltage_error\n\
00296 float64 filtered_measured_voltage_error\n\
00297 float64 filtered_abs_measured_voltage_error\n\
00298 float64 filtered_current_error\n\
00299 float64 filtered_abs_current_error\n\
00300 ";
00301 }
00302
00303 static const char* value(const ::ethercat_hardware::MotorTrace_<ContainerAllocator> &) { return value(); }
00304 };
00305
00306 template<class ContainerAllocator> struct HasHeader< ::ethercat_hardware::MotorTrace_<ContainerAllocator> > : public TrueType {};
00307 template<class ContainerAllocator> struct HasHeader< const ::ethercat_hardware::MotorTrace_<ContainerAllocator> > : public TrueType {};
00308 }
00309 }
00310
00311 namespace ros
00312 {
00313 namespace serialization
00314 {
00315
00316 template<class ContainerAllocator> struct Serializer< ::ethercat_hardware::MotorTrace_<ContainerAllocator> >
00317 {
00318 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00319 {
00320 stream.next(m.header);
00321 stream.next(m.reason);
00322 stream.next(m.board_info);
00323 stream.next(m.actuator_info);
00324 stream.next(m.samples);
00325 }
00326
00327 ROS_DECLARE_ALLINONE_SERIALIZER;
00328 };
00329 }
00330 }
00331
00332 namespace ros
00333 {
00334 namespace message_operations
00335 {
00336
00337 template<class ContainerAllocator>
00338 struct Printer< ::ethercat_hardware::MotorTrace_<ContainerAllocator> >
00339 {
00340 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_hardware::MotorTrace_<ContainerAllocator> & v)
00341 {
00342 s << indent << "header: ";
00343 s << std::endl;
00344 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00345 s << indent << "reason: ";
00346 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.reason);
00347 s << indent << "board_info: ";
00348 s << std::endl;
00349 Printer< ::ethercat_hardware::BoardInfo_<ContainerAllocator> >::stream(s, indent + " ", v.board_info);
00350 s << indent << "actuator_info: ";
00351 s << std::endl;
00352 Printer< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> >::stream(s, indent + " ", v.actuator_info);
00353 s << indent << "samples[]" << std::endl;
00354 for (size_t i = 0; i < v.samples.size(); ++i)
00355 {
00356 s << indent << " samples[" << i << "]: ";
00357 s << std::endl;
00358 s << indent;
00359 Printer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::stream(s, indent + " ", v.samples[i]);
00360 }
00361 }
00362 };
00363
00364
00365 }
00366 }
00367
00368 #endif // ETHERCAT_HARDWARE_MESSAGE_MOTORTRACE_H
00369