RefVal_JS.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef _REFVAL_JS_H_
00019 #define _REFVAL_JS_H_
00020 
00021 #include <vector>
00022 
00023 
00024 class RefVal_JS
00025 {
00026         public:
00027                 virtual std::vector<double> r(double s) const=0;
00028                 virtual double s(double t) const=0;
00029                 virtual std::vector<double> r_t(double t) const { return r( s(t) ); }
00030 
00031                 virtual std::vector<double> dr_ds(double s) const=0;
00032                 virtual double ds_dt(double t) const=0;
00033                 virtual std::vector<double> dr_dt(double t) const
00034                 {
00035                         std::vector<double> dr;
00036                         dr.resize(dr_ds(t).size());
00037                         for(unsigned int i = 0; i < dr_ds(t).size(); i++)
00038                                 dr.at(i) = dr_ds( s(t) ).at(i) * ds_dt( t );
00039                         return dr;
00040                 }
00041 
00042                 virtual std::vector<double> getLast() const { return r_t( getTotalTime() ); }
00043 
00044                 virtual double getTotalTime() const=0;
00045 };
00046 
00047 #endif
00048 


cob_trajectory_controller
Author(s): Alexander Bubeck
autogenerated on Thu Jun 6 2019 21:19:22