Ruckig  0.4.0
Instantaneous Motion Generation
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ruckig::Profile Class Reference

The state profile for position, velocity, acceleration and jerk for a single DoF. More...

#include <profile.hpp>

Public Types

enum class  Limits {
  ACC0_ACC1_VEL , VEL , ACC0 , ACC1 ,
  ACC0_ACC1 , ACC0_VEL , ACC1_VEL , NONE
}
 
enum class  Direction { UP , DOWN }
 
enum class  JerkSigns { UDDU , UDUD }
 

Public Member Functions

template<JerkSigns jerk_signs, Limits limits>
bool check_for_velocity (double jf, double aMax, double aMin)
 
template<JerkSigns jerk_signs, Limits limits>
bool check_for_velocity_with_timing (double, double jf, double aMax, double aMin)
 
template<JerkSigns jerk_signs, Limits limits, bool set_limits = false>
bool check (double jf, double vMax, double vMin, double aMax, double aMin)
 
template<JerkSigns jerk_signs, Limits limits>
bool check_with_timing (double, double jf, double vMax, double vMin, double aMax, double aMin)
 
template<JerkSigns jerk_signs, Limits limits>
bool check_with_timing (double tf, double jf, double vMax, double vMin, double aMax, double aMin, double jMax)
 
void set_boundary (double p0_new, double v0_new, double a0_new, double pf_new, double vf_new, double af_new)
 Set boundary values for the position interface. More...
 
void set_boundary (double p0_new, double v0_new, double a0_new, double vf_new, double af_new)
 Set boundary values for the velocity interface. More...
 
PositionExtrema get_position_extrema () const
 
bool get_first_state_at_position (double pt, double &time, double &vt, double &at, double offset=0.0) const
 
std::string to_string () const
 

Static Public Member Functions

static std::tuple< double, double, double > integrate (double t, double p0, double v0, double a0, double j)
 Integrate with constant jerk for duration t. Returns new position, new velocity, and new acceleration. More...
 
static void check_position_extremum (double t_ext, double t_sum, double t, double p, double v, double a, double j, PositionExtrema &ext)
 
static void check_step_for_position_extremum (double t_sum, double t, double p, double v, double a, double j, PositionExtrema &ext)
 

Public Attributes

enum ruckig::Profile::Limits limits
 
enum ruckig::Profile::Direction direction
 
enum ruckig::Profile::JerkSigns jerk_signs
 
std::array< double, 7 > t
 
std::array< double, 7 > t_sum
 
std::array< double, 7 > j
 
std::array< double, 8 > a
 
std::array< double, 8 > v
 
std::array< double, 8 > p
 
double polynomial_root
 Helper variable for faster calculation. More...
 
double pf
 Target (final) kinematic state. More...
 
double vf
 
double af
 
BrakeProfile brake
 Brake sub-profile. More...
 

Detailed Description

The state profile for position, velocity, acceleration and jerk for a single DoF.

Member Enumeration Documentation

◆ Direction

Enumerator
UP 
DOWN 

◆ JerkSigns

Enumerator
UDDU 
UDUD 

◆ Limits

Enumerator
ACC0_ACC1_VEL 
VEL 
ACC0 
ACC1 
ACC0_ACC1 
ACC0_VEL 
ACC1_VEL 
NONE 

Member Function Documentation

◆ check()

template<JerkSigns jerk_signs, Limits limits, bool set_limits = false>
bool ruckig::Profile::check ( double  jf,
double  vMax,
double  vMin,
double  aMax,
double  aMin 
)
inline

◆ check_for_velocity()

template<JerkSigns jerk_signs, Limits limits>
bool ruckig::Profile::check_for_velocity ( double  jf,
double  aMax,
double  aMin 
)
inline

◆ check_for_velocity_with_timing()

template<JerkSigns jerk_signs, Limits limits>
bool ruckig::Profile::check_for_velocity_with_timing ( double  ,
double  jf,
double  aMax,
double  aMin 
)
inline

◆ check_position_extremum()

static void ruckig::Profile::check_position_extremum ( double  t_ext,
double  t_sum,
double  t,
double  p,
double  v,
double  a,
double  j,
PositionExtrema ext 
)
inlinestatic

◆ check_step_for_position_extremum()

static void ruckig::Profile::check_step_for_position_extremum ( double  t_sum,
double  t,
double  p,
double  v,
double  a,
double  j,
PositionExtrema ext 
)
inlinestatic

◆ check_with_timing() [1/2]

template<JerkSigns jerk_signs, Limits limits>
bool ruckig::Profile::check_with_timing ( double  tf,
double  jf,
double  vMax,
double  vMin,
double  aMax,
double  aMin,
double  jMax 
)
inline

◆ check_with_timing() [2/2]

template<JerkSigns jerk_signs, Limits limits>
bool ruckig::Profile::check_with_timing ( double  ,
double  jf,
double  vMax,
double  vMin,
double  aMax,
double  aMin 
)
inline

◆ get_first_state_at_position()

bool ruckig::Profile::get_first_state_at_position ( double  pt,
double &  time,
double &  vt,
double &  at,
double  offset = 0.0 
) const
inline

◆ get_position_extrema()

PositionExtrema ruckig::Profile::get_position_extrema ( ) const
inline

◆ integrate()

static std::tuple<double, double, double> ruckig::Profile::integrate ( double  t,
double  p0,
double  v0,
double  a0,
double  j 
)
inlinestatic

Integrate with constant jerk for duration t. Returns new position, new velocity, and new acceleration.

◆ set_boundary() [1/2]

void ruckig::Profile::set_boundary ( double  p0_new,
double  v0_new,
double  a0_new,
double  pf_new,
double  vf_new,
double  af_new 
)
inline

Set boundary values for the position interface.

◆ set_boundary() [2/2]

void ruckig::Profile::set_boundary ( double  p0_new,
double  v0_new,
double  a0_new,
double  vf_new,
double  af_new 
)
inline

Set boundary values for the velocity interface.

◆ to_string()

std::string ruckig::Profile::to_string ( ) const
inline

Member Data Documentation

◆ a

std::array<double, 8> ruckig::Profile::a

◆ af

double ruckig::Profile::af

◆ brake

BrakeProfile ruckig::Profile::brake

Brake sub-profile.

◆ direction

enum ruckig::Profile::Direction ruckig::Profile::direction

◆ j

std::array<double, 7> ruckig::Profile::j

◆ jerk_signs

enum ruckig::Profile::JerkSigns ruckig::Profile::jerk_signs

◆ limits

enum ruckig::Profile::Limits ruckig::Profile::limits

◆ p

std::array<double, 8> ruckig::Profile::p

◆ pf

double ruckig::Profile::pf

Target (final) kinematic state.

◆ polynomial_root

double ruckig::Profile::polynomial_root

Helper variable for faster calculation.

◆ t

std::array<double, 7> ruckig::Profile::t

◆ t_sum

std::array<double, 7> ruckig::Profile::t_sum

◆ v

std::array<double, 8> ruckig::Profile::v

◆ vf

double ruckig::Profile::vf

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