Go to the documentation of this file.00001
00002 #ifndef DMP_SERVICE_LEARNDMPFROMDEMO_H
00003 #define DMP_SERVICE_LEARNDMPFROMDEMO_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 "ros/service_traits.h"
00018
00019 #include "dmp/DMPTraj.h"
00020
00021
00022 #include "dmp/DMPData.h"
00023
00024 namespace dmp
00025 {
00026 template <class ContainerAllocator>
00027 struct LearnDMPFromDemoRequest_ {
00028 typedef LearnDMPFromDemoRequest_<ContainerAllocator> Type;
00029
00030 LearnDMPFromDemoRequest_()
00031 : demo()
00032 , k_gains()
00033 , d_gains()
00034 , num_bases(0)
00035 {
00036 }
00037
00038 LearnDMPFromDemoRequest_(const ContainerAllocator& _alloc)
00039 : demo(_alloc)
00040 , k_gains(_alloc)
00041 , d_gains(_alloc)
00042 , num_bases(0)
00043 {
00044 }
00045
00046 typedef ::dmp::DMPTraj_<ContainerAllocator> _demo_type;
00047 ::dmp::DMPTraj_<ContainerAllocator> demo;
00048
00049 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _k_gains_type;
00050 std::vector<double, typename ContainerAllocator::template rebind<double>::other > k_gains;
00051
00052 typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _d_gains_type;
00053 std::vector<double, typename ContainerAllocator::template rebind<double>::other > d_gains;
00054
00055 typedef int32_t _num_bases_type;
00056 int32_t num_bases;
00057
00058
00059 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > Ptr;
00060 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> const> ConstPtr;
00061 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00062 };
00063 typedef ::dmp::LearnDMPFromDemoRequest_<std::allocator<void> > LearnDMPFromDemoRequest;
00064
00065 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoRequest> LearnDMPFromDemoRequestPtr;
00066 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoRequest const> LearnDMPFromDemoRequestConstPtr;
00067
00068
00069
00070 template <class ContainerAllocator>
00071 struct LearnDMPFromDemoResponse_ {
00072 typedef LearnDMPFromDemoResponse_<ContainerAllocator> Type;
00073
00074 LearnDMPFromDemoResponse_()
00075 : dmp_list()
00076 , tau(0.0)
00077 {
00078 }
00079
00080 LearnDMPFromDemoResponse_(const ContainerAllocator& _alloc)
00081 : dmp_list(_alloc)
00082 , tau(0.0)
00083 {
00084 }
00085
00086 typedef std::vector< ::dmp::DMPData_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dmp::DMPData_<ContainerAllocator> >::other > _dmp_list_type;
00087 std::vector< ::dmp::DMPData_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dmp::DMPData_<ContainerAllocator> >::other > dmp_list;
00088
00089 typedef double _tau_type;
00090 double tau;
00091
00092
00093 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > Ptr;
00094 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> const> ConstPtr;
00095 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00096 };
00097 typedef ::dmp::LearnDMPFromDemoResponse_<std::allocator<void> > LearnDMPFromDemoResponse;
00098
00099 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoResponse> LearnDMPFromDemoResponsePtr;
00100 typedef boost::shared_ptr< ::dmp::LearnDMPFromDemoResponse const> LearnDMPFromDemoResponseConstPtr;
00101
00102
00103 struct LearnDMPFromDemo
00104 {
00105
00106 typedef LearnDMPFromDemoRequest Request;
00107 typedef LearnDMPFromDemoResponse Response;
00108 Request request;
00109 Response response;
00110
00111 typedef Request RequestType;
00112 typedef Response ResponseType;
00113 };
00114 }
00115
00116 namespace ros
00117 {
00118 namespace message_traits
00119 {
00120 template<class ContainerAllocator> struct IsMessage< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > : public TrueType {};
00121 template<class ContainerAllocator> struct IsMessage< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> const> : public TrueType {};
00122 template<class ContainerAllocator>
00123 struct MD5Sum< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > {
00124 static const char* value()
00125 {
00126 return "d7c68a7f789c246aea188ade43175b30";
00127 }
00128
00129 static const char* value(const ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> &) { return value(); }
00130 static const uint64_t static_value1 = 0xd7c68a7f789c246aULL;
00131 static const uint64_t static_value2 = 0xea188ade43175b30ULL;
00132 };
00133
00134 template<class ContainerAllocator>
00135 struct DataType< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > {
00136 static const char* value()
00137 {
00138 return "dmp/LearnDMPFromDemoRequest";
00139 }
00140
00141 static const char* value(const ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> &) { return value(); }
00142 };
00143
00144 template<class ContainerAllocator>
00145 struct Definition< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > {
00146 static const char* value()
00147 {
00148 return "\n\
00149 DMPTraj demo\n\
00150 \n\
00151 \n\
00152 float64[] k_gains\n\
00153 float64[] d_gains\n\
00154 \n\
00155 \n\
00156 int32 num_bases\n\
00157 \n\
00158 \n\
00159 ================================================================================\n\
00160 MSG: dmp/DMPTraj\n\
00161 # points and times should be the same length\n\
00162 DMPPoint[] points\n\
00163 \n\
00164 # Times of observations, in seconds, starting at zero\n\
00165 float64[] times\n\
00166 \n\
00167 \n\
00168 \n\
00169 ================================================================================\n\
00170 MSG: dmp/DMPPoint\n\
00171 # Positions and velocities of DOFs\n\
00172 #Velocity is only used for movement plans, not for giving demonstrations.\n\
00173 float64[] positions\n\
00174 float64[] velocities\n\
00175 \n\
00176 \n\
00177 \n\
00178 ";
00179 }
00180
00181 static const char* value(const ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> &) { return value(); }
00182 };
00183
00184 }
00185 }
00186
00187
00188 namespace ros
00189 {
00190 namespace message_traits
00191 {
00192 template<class ContainerAllocator> struct IsMessage< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > : public TrueType {};
00193 template<class ContainerAllocator> struct IsMessage< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> const> : public TrueType {};
00194 template<class ContainerAllocator>
00195 struct MD5Sum< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > {
00196 static const char* value()
00197 {
00198 return "d2dccae00aae58574694dfa33e62fac1";
00199 }
00200
00201 static const char* value(const ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> &) { return value(); }
00202 static const uint64_t static_value1 = 0xd2dccae00aae5857ULL;
00203 static const uint64_t static_value2 = 0x4694dfa33e62fac1ULL;
00204 };
00205
00206 template<class ContainerAllocator>
00207 struct DataType< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > {
00208 static const char* value()
00209 {
00210 return "dmp/LearnDMPFromDemoResponse";
00211 }
00212
00213 static const char* value(const ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> &) { return value(); }
00214 };
00215
00216 template<class ContainerAllocator>
00217 struct Definition< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > {
00218 static const char* value()
00219 {
00220 return "\n\
00221 \n\
00222 DMPData[] dmp_list\n\
00223 \n\
00224 \n\
00225 float64 tau\n\
00226 \n\
00227 \n\
00228 ================================================================================\n\
00229 MSG: dmp/DMPData\n\
00230 float64 k_gain\n\
00231 float64 d_gain\n\
00232 float64[] weights\n\
00233 float64[] f_domain\n\
00234 float64[] f_targets\n\
00235 \n\
00236 \n\
00237 ";
00238 }
00239
00240 static const char* value(const ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> &) { return value(); }
00241 };
00242
00243 }
00244 }
00245
00246 namespace ros
00247 {
00248 namespace serialization
00249 {
00250
00251 template<class ContainerAllocator> struct Serializer< ::dmp::LearnDMPFromDemoRequest_<ContainerAllocator> >
00252 {
00253 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00254 {
00255 stream.next(m.demo);
00256 stream.next(m.k_gains);
00257 stream.next(m.d_gains);
00258 stream.next(m.num_bases);
00259 }
00260
00261 ROS_DECLARE_ALLINONE_SERIALIZER;
00262 };
00263 }
00264 }
00265
00266
00267 namespace ros
00268 {
00269 namespace serialization
00270 {
00271
00272 template<class ContainerAllocator> struct Serializer< ::dmp::LearnDMPFromDemoResponse_<ContainerAllocator> >
00273 {
00274 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00275 {
00276 stream.next(m.dmp_list);
00277 stream.next(m.tau);
00278 }
00279
00280 ROS_DECLARE_ALLINONE_SERIALIZER;
00281 };
00282 }
00283 }
00284
00285 namespace ros
00286 {
00287 namespace service_traits
00288 {
00289 template<>
00290 struct MD5Sum<dmp::LearnDMPFromDemo> {
00291 static const char* value()
00292 {
00293 return "3ba13cfa47585560a2fd9cc202efdbff";
00294 }
00295
00296 static const char* value(const dmp::LearnDMPFromDemo&) { return value(); }
00297 };
00298
00299 template<>
00300 struct DataType<dmp::LearnDMPFromDemo> {
00301 static const char* value()
00302 {
00303 return "dmp/LearnDMPFromDemo";
00304 }
00305
00306 static const char* value(const dmp::LearnDMPFromDemo&) { return value(); }
00307 };
00308
00309 template<class ContainerAllocator>
00310 struct MD5Sum<dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > {
00311 static const char* value()
00312 {
00313 return "3ba13cfa47585560a2fd9cc202efdbff";
00314 }
00315
00316 static const char* value(const dmp::LearnDMPFromDemoRequest_<ContainerAllocator> &) { return value(); }
00317 };
00318
00319 template<class ContainerAllocator>
00320 struct DataType<dmp::LearnDMPFromDemoRequest_<ContainerAllocator> > {
00321 static const char* value()
00322 {
00323 return "dmp/LearnDMPFromDemo";
00324 }
00325
00326 static const char* value(const dmp::LearnDMPFromDemoRequest_<ContainerAllocator> &) { return value(); }
00327 };
00328
00329 template<class ContainerAllocator>
00330 struct MD5Sum<dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > {
00331 static const char* value()
00332 {
00333 return "3ba13cfa47585560a2fd9cc202efdbff";
00334 }
00335
00336 static const char* value(const dmp::LearnDMPFromDemoResponse_<ContainerAllocator> &) { return value(); }
00337 };
00338
00339 template<class ContainerAllocator>
00340 struct DataType<dmp::LearnDMPFromDemoResponse_<ContainerAllocator> > {
00341 static const char* value()
00342 {
00343 return "dmp/LearnDMPFromDemo";
00344 }
00345
00346 static const char* value(const dmp::LearnDMPFromDemoResponse_<ContainerAllocator> &) { return value(); }
00347 };
00348
00349 }
00350 }
00351
00352 #endif // DMP_SERVICE_LEARNDMPFROMDEMO_H
00353