TrapezoidalMotionGenerator

rb::TrapezoidalMotionGenerator provides a local motion-profile generator for scalar or vector trajectories. It is a utility layer often used in examples and controller support code rather than through the high-level robot client.

Header

Header

#include <rby1-sdk/math/trapezoidal_motion_generator.h>

Declaration

Namespace

rb

Kind

class

Primary role

Generate trapezoidal motion profiles and evaluate them over time.

Member Types

Type

Purpose

Notes

Input

Motion-profile input record.

Passed into Update(...).

Output

Sampled output record at a given time.

Returned by operator() and at_time(...).

Coeff

Internal coefficient record for the profile.

Mainly useful during inspection or debugging.

Public Member Functions

Method group

Purpose

Notes

Update(...)

Load a new motion-profile request.

Replaces the active profile.

operator()(...) and at_time(...)

Sample the profile at a given time.

operator()(...) is the convenience form.

GetTotalTime(), GetLastInput(), IsReached(...)

Inspect profile duration, cached input, and completion state.

Useful in time-stepped loops.

Detailed Reference

template<int N>
class TrapezoidalMotionGenerator

Public Functions

inline explicit TrapezoidalMotionGenerator(unsigned int max_iter = 30)
inline Output at_time(double t)
inline Input GetLastInput() const
inline double GetTotalTime() const
inline bool IsReached(double t)
inline Output operator()(double t)
inline void Update(const Input &input)
struct Coeff

Public Members

double a
double end_t
double init_p
double init_v
double start_t
struct Input

Public Members

Eigen::Vector<double, N> acceleration_limit
Eigen::Vector<double, N> current_position
Eigen::Vector<double, N> current_velocity
double minimum_time
Eigen::Vector<double, N> target_position
Eigen::Vector<double, N> velocity_limit
struct Output

Public Members

Eigen::Vector<double, N> acceleration
Eigen::Vector<double, N> position
Eigen::Vector<double, N> velocity

Related Types

Examples

  • trapezoidal_motion_generator.cpp is the direct example for this page.