|
hpp-manipulation
9.0.2
Classes for manipulation planning.
|
#include <hpp/manipulation/steering-method/cartesian.hh>
Public Types | |
| typedef constraints::ImplicitPtr_t | ImplicitPtr_t |
| typedef core::ConfigurationIn_t | ConfigurationIn_t |
| typedef core::interval_t | interval_t |
| typedef core::PathPtr_t | PathPtr_t |
Public Member Functions | |
| void | maxIterations (size_type iterations) |
| Set maximal number of iterations of numerical solver. More... | |
| size_type | maxIterations () const |
| Get maximal number of iterations of numerical solver. More... | |
| void | errorThreshold (const value_type &threshold) |
| Set error threshold of numerical solver. More... | |
| value_type | errorThreshold () const |
| Get error threshold of numerical solver. More... | |
| void | trajectoryConstraint (const ImplicitPtr_t &ic) |
| Set the trajectory constraint. More... | |
| const ImplicitPtr_t & | trajectoryConstraint () |
| Get the trajectory constraint. More... | |
| void | rightHandSide (const PathPtr_t &rhs, bool se3Output) |
| void | rightHandSide (const DifferentiableFunctionPtr_t &rhs, const interval_t &timeRange) |
| const DifferentiableFunctionPtr_t & | rightHandSide () const |
| Get time-varying right hand side of trajectory constraint. More... | |
| const interval_t & | timeRange () const |
| Get interval of definition of right hand side of trajectory constraint. More... | |
| size_type | nDiscreteSteps () const |
| Number of steps to generate goal config (successive projections). More... | |
| void | nDiscreteSteps (size_type n) |
| bool | planPath (ConfigurationIn_t q_init, PathPtr_t &result) |
| Plan a path starting from an initial configuration. More... | |
Static Public Member Functions | |
| static CartesianPtr_t | create (const core::ProblemConstPtr_t &problem) |
| static PathPtr_t | makePiecewiseLinearTrajectory (matrixIn_t points, vectorIn_t weights) |
Protected Member Functions | |
| Cartesian (const core::ProblemConstPtr_t &problem) | |
| Store the constraints of the problem. More... | |
| PathPtr_t | projectedPath (vectorIn_t times, matrixIn_t configs) const |
| void | checkProblem (const std::string &method) |
Build a robot trajectory from an end-effector trajectory
This class does not derive from SteeringMethod since it does not link two configurations by a path. Instead, it only takes an initial configuration and a trajectory of an end-effector.
To use this class, the user needs to provide
Once the steering method has been initialized, it can be called with and initial configuration q_init. The interval of definition \([0,T]\) of the output path is the same as the one of the path provided as the right hand side of the constraint. Note that q_init should satisfy the constraint at times 0.
|
protected |
Store the constraints of the problem.
|
protected |
|
static |
| value_type hpp::manipulation::steeringMethod::Cartesian::errorThreshold | ( | ) | const |
Get error threshold of numerical solver.
| void hpp::manipulation::steeringMethod::Cartesian::errorThreshold | ( | const value_type & | threshold | ) |
Set error threshold of numerical solver.
|
static |
Build a path in SE(3).
| points | a Nx7 matrix whose rows corresponds to poses. |
| weights | a 6D vector, weights to be applied when computing the distance between two SE3 points. |
The trajectory \(T\) is defined as follows. Let \(N\) be the number of lines of matrix points, \(p_i\) be the i-th line of points and let \(W\) be the diagonal matrix with the coefficients of weights:
\[ W = \left(\begin{array}{cccccc} w_1 & 0 & 0 & 0 & 0 & 0\\ 0 & w_2 & 0 & 0 & 0 & 0\\ 0 & 0 & w_3 & 0 & 0 & 0\\ 0 & 0 & 0 & w_4 & 0 & 0\\ 0 & 0 & 0 & 0 & w_5 & 0\\ 0 & 0 & 0 & 0 & 0 & w_6\\ \end{array}\right) \]
\begin{eqnarray*} f(t) = \mathbf{p}_i \oplus \frac{t-t_i}{t_{i+1}-t_i} (\mathbf{p}_{i+1}-\mathbf{p}_i) && \mbox{ for } t \in [t_i,t_{i+1}] \end{eqnarray*}
where \(t_0 = 0\) and
\begin{eqnarray*} t_{i+1}-t_i = \|W(\mathbf{p}_{i+1}-\mathbf{p}_i)\| && \mbox{for } i \mbox{ such that } 1 \leq i \leq N-1 \end{eqnarray*}
| size_type hpp::manipulation::steeringMethod::Cartesian::maxIterations | ( | ) | const |
Get maximal number of iterations of numerical solver.
| void hpp::manipulation::steeringMethod::Cartesian::maxIterations | ( | size_type | iterations | ) |
Set maximal number of iterations of numerical solver.
|
inline |
Number of steps to generate goal config (successive projections).
|
inline |
| bool hpp::manipulation::steeringMethod::Cartesian::planPath | ( | ConfigurationIn_t | q_init, |
| PathPtr_t & | result | ||
| ) |
Plan a path starting from an initial configuration.
| q_init | initial configuration |
| result | the resulting path in case of success, a valid portion of path satisfying the trajectory constraint along a sub-interval starting at 0 otherwise. |
The interval of definition is discretized into a number of sub-intervals defined by method nDiscreteSteps. For each discretized value, a configuration is computed by projecting the previous one (or the initial configuration for the first discretized value) onto the time-varying constraint.
In case of failure, the interpolated path until the last successful projection is returned.
|
protected |
|
inline |
Get time-varying right hand side of trajectory constraint.
| void hpp::manipulation::steeringMethod::Cartesian::rightHandSide | ( | const DifferentiableFunctionPtr_t & | rhs, |
| const interval_t & | timeRange | ||
| ) |
Set the right hand side of the function from another function.
| rhs | a function whose input space is of dimension 1. |
| timeRange | the input range of eeTraj. |
| void hpp::manipulation::steeringMethod::Cartesian::rightHandSide | ( | const PathPtr_t & | rhs, |
| bool | se3Output | ||
| ) |
Set the right hand side of the trajectory constraint from a path
| rhs | function from an interval to SE(3). |
| se3Output | set to True if the output of path must be understood as SE3. |
|
inline |
Get interval of definition of right hand side of trajectory constraint.
|
inline |
Get the trajectory constraint.
| void hpp::manipulation::steeringMethod::Cartesian::trajectoryConstraint | ( | const ImplicitPtr_t & | ic | ) |
Set the trajectory constraint.