Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
hpp::core::pathOptimization::SimpleTimeParameterization Class Reference

Add a TimeParameterization to paths so that the velocity does not exceeds the velocity limits. More...

#include <hpp/core/path-optimization/simple-time-parameterization.hh>

Inheritance diagram for hpp::core::pathOptimization::SimpleTimeParameterization:
[legend]
Collaboration diagram for hpp::core::pathOptimization::SimpleTimeParameterization:
[legend]

Public Member Functions

virtual PathVectorPtr_t optimize (const PathVectorPtr_t &path)
 Optimize path. More...
 
- Public Member Functions inherited from hpp::core::PathOptimizer
virtual ~PathOptimizer ()
 
const Problemproblem () const
 Get problem. More...
 
void interrupt ()
 Interrupt path optimization. More...
 

Static Public Member Functions

static SimpleTimeParameterizationPtr_t create (const Problem &problem)
 Return shared pointer to new object. More...
 

Protected Member Functions

 SimpleTimeParameterization (const Problem &problem)
 
- Protected Member Functions inherited from hpp::core::PathOptimizer
 PathOptimizer (const Problem &problem)
 
PathPtr_t steer (ConfigurationIn_t q1, ConfigurationIn_t q2) const
 

Additional Inherited Members

- Protected Attributes inherited from hpp::core::PathOptimizer
bool interrupt_
 Whether to interrupt computation Set to false at start of optimize method, set to true by method interrupt. More...
 

Detailed Description

Add a TimeParameterization to paths so that the velocity does not exceeds the velocity limits.

Parameter SimpleTimeParameterization/safety (value_type) defines is used to rescale the velocity limit.

Parameter SimpleTimeParameterization/velocity (bool) defines whether to use first or third order Polynomial.

Let the initial path be

\[ \begin{align*} q \colon [s_0, s_1] & \to \mathcal{C} \\ s & \mapsto q(s) \end{align*} \]

We want to find a increasing Polynomial

\[ \begin{align*} P_n \colon [0, T] & \to [s_0, s_1] \\ t & \mapsto s \end{align*} \]

where \(n\) is the polynom degree. The time parameterized path should satisfy the velocity limits so:

\[ l_i \le \dot q_i (P_n(t)) = P'_n(t) \frac{dq_i }{ds} (P_n(t)) \le u_i \\ P'_n(t) | \frac{dq_i }{ds} (P_n(t)) | \le \min u_i, -l_i \\ \]

where \( u_i > 0 \) and \( l_i < 0 \) are the velocity limits.

Let \( v \) be a velocity bound (Path::velocityBound) of \( q \) on \( [s_0, s_1] \). Then \( P'_n(t) \le B \) where

\[ B = \min_i \frac{u_i}{v_i}, \frac{-l_i}{v_i} \]

The constraints on \( P_n \) are:

The solutions are:

Let \( q(u) = 2u (u+\frac{1}{2})(u-\frac{1}{2})\). Then \( P_5^{(2)}(t) = 60 \frac{s_1-s_0}{T^2} q(\frac{t}{T}-\frac{1}{2}) \). For \( u \in [0,\frac{1}{2}]\), we have \( q(-u) = -q(u) \) and \( |q(u)| = -q(u) \le -q(\frac{1}{2\sqrt{3}}) = \frac{1}{6\sqrt{3}}\). So

\[ \max{P_5^{(2)}(t)} = \frac{10}{\sqrt{3}} \frac{s_1-s_0}{T^2} \]

So

\[ \begin{align*} \frac{15 (s_1 - s_0)}{8 T} &\le B \\ \frac{10}{\sqrt{3}} \frac{s_1-s_0}{T^2} &\le C \\ \end{align*} \]

\[ T = \max{ \left\{ \frac{15 (s_1 - s_0)}{8 B}, \sqrt{\frac{10 (s_1 - s_0)}{\sqrt{3} B}} \right\} } \]

Constructor & Destructor Documentation

◆ SimpleTimeParameterization()

hpp::core::pathOptimization::SimpleTimeParameterization::SimpleTimeParameterization ( const Problem problem)
protected

Member Function Documentation

◆ create()

static SimpleTimeParameterizationPtr_t hpp::core::pathOptimization::SimpleTimeParameterization::create ( const Problem problem)
static

Return shared pointer to new object.

◆ optimize()

virtual PathVectorPtr_t hpp::core::pathOptimization::SimpleTimeParameterization::optimize ( const PathVectorPtr_t path)
virtual

Optimize path.

Implements hpp::core::PathOptimizer.