Ruckig 0.19.7
Motion Generation for Robots and Machines
Loading...
Searching...
No Matches
ruckig::Trajectory< DOFs, CustomVector > Class Template Reference

The trajectory generated by the Ruckig algorithm. More...

#include <trajectory.hpp>

Public Types

typedef Container< CustomVector< double, DOFs > >::type VectorContainer

Public Member Functions

template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
 Trajectory ()
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
 Trajectory (size_t dofs)
template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
 Trajectory (size_t max_number_of_waypoints)
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
 Trajectory (size_t dofs, size_t max_number_of_waypoints)
template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
 Trajectory (const MemoryRequirement &memory_requirement)
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
 Trajectory (size_t dofs, const MemoryRequirement &memory_requirement)
void at_time (double time, CustomVector< double, DOFs > &new_position, CustomVector< double, DOFs > &new_velocity, CustomVector< double, DOFs > &new_acceleration, CustomVector< double, DOFs > &new_jerk, size_t &new_section) const
 Get the kinematic state, the jerk, and the section at a given time.
void at_time (double time, CustomVector< double, DOFs > &new_position, CustomVector< double, DOFs > &new_velocity, CustomVector< double, DOFs > &new_acceleration) const
void at_time (double time, CustomVector< double, DOFs > &new_position) const
 Get the position at a given time.
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void at_time (double time, double &new_position, double &new_velocity, double &new_acceleration, double &new_jerk, size_t &new_section) const
 Get the kinematic state, the jerk, and the section at a given time without vectors for a single DoF.
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void at_time (double time, double &new_position, double &new_velocity, double &new_acceleration) const
 Get the kinematic state at a given time without vectors for a single DoF.
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void at_time (double time, double &new_position) const
 Get the position at a given time without vectors for a single DoF.
void at_times (const typename Container< double >::type &times, VectorContainer &positions, VectorContainer &velocities, VectorContainer &accelerations) const
CustomVector< BrakeProfile, DOFs > get_brakes () const
 Get the underlying brake profiles of the trajectory (only in the Ruckig Community Version).
Container< CustomVector< Profile, DOFs > >::type get_profiles () const
 Get the underlying profiles of the trajectory (only in the Ruckig Community Version).
double get_duration () const
 Get the total duration of the (synchronized) trajectory.
Container< double >::type get_intermediate_durations () const
 Get the durations when the intermediate waypoints are reached.
CustomVector< double, DOFs > get_independent_min_durations () const
 Get the duration of each independent DoF, without synchronization or discretization.
Bound get_position_extrema_for_dof (size_t dof) const
 Get the min/max values of the position for a specific DoF (only in Ruckig Pro).
void get_position_extrema (CustomVector< Bound, DOFs > &position_extrema) const
 Get the min/max values of the position for all DoFs (only in Ruckig Pro).
Bound get_velocity_extrema_for_dof (size_t dof) const
 Get the min/max values of the velocity for a specific DoF (only in Ruckig Pro).
void get_velocity_extrema (CustomVector< Bound, DOFs > &velocity_extrema) const
 Get the min/max values of the velocity for each DoF (only in Ruckig Pro).
std::optional< double > get_first_time_at_position (size_t dof, double position, double time_after=0.0) const
 Get the time that this trajectory passes a specific position of a given DoF the first time.
std::optional< double > get_first_time_at_velocity (size_t dof, double velocity, double time_after=0.0) const
 Get the time that this trajectory passes a specific velocity of a given DoF the first time.
void scale (double position_scale, double time_scale)
 Scale with the position and time of the trajectory (only in Ruckig Pro).
void append (const Trajectory< DOFs, CustomVector > &other)
 Append another trajectory to this one (only in Ruckig Pro).

Static Public Member Functions

static Trajectory< DOFs, CustomVector > merge (const std::vector< Trajectory< DOFs, CustomVector > > &trajectories)
 Merge multiple trajectories together. Make sure that the end and start state of subsequent trajectories are equal (only in Ruckig Pro).

Public Attributes

size_t degrees_of_freedom
 Degrees of freedom.

Friends

class WinddownCalculator< DOFs, CustomVector >

Detailed Description

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
class ruckig::Trajectory< DOFs, CustomVector >

The trajectory generated by the Ruckig algorithm.

Member Typedef Documentation

◆ VectorContainer

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
typedef Container<CustomVector<double,DOFs>>::type ruckig::Trajectory< DOFs, CustomVector >::VectorContainer

Get the kinematic state at multiple times The Python wrapper takes times as an argument, and returns positions, velocities, and accelerations instead.

Constructor & Destructor Documentation

