hpp-manipulation  4.9.0
Classes for manipulation planning.
end-effector-trajectory.hh
Go to the documentation of this file.
1 // Copyright (c) 2019, LAAS-CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of hpp-manipulation.
5 // hpp-manipulation is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-manipulation is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_MANIPULATION_STEERING_METHOD_END_EFFECTOR_TRAJECTORY_HH
18 #define HPP_MANIPULATION_STEERING_METHOD_END_EFFECTOR_TRAJECTORY_HH
19 
20 #include <hpp/core/steering-method.hh>
21 
22 #include <hpp/manipulation/fwd.hh>
23 #include <hpp/manipulation/config.hh>
24 
25 namespace hpp {
26  namespace manipulation {
29  namespace steeringMethod {
30  HPP_PREDEF_CLASS (EndEffectorTrajectory);
31  typedef boost::shared_ptr < EndEffectorTrajectory > EndEffectorTrajectoryPtr_t;
32 
33  using core::PathPtr_t;
34 
36  class HPP_MANIPULATION_DLLAPI EndEffectorTrajectory
37  : public core::SteeringMethod
38  {
39  public:
41 
42  static EndEffectorTrajectoryPtr_t create (const core::Problem& problem)
43  {
44  EndEffectorTrajectoryPtr_t ptr (new EndEffectorTrajectory (problem));
45  ptr->init(ptr);
46  return ptr;
47  }
48 
53  static PathPtr_t makePiecewiseLinearTrajectory (matrixIn_t points,
54  vectorIn_t weights);
55 
57  void trajectoryConstraint (const constraints::ImplicitPtr_t& ic);
58 
60  {
61  return constraint_;
62  }
63 
67  void trajectory (const PathPtr_t& eeTraj, bool se3Output);
68 
72  void trajectory (const DifferentiableFunctionPtr_t& eeTraj, const interval_t& timeRange);
73 
75  {
76  return eeTraj_;
77  }
78 
79  const interval_t& timeRange () const
80  {
81  return timeRange_;
82  }
83 
85  {
86  EndEffectorTrajectoryPtr_t ptr (new EndEffectorTrajectory (*this));
87  ptr->init (ptr);
88  return ptr;
89  }
90 
95  PathPtr_t projectedPath (vectorIn_t times, matrixIn_t configs) const;
96 
97  protected:
99  : core::SteeringMethod (problem)
100  {}
101 
103  : core::SteeringMethod (other),
104  eeTraj_ (other.eeTraj_),
105  timeRange_ (other.timeRange_),
106  constraint_ (other.constraint_)
107  {}
108 
110 
111  private:
112  core::ConstraintSetPtr_t getUpdatedConstraints () const;
113 
115  interval_t timeRange_;
116  constraints::ImplicitPtr_t constraint_;
117  };
118  } // namespace steeringMethod
120  } // namespace manipulation
121 } // namespace hpp
122 
123 #endif // HPP_MANIPULATION_STEERING_METHOD_END_EFFECTOR_TRAJECTORY_HH
boost::shared_ptr< Path > PathPtr_t
const constraints::ImplicitPtr_t & trajectoryConstraint()
Definition: end-effector-trajectory.hh:59
EndEffectorTrajectory(const core::Problem &problem)
Definition: end-effector-trajectory.hh:98
boost::shared_ptr< ConstraintSet > ConstraintSetPtr_t
std::pair< value_type, value_type > interval_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:38
core::vectorIn_t vectorIn_t
Definition: fwd.hh:83
Build StraightPath constrained by a varying right hand side constraint.
Definition: end-effector-trajectory.hh:36
core::matrixIn_t matrixIn_t
Definition: fwd.hh:121
HPP_PREDEF_CLASS(EndEffectorTrajectory)
const Problem & problem() const
core::interval_t interval_t
Definition: end-effector-trajectory.hh:40
core::SteeringMethodPtr_t copy() const
Definition: end-effector-trajectory.hh:84
const DifferentiableFunctionPtr_t & trajectory() const
Definition: end-effector-trajectory.hh:74
boost::shared_ptr< SteeringMethod > SteeringMethodPtr_t
static EndEffectorTrajectoryPtr_t create(const core::Problem &problem)
Definition: end-effector-trajectory.hh:42
Definition: graph.hh:33
core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t
Definition: fwd.hh:113
boost::shared_ptr< EndEffectorTrajectory > EndEffectorTrajectoryPtr_t
Definition: end-effector-trajectory.hh:31
boost::shared_ptr< Implicit > ImplicitPtr_t
void impl_compute(result_ref, const_argument_ref) const
const interval_t & timeRange() const
Definition: end-effector-trajectory.hh:79
Vec3f * points
EndEffectorTrajectory(const EndEffectorTrajectory &other)
Definition: end-effector-trajectory.hh:102