hpp-manipulation 9.0.2
Classes for manipulation planning.
 
Loading...
Searching...
No Matches
end-effector-trajectory.hh
Go to the documentation of this file.
1// Copyright (c) 2019 CNRS
2// Authors: Joseph Mirabel
3//
4
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// 1. Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11//
12// 2. Redistributions in binary form must reproduce the above copyright
13// notice, this list of conditions and the following disclaimer in the
14// documentation and/or other materials provided with the distribution.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27// DAMAGE.
28
29#ifndef HPP_MANIPULATION_PATH_PLANNER_END_EFFECTOR_TRAJECTORY_HH
30#define HPP_MANIPULATION_PATH_PLANNER_END_EFFECTOR_TRAJECTORY_HH
31
37#include <pinocchio/spatial/se3.hpp>
38
39namespace hpp {
40namespace manipulation {
41namespace pathPlanner {
43 public:
44 typedef std::vector<Configuration_t> Configurations_t;
45
46 Configurations_t solve(vectorIn_t target) { return impl_solve(target); }
47
48 protected:
50};
51typedef shared_ptr<IkSolverInitialization> IkSolverInitializationPtr_t;
52
54typedef shared_ptr<EndEffectorTrajectory> EndEffectorTrajectoryPtr_t;
55
58
99 public:
110
114 virtual void startSolve();
115
117 virtual void oneStep();
118
121 int nRandomConfig() const { return nRandomConfig_; }
122
123 void nRandomConfig(int n) {
124 assert(n >= 0);
125 nRandomConfig_ = n;
126 }
127
129 int nDiscreteSteps() const { return nDiscreteSteps_; }
130
131 void nDiscreteSteps(int n) {
132 assert(n > 0);
133 nDiscreteSteps_ = n;
134 }
135
138 void checkFeasibilityOnly(bool enable);
139
140 bool checkFeasibilityOnly() const { return feasibilityOnly_; }
141
143 ikSolverInit_ = solver;
144 }
145
147
148 protected:
158 void init(const EndEffectorTrajectoryWkPtr_t& weak);
159
160 private:
161 std::vector<core::Configuration_t> configurations(
162 const core::Configuration_t& q_init);
163
165 EndEffectorTrajectoryWkPtr_t weak_;
167 int nRandomConfig_;
169 int nDiscreteSteps_;
171 IkSolverInitializationPtr_t ikSolverInit_;
173 bool feasibilityOnly_;
174}; // class EndEffectorTrajectory
175// \}
176} // namespace pathPlanner
177} // namespace manipulation
178} // namespace hpp
179
180#endif // HPP_MANIPULATION_PATH_PLANNER_END_EFFECTOR_TRAJECTORY_HH
ProblemConstPtr_t problem() const
virtual const RoadmapPtr_t & roadmap() const
Definition end-effector-trajectory.hh:98
Definition end-effector-trajectory.hh:42
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
#define HPP_MANIPULATION_DEPRECATED
Definition deprecated.hh:37
static EndEffectorTrajectoryPtr_t createWithRoadmap(const core::ProblemConstPtr_t &problem, const core::RoadmapPtr_t &roadmap) HPP_MANIPULATION_DEPRECATED
void nDiscreteSteps(int n)
Definition end-effector-trajectory.hh:131
void ikSolverInitialization(IkSolverInitializationPtr_t solver)
Definition end-effector-trajectory.hh:142
virtual Configurations_t impl_solve(vectorIn_t target)=0
void init(const EndEffectorTrajectoryWkPtr_t &weak)
Store weak pointer to itself.
static EndEffectorTrajectoryPtr_t create(const core::ProblemConstPtr_t &problem) HPP_MANIPULATION_DEPRECATED
Configurations_t solve(vectorIn_t target)
Definition end-effector-trajectory.hh:46
EndEffectorTrajectory(const core::ProblemConstPtr_t &problem, const core::RoadmapPtr_t &roadmap)
bool checkFeasibilityOnly() const
Definition end-effector-trajectory.hh:140
std::vector< Configuration_t > Configurations_t
Definition end-effector-trajectory.hh:44
int nRandomConfig() const
Definition end-effector-trajectory.hh:121
int nDiscreteSteps() const
Number of steps to generate goal config (successive projections).
Definition end-effector-trajectory.hh:129
EndEffectorTrajectory(const core::ProblemConstPtr_t &problem)
virtual void oneStep()
One step of the algorithm.
void nRandomConfig(int n)
Definition end-effector-trajectory.hh:123
shared_ptr< Roadmap > RoadmapPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
pinocchio::Configuration_t Configuration_t
Definition fwd.hh:97
shared_ptr< EndEffectorTrajectory > EndEffectorTrajectoryPtr_t
Definition fwd.hh:99
HPP_PREDEF_CLASS(EndEffectorTrajectory)
shared_ptr< IkSolverInitialization > IkSolverInitializationPtr_t
Definition end-effector-trajectory.hh:51
Definition main.hh:2
core::vectorIn_t vectorIn_t
Definition fwd.hh:93