RefVal_JS.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef _REFVAL_JS_H_
19 #define _REFVAL_JS_H_
20 
21 #include <vector>
22 
23 
24 class RefVal_JS
25 {
26  public:
27  virtual std::vector<double> r(double s) const=0;
28  virtual double s(double t) const=0;
29  virtual std::vector<double> r_t(double t) const { return r( s(t) ); }
30 
31  virtual std::vector<double> dr_ds(double s) const=0;
32  virtual double ds_dt(double t) const=0;
33  virtual std::vector<double> dr_dt(double t) const
34  {
35  std::vector<double> dr;
36  dr.resize(dr_ds(t).size());
37  for(unsigned int i = 0; i < dr_ds(t).size(); i++)
38  dr.at(i) = dr_ds( s(t) ).at(i) * ds_dt( t );
39  return dr;
40  }
41 
42  virtual std::vector<double> getLast() const { return r_t( getTotalTime() ); }
43 
44  virtual double getTotalTime() const=0;
45 };
46 
47 #endif
48 
virtual double ds_dt(double t) const =0
virtual std::vector< double > dr_ds(double s) const =0
virtual double getTotalTime() const =0
virtual std::vector< double > r(double s) const =0
virtual std::vector< double > r_t(double t) const
Definition: RefVal_JS.h:29
virtual double s(double t) const =0
virtual std::vector< double > getLast() const
Definition: RefVal_JS.h:42
virtual std::vector< double > dr_dt(double t) const
Definition: RefVal_JS.h:33


cob_trajectory_controller
Author(s): Alexander Bubeck
autogenerated on Thu Apr 8 2021 02:39:55