Template Class Trajectory

Class Documentation

template<size_t DOFs, template<class, size_t> class CustomVector = StandardVector>
class Trajectory

The trajectory generated by the Ruckig algorithm.

Public Functions

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

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

inline void at_time(double time, Vector<double> &new_position, Vector<double> &new_velocity, Vector<double> &new_acceleration) const

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.

inline void at_time(double time, Vector<double> &new_position) const

Get the position at a given time.

template<size_t D = DOFs, typename std::enable_if<(D == 1), int>::type = 0>
inline 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>
inline 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>
inline void at_time(double time, double &new_position) const

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

inline Container<Vector<Profile>> get_profiles() const

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

inline double get_duration() const

Get the duration of the (synchronized) trajectory.

inline Container<double> get_intermediate_durations() const

Get the durations when the intermediate waypoints are reached.

inline Vector<double> get_independent_min_durations() const

Get the minimum duration of each independent DoF.

inline Vector<Bound> get_position_extrema()

Get the min/max values of the position for each DoF.

inline 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.

Public Members

size_t degrees_of_freedom