hpp-rbprm  4.12.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/rbprm/config.hh>
23 #include <hpp/constraints/implicit.hh>
24 #include <vector>
25 
26 namespace hpp {
27 namespace rbprm {
28 namespace interpolation {
29 
35  virtual void operator()(constraints::ImplicitPtr_t eq, const constraints::value_type& input,
36  pinocchio::ConfigurationOut_t conf) const = 0;
37 };
38 typedef std::shared_ptr<const RightHandSideFunctor> RightHandSideFunctorPtr_t;
39 
50 struct TimeDependant {
53  void operator()(const constraints::value_type s, pinocchio::ConfigurationOut_t conf) const {
54  (*rhsFunc_)(eq_, s, conf);
55  }
56 
60  TimeDependant(const constraints::ImplicitPtr_t& eq, const RightHandSideFunctorPtr_t rhs) : eq_(eq), rhsFunc_(rhs) {}
61 
62  TimeDependant(const TimeDependant& other) : eq_(other.eq_), rhsFunc_(other.rhsFunc_) {}
63 
64  constraints::ImplicitPtr_t eq_;
65  RightHandSideFunctorPtr_t rhsFunc_;
66 }; // class TimeDependant
67 
68 typedef std::vector<TimeDependant> T_TimeDependant;
69 typedef T_TimeDependant::const_iterator CIT_TimeDependant;
70 } // namespace interpolation
71 } // namespace rbprm
72 } // namespace hpp
73 #endif // PP_RBPRM_TIME_DEPENDANT_HH
TimeDependant(const TimeDependant &other)
Definition: time-dependant.hh:62
Definition: algorithm.hh:27
void operator()(const constraints::value_type s, pinocchio::ConfigurationOut_t conf) const
Definition: time-dependant.hh:53
std::shared_ptr< const RightHandSideFunctor > RightHandSideFunctorPtr_t
Definition: time-dependant.hh:38
T_TimeDependant::const_iterator CIT_TimeDependant
Definition: time-dependant.hh:69
virtual void operator()(constraints::ImplicitPtr_t eq, const constraints::value_type &input, pinocchio::ConfigurationOut_t conf) const =0
Definition: time-dependant.hh:50
TimeDependant(const constraints::ImplicitPtr_t &eq, const RightHandSideFunctorPtr_t rhs)
Definition: time-dependant.hh:60
constraints::ImplicitPtr_t eq_
Definition: time-dependant.hh:64
RightHandSideFunctorPtr_t rhsFunc_
Definition: time-dependant.hh:65
std::vector< TimeDependant > T_TimeDependant
Definition: time-dependant.hh:68
Time varying right hand side of constraint.
Definition: time-dependant.hh:31