hpp-manipulation  4.11.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>
24 
25 namespace hpp {
26  namespace manipulation {
29  namespace steeringMethod {
30  HPP_PREDEF_CLASS (EndEffectorTrajectory);
31  typedef shared_ptr < EndEffectorTrajectory > EndEffectorTrajectoryPtr_t;
32 
33  using core::PathPtr_t;
34 
37  : public core::SteeringMethod
38  {
39  public:
40  typedef core::interval_t interval_t;
41 
42  static EndEffectorTrajectoryPtr_t create
43  (const core::ProblemConstPtr_t& problem)
44  {
45  EndEffectorTrajectoryPtr_t ptr(new EndEffectorTrajectory (problem));
46  ptr->init(ptr);
47  return ptr;
48  }
49 
54  static PathPtr_t makePiecewiseLinearTrajectory (matrixIn_t points,
55  vectorIn_t weights);
56 
58  void trajectoryConstraint (const constraints::ImplicitPtr_t& ic);
59 
61  {
62  return constraint_;
63  }
64 
68  void trajectory (const PathPtr_t& eeTraj, bool se3Output);
69 
73  void trajectory (const DifferentiableFunctionPtr_t& eeTraj, const interval_t& timeRange);
74 
76  {
77  return eeTraj_;
78  }
79 
80  const interval_t& timeRange () const
81  {
82  return timeRange_;
83  }
84 
86  {
87  EndEffectorTrajectoryPtr_t ptr (new EndEffectorTrajectory (*this));
88  ptr->init (ptr);
89  return ptr;
90  }
91 
96  PathPtr_t projectedPath (vectorIn_t times, matrixIn_t configs) const;
97 
98  protected:
100  : core::SteeringMethod (problem)
101  {}
102 
104  : core::SteeringMethod (other),
105  eeTraj_ (other.eeTraj_),
106  timeRange_ (other.timeRange_),
107  constraint_ (other.constraint_)
108  {}
109 
110  PathPtr_t impl_compute (ConfigurationIn_t q1, ConfigurationIn_t q2) const;
111 
112  private:
113  core::ConstraintSetPtr_t getUpdatedConstraints () const;
114 
116  interval_t timeRange_;
117  constraints::ImplicitPtr_t constraint_;
118  };
119  } // namespace steeringMethod
121  } // namespace manipulation
122 } // namespace hpp
123 
124 #endif // HPP_MANIPULATION_STEERING_METHOD_END_EFFECTOR_TRAJECTORY_HH
const constraints::ImplicitPtr_t & trajectoryConstraint()
Definition: end-effector-trajectory.hh:60
shared_ptr< SteeringMethod > SteeringMethodPtr_t
Definition: fwd.hh:93
Definition: main.hh:1
shared_ptr< EndEffectorTrajectory > EndEffectorTrajectoryPtr_t
Definition: end-effector-trajectory.hh:31
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:38
core::vectorIn_t vectorIn_t
Definition: fwd.hh:86
Build StraightPath constrained by a varying right hand side constraint.
Definition: end-effector-trajectory.hh:36
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:56
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
EndEffectorTrajectory(const core::ProblemConstPtr_t &problem)
Definition: end-effector-trajectory.hh:99
core::matrixIn_t matrixIn_t
Definition: fwd.hh:124
HPP_PREDEF_CLASS(EndEffectorTrajectory)
shared_ptr< ConstraintSet > ConstraintSetPtr_t
Definition: fwd.hh:115
constraints::ImplicitPtr_t ImplicitPtr_t
Definition: fwd.hh:108
core::interval_t interval_t
Definition: end-effector-trajectory.hh:40
core::SteeringMethodPtr_t copy() const
Definition: end-effector-trajectory.hh:85
const DifferentiableFunctionPtr_t & trajectory() const
Definition: end-effector-trajectory.hh:75
Definition: graph.hh:33
core::DifferentiableFunctionPtr_t DifferentiableFunctionPtr_t
Definition: fwd.hh:116
const interval_t & timeRange() const
Definition: end-effector-trajectory.hh:80
EndEffectorTrajectory(const EndEffectorTrajectory &other)
Definition: end-effector-trajectory.hh:103