hpp-manipulation 9.0.2
Classes for manipulation planning.
Loading...
Searching...
No Matches
hpp::manipulation::steeringMethod::Cartesian Class Reference

#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.
 
size_type maxIterations () const
 Get maximal number of iterations of numerical solver.
 
void errorThreshold (const value_type &threshold)
 Set error threshold of numerical solver.
 
value_type errorThreshold () const
 Get error threshold of numerical solver.
 
void trajectoryConstraint (const ImplicitPtr_t &ic)
 Set the trajectory constraint.
 
const ImplicitPtr_ttrajectoryConstraint ()
 Get the trajectory constraint.
 
void rightHandSide (const PathPtr_t &rhs, bool se3Output)
 
void rightHandSide (const DifferentiableFunctionPtr_t &rhs, const interval_t &timeRange)
 
const DifferentiableFunctionPtr_trightHandSide () const
 Get time-varying right hand side of trajectory constraint.
 
const interval_ttimeRange () const
 Get interval of definition of right hand side of trajectory constraint.
 
size_type nDiscreteSteps () const
 Number of steps to generate goal config (successive projections).
 
void nDiscreteSteps (size_type n)
 
bool planPath (ConfigurationIn_t q_init, PathPtr_t &result)
 Plan a path starting from an initial configuration.
 

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.
 
PathPtr_t projectedPath (vectorIn_t times, matrixIn_t configs) const
 
void checkProblem (const std::string &method)
 

Detailed Description

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.

Member Typedef Documentation

◆ ConfigurationIn_t

◆ ImplicitPtr_t

◆ interval_t

◆ PathPtr_t

Constructor & Destructor Documentation

◆ Cartesian()

hpp::manipulation::steeringMethod::Cartesian::Cartesian ( const core::ProblemConstPtr_t & problem)
protected

Store the constraints of the problem.

Member Function Documentation

◆ checkProblem()

void hpp::manipulation::steeringMethod::Cartesian::checkProblem ( const std::string & method)
protected

◆ create()

static CartesianPtr_t hpp::manipulation::steeringMethod::Cartesian::create ( const core::ProblemConstPtr_t & problem)
static

◆ errorThreshold() [1/2]

value_type hpp::manipulation::steeringMethod::Cartesian::errorThreshold ( ) const

Get error threshold of numerical solver.

◆ errorThreshold() [2/2]

void hpp::manipulation::steeringMethod::Cartesian::errorThreshold ( const value_type & threshold)

Set error threshold of numerical solver.

◆ makePiecewiseLinearTrajectory()

static PathPtr_t hpp::manipulation::steeringMethod::Cartesian::makePiecewiseLinearTrajectory ( matrixIn_t points,
vectorIn_t weights )
static

Build a path in SE(3).

Parameters
pointsa Nx7 matrix whose rows corresponds to poses.
weightsa 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*}

◆ maxIterations() [1/2]

size_type hpp::manipulation::steeringMethod::Cartesian::maxIterations ( ) const

Get maximal number of iterations of numerical solver.

◆ maxIterations() [2/2]

void hpp::manipulation::steeringMethod::Cartesian::maxIterations ( size_type iterations)

Set maximal number of iterations of numerical solver.

◆ nDiscreteSteps() [1/2]

size_type hpp::manipulation::steeringMethod::Cartesian::nDiscreteSteps ( ) const
inline

Number of steps to generate goal config (successive projections).

◆ nDiscreteSteps() [2/2]

void hpp::manipulation::steeringMethod::Cartesian::nDiscreteSteps ( size_type n)
inline

◆ planPath()

bool hpp::manipulation::steeringMethod::Cartesian::planPath ( ConfigurationIn_t q_init,
PathPtr_t & result )

Plan a path starting from an initial configuration.

Parameters
q_initinitial configuration
Return values
resultthe resulting path in case of success, a valid portion of path satisfying the trajectory constraint along a sub-interval starting at 0 otherwise.
Returns
true if the path is successfully computed, false 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.

Note
No path validation is performed. Collision checking should be performed on the output of this method.

◆ projectedPath()

PathPtr_t hpp::manipulation::steeringMethod::Cartesian::projectedPath ( vectorIn_t times,
matrixIn_t configs ) const
protected

◆ rightHandSide() [1/3]

const DifferentiableFunctionPtr_t & hpp::manipulation::steeringMethod::Cartesian::rightHandSide ( ) const
inline

Get time-varying right hand side of trajectory constraint.

◆ rightHandSide() [2/3]

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.

Parameters
rhsa function whose input space is of dimension 1.
timeRangethe input range of eeTraj.

◆ rightHandSide() [3/3]

void hpp::manipulation::steeringMethod::Cartesian::rightHandSide ( const PathPtr_t & rhs,
bool se3Output )

Set the right hand side of the trajectory constraint from a path

Parameters
rhsfunction from an interval to SE(3).
se3Outputset to True if the output of path must be understood as SE3.

◆ timeRange()

const interval_t & hpp::manipulation::steeringMethod::Cartesian::timeRange ( ) const
inline

Get interval of definition of right hand side of trajectory constraint.

◆ trajectoryConstraint() [1/2]

const ImplicitPtr_t & hpp::manipulation::steeringMethod::Cartesian::trajectoryConstraint ( )
inline

Get the trajectory constraint.

◆ trajectoryConstraint() [2/2]

void hpp::manipulation::steeringMethod::Cartesian::trajectoryConstraint ( const ImplicitPtr_t & ic)

Set the trajectory constraint.


The documentation for this class was generated from the following file: