hpp-rbprm  4.13.0
Implementation of RB-PRM planner using hpp.
time-dependant.hh
Go to the documentation of this file.
1 // This file is part of hpp-wholebody-step.
6 // hpp-wholebody-step-planner is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-wholebody-step-planner is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-wholebody-step-planner. If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef PP_RBPRM_TIME_DEPENDANT_HH
20 #define PP_RBPRM_TIME_DEPENDANT_HH
21 
22 #include <hpp/constraints/implicit.hh>
23 #include <hpp/rbprm/config.hh>
24 #include <vector>
25 
26 namespace hpp {
27 namespace rbprm {
28 namespace interpolation {
29 
35  virtual void operator()(constraints::ImplicitPtr_t eq,
36  const constraints::value_type& input,
37  pinocchio::ConfigurationOut_t conf) const = 0;
38 };
39 typedef shared_ptr<const RightHandSideFunctor> RightHandSideFunctorPtr_t;
40 
51 struct TimeDependant {
54  void operator()(const constraints::value_type s,
55  pinocchio::ConfigurationOut_t conf) const {
56  (*rhsFunc_)(eq_, s, conf);
57  }
58 
62  TimeDependant(const constraints::ImplicitPtr_t& eq,
63  const RightHandSideFunctorPtr_t rhs)
64  : eq_(eq), rhsFunc_(rhs) {}
65 
67  : eq_(other.eq_), rhsFunc_(other.rhsFunc_) {}
68 
69  constraints::ImplicitPtr_t eq_;
70  RightHandSideFunctorPtr_t rhsFunc_;
71 }; // class TimeDependant
72 
73 typedef std::vector<TimeDependant> T_TimeDependant;
74 typedef T_TimeDependant::const_iterator CIT_TimeDependant;
75 } // namespace interpolation
76 } // namespace rbprm
77 } // namespace hpp
78 #endif // PP_RBPRM_TIME_DEPENDANT_HH
TimeDependant(const TimeDependant &other)
Definition: time-dependant.hh:66
shared_ptr< const RightHandSideFunctor > RightHandSideFunctorPtr_t
Definition: time-dependant.hh:39
Definition: algorithm.hh:26
void operator()(const constraints::value_type s, pinocchio::ConfigurationOut_t conf) const
Definition: time-dependant.hh:54
T_TimeDependant::const_iterator CIT_TimeDependant
Definition: time-dependant.hh:74
virtual void operator()(constraints::ImplicitPtr_t eq, const constraints::value_type &input, pinocchio::ConfigurationOut_t conf) const =0
Definition: time-dependant.hh:51
TimeDependant(const constraints::ImplicitPtr_t &eq, const RightHandSideFunctorPtr_t rhs)
Definition: time-dependant.hh:62
constraints::ImplicitPtr_t eq_
Definition: time-dependant.hh:69
RightHandSideFunctorPtr_t rhsFunc_
Definition: time-dependant.hh:70
std::vector< TimeDependant > T_TimeDependant
Definition: time-dependant.hh:73
Time varying right hand side of constraint.
Definition: time-dependant.hh:31