◆ Trajectory() [1/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( )
inline

◆ Trajectory() [2/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( size_t dofs)
inline

◆ Trajectory() [3/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( size_t max_number_of_waypoints)
inline

◆ Trajectory() [4/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( size_t dofs,
size_t max_number_of_waypoints )
inline

◆ Trajectory() [5/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D >=1), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( const MemoryRequirement & memory_requirement)
inline

◆ Trajectory() [6/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==0), int >::type = 0>
ruckig::Trajectory< DOFs, CustomVector >::Trajectory ( size_t dofs,
const MemoryRequirement & memory_requirement )
inline

Member Function Documentation

◆ append()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::append ( const Trajectory< DOFs, CustomVector > & other)
inline

Append another trajectory to this one (only in Ruckig Pro).

◆ at_time() [1/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
CustomVector< double, DOFs > & new_position ) const
inline

Get the position at a given time.

◆ at_time() [2/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
CustomVector< double, DOFs > & new_position,
CustomVector< double, DOFs > & new_velocity,
CustomVector< double, DOFs > & new_acceleration ) const
inline

Get the kinematic state at a given time The Python wrapper takes time as an argument, and returns new_position, new_velocity, and new_acceleration instead.

◆ at_time() [3/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
CustomVector< double, DOFs > & new_position,
CustomVector< double, DOFs > & new_velocity,
CustomVector< double, DOFs > & new_acceleration,
CustomVector< double, DOFs > & new_jerk,
size_t & new_section ) const
inline

Get the kinematic state, the jerk, and the section at a given time.

◆ at_time() [4/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
double & new_position ) const
inline

Get the position at a given time without vectors for a single DoF.

◆ at_time() [5/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
double & new_position,
double & new_velocity,
double & new_acceleration ) const
inline

Get the kinematic state at a given time without vectors for a single DoF.

◆ at_time() [6/6]

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
template<size_t D = DOFs, typename std::enable_if<(D==1), int >::type = 0>
void ruckig::Trajectory< DOFs, CustomVector >::at_time ( double time,
double & new_position,
double & new_velocity,
double & new_acceleration,
double & new_jerk,
size_t & new_section ) const
inline

Get the kinematic state, the jerk, and the section at a given time without vectors for a single DoF.

◆ at_times()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::at_times ( const typename Container< double >::type & times,
VectorContainer & positions,
VectorContainer & velocities,
VectorContainer & accelerations ) const
inline

◆ get_brakes()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
CustomVector< BrakeProfile, DOFs > ruckig::Trajectory< DOFs, CustomVector >::get_brakes ( ) const
inline

Get the underlying brake profiles of the trajectory (only in the Ruckig Community Version).

◆ get_duration()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
double ruckig::Trajectory< DOFs, CustomVector >::get_duration ( ) const
inline

Get the total duration of the (synchronized) trajectory.

◆ get_first_time_at_position()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
std::optional< double > ruckig::Trajectory< DOFs, CustomVector >::get_first_time_at_position ( size_t dof,
double position,
double time_after = 0.0 ) const
inline

Get the time that this trajectory passes a specific position of a given DoF the first time.

◆ get_first_time_at_velocity()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
std::optional< double > ruckig::Trajectory< DOFs, CustomVector >::get_first_time_at_velocity ( size_t dof,
double velocity,
double time_after = 0.0 ) const
inline

Get the time that this trajectory passes a specific velocity of a given DoF the first time.

◆ get_independent_min_durations()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
CustomVector< double, DOFs > ruckig::Trajectory< DOFs, CustomVector >::get_independent_min_durations ( ) const
inline

Get the duration of each independent DoF, without synchronization or discretization.

◆ get_intermediate_durations()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
Container< double >::type ruckig::Trajectory< DOFs, CustomVector >::get_intermediate_durations ( ) const
inline

Get the durations when the intermediate waypoints are reached.

◆ get_position_extrema()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::get_position_extrema ( CustomVector< Bound, DOFs > & position_extrema) const
inline

Get the min/max values of the position for all DoFs (only in Ruckig Pro).

In case an extremum is reached multiple times, the time of the first arrival is returned.

◆ get_position_extrema_for_dof()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
Bound ruckig::Trajectory< DOFs, CustomVector >::get_position_extrema_for_dof ( size_t dof) const
inline

Get the min/max values of the position for a specific DoF (only in Ruckig Pro).

In case an extremum is reached multiple times, the time of the first arrival is returned.

◆ get_profiles()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
Container< CustomVector< Profile, DOFs > >::type ruckig::Trajectory< DOFs, CustomVector >::get_profiles ( ) const
inline

Get the underlying profiles of the trajectory (only in the Ruckig Community Version).

◆ get_velocity_extrema()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::get_velocity_extrema ( CustomVector< Bound, DOFs > & velocity_extrema) const
inline

Get the min/max values of the velocity for each DoF (only in Ruckig Pro).

In case an extremum is reached multiple times, the time of the first arrival is returned.

◆ get_velocity_extrema_for_dof()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
Bound ruckig::Trajectory< DOFs, CustomVector >::get_velocity_extrema_for_dof ( size_t dof) const
inline

Get the min/max values of the velocity for a specific DoF (only in Ruckig Pro).

In case an extremum is reached multiple times, the time of the first arrival is returned.

◆ merge()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
Trajectory< DOFs, CustomVector > ruckig::Trajectory< DOFs, CustomVector >::merge ( const std::vector< Trajectory< DOFs, CustomVector > > & trajectories)
inlinestatic

Merge multiple trajectories together. Make sure that the end and start state of subsequent trajectories are equal (only in Ruckig Pro).

◆ scale()

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
void ruckig::Trajectory< DOFs, CustomVector >::scale ( double position_scale,
double time_scale )
inline

Scale with the position and time of the trajectory (only in Ruckig Pro).

◆ WinddownCalculator< DOFs, CustomVector >

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
friend class WinddownCalculator< DOFs, CustomVector >
friend

Member Data Documentation

◆ degrees_of_freedom

template<size_t DOFs = 0, template< class, size_t > class CustomVector = StandardVector>
size_t ruckig::Trajectory< DOFs, CustomVector >::degrees_of_freedom

Degrees of freedom.


The documentation for this class was generated from the following file:
  • /home/runner/work/ruckig-pro/ruckig-pro/include/ruckig/trajectory.hpp