Go to the documentation of this file.00001
00002 #ifndef KDL_ARM_KINEMATICS_MESSAGE_KDLWEIGHTS_H
00003 #define KDL_ARM_KINEMATICS_MESSAGE_KDLWEIGHTS_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 kdl_arm_kinematics
00019 {
00020 template <class ContainerAllocator>
00021 struct KDLWeights_ {
00022 typedef KDLWeights_<ContainerAllocator> Type;
00023
00024 KDLWeights_()
00025 : mode(0)
00026 , weight_ts()
00027 , weight_js()
00028 , lambda(0.0)
00029 {
00030 weight_ts.assign(0.0);
00031 }
00032
00033 KDLWeights_(const ContainerAllocator& _alloc)
00034 : mode(0)
00035 , weight_ts()
00036 , weight_js(_alloc)
00037 , lambda(0.0)
00038 {
00039 weight_ts.assign(0.0);
00040 }
00041
00042 typedef int8_t _mode_type;
00043 int8_t mode;
00044
00045 typedef boost::array<double, 36> _weight_ts_type;
00046 boost::array<double, 36> weight_ts;
00047
00048 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _weight_js_type;
00049 std::vector<double, typename ContainerAllocator::template rebind<double>::other > weight_js;
00050
00051 typedef double _lambda_type;
00052 double lambda;
00053
00054 enum { INVALID_MODE = 0 };
00055 enum { SET_TS = 1 };
00056 enum { SET_JS = 2 };
00057 enum { SET_LAMBDA = 4 };
00058 enum { SET_TS_JS = 3 };
00059
00060 typedef boost::shared_ptr< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> > Ptr;
00061 typedef boost::shared_ptr< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> const> ConstPtr;
00062 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00063 };
00064 typedef ::kdl_arm_kinematics::KDLWeights_<std::allocator<void> > KDLWeights;
00065
00066 typedef boost::shared_ptr< ::kdl_arm_kinematics::KDLWeights> KDLWeightsPtr;
00067 typedef boost::shared_ptr< ::kdl_arm_kinematics::KDLWeights const> KDLWeightsConstPtr;
00068
00069
00070 template<typename ContainerAllocator>
00071 std::ostream& operator<<(std::ostream& s, const ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> & v)
00072 {
00073 ros::message_operations::Printer< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> >::stream(s, "", v);
00074 return s;}
00075
00076 }
00077
00078 namespace ros
00079 {
00080 namespace message_traits
00081 {
00082 template<class ContainerAllocator> struct IsMessage< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> > : public TrueType {};
00083 template<class ContainerAllocator> struct IsMessage< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> const> : public TrueType {};
00084 template<class ContainerAllocator>
00085 struct MD5Sum< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> > {
00086 static const char* value()
00087 {
00088 return "986315cd29a99987092b708377dfd2ce";
00089 }
00090
00091 static const char* value(const ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> &) { return value(); }
00092 static const uint64_t static_value1 = 0x986315cd29a99987ULL;
00093 static const uint64_t static_value2 = 0x092b708377dfd2ceULL;
00094 };
00095
00096 template<class ContainerAllocator>
00097 struct DataType< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> > {
00098 static const char* value()
00099 {
00100 return "kdl_arm_kinematics/KDLWeights";
00101 }
00102
00103 static const char* value(const ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> &) { return value(); }
00104 };
00105
00106 template<class ContainerAllocator>
00107 struct Definition< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> > {
00108 static const char* value()
00109 {
00110 return "byte INVALID_MODE = 0\n\
00111 byte SET_TS = 1\n\
00112 byte SET_JS = 2\n\
00113 byte SET_LAMBDA = 4\n\
00114 byte SET_TS_JS = 3\n\
00115 \n\
00116 byte mode # or-combination of values to set\n\
00117 float64[36] weight_ts # the 6x6 matrix of task space weights in row-major order\n\
00118 float64[] weight_js # the joints x joints matrix of joint space weights in row-major order\n\
00119 float64 lambda # Lambda value\n\
00120 \n\
00121 ";
00122 }
00123
00124 static const char* value(const ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> &) { return value(); }
00125 };
00126
00127 }
00128 }
00129
00130 namespace ros
00131 {
00132 namespace serialization
00133 {
00134
00135 template<class ContainerAllocator> struct Serializer< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> >
00136 {
00137 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00138 {
00139 stream.next(m.mode);
00140 stream.next(m.weight_ts);
00141 stream.next(m.weight_js);
00142 stream.next(m.lambda);
00143 }
00144
00145 ROS_DECLARE_ALLINONE_SERIALIZER;
00146 };
00147 }
00148 }
00149
00150 namespace ros
00151 {
00152 namespace message_operations
00153 {
00154
00155 template<class ContainerAllocator>
00156 struct Printer< ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> >
00157 {
00158 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::kdl_arm_kinematics::KDLWeights_<ContainerAllocator> & v)
00159 {
00160 s << indent << "mode: ";
00161 Printer<int8_t>::stream(s, indent + " ", v.mode);
00162 s << indent << "weight_ts[]" << std::endl;
00163 for (size_t i = 0; i < v.weight_ts.size(); ++i)
00164 {
00165 s << indent << " weight_ts[" << i << "]: ";
00166 Printer<double>::stream(s, indent + " ", v.weight_ts[i]);
00167 }
00168 s << indent << "weight_js[]" << std::endl;
00169 for (size_t i = 0; i < v.weight_js.size(); ++i)
00170 {
00171 s << indent << " weight_js[" << i << "]: ";
00172 Printer<double>::stream(s, indent + " ", v.weight_js[i]);
00173 }
00174 s << indent << "lambda: ";
00175 Printer<double>::stream(s, indent + " ", v.lambda);
00176 }
00177 };
00178
00179
00180 }
00181 }
00182
00183 #endif // KDL_ARM_KINEMATICS_MESSAGE_KDLWEIGHTS_H
00184