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