|
bitsim
Model, simulate, estimate and control robots in C++
|
Accelerate at a constant rate, cruise at constant speed, and brake at the same rate: the speed over time is a trapezoid. More...
#include <time_scaling.h>


Public Member Functions | |
| TrapezoidalTimeScaling (real_t duration, real_t cruise_speed) | |
| real_t | s (real_t t) const override |
| s(t); 0 before the start and 1 after the end | |
| real_t | ds (real_t t) const override |
| \(\dot s(t)\) [1/s] | |
| real_t | dds (real_t t) const override |
| \(\ddot s(t)\) [1/s^2] | |
| real_t | cruise_speed () const noexcept |
| real_t | acceleration () const noexcept |
| real_t | accel_time () const noexcept |
| Public Member Functions inherited from bitsim::trajectory::TimeScaling | |
| virtual | ~TimeScaling ()=default |
| real_t | duration () const noexcept |
| The duration T [s]. | |
Static Public Member Functions | |
| static TrapezoidalTimeScaling | with_accel_share (real_t duration, real_t accel_share) |
| The trapezoid that takes duration and spends a share of it, accel_share, in each of the speeding up and the slowing down. accel_share is in (0, 1/2]. | |
Additional Inherited Members | |
| Protected Member Functions inherited from bitsim::trajectory::TimeScaling | |
| TimeScaling (real_t duration) | |
| real_t | clamp_ (real_t t) const noexcept |
| Protected Attributes inherited from bitsim::trajectory::TimeScaling | |
| real_t | T_ |
Accelerate at a constant rate, cruise at constant speed, and brake at the same rate: the speed over time is a trapezoid.
It is what motor controllers do when they are given a top speed and an acceleration. For a motion of duration T with a cruise speed of \(\dot s = v\) the acceleration lasts \(t_a = T - 1/v\), which needs \(1/T < v \le 2/T\); at \(v = 2/T\) there is no cruise, and the trapezoid becomes a triangle.
| bitsim::trajectory::TrapezoidalTimeScaling::TrapezoidalTimeScaling | ( | real_t | duration, |
| real_t | cruise_speed ) |
| duration | T [s] |
| cruise_speed | \(v\), the speed of s while cruising [1/s], in \((1/T, 2/T]\) |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
\(\ddot s(t)\) [1/s^2]
Implements bitsim::trajectory::TimeScaling.
\(\dot s(t)\) [1/s]
Implements bitsim::trajectory::TimeScaling.
s(t); 0 before the start and 1 after the end
Implements bitsim::trajectory::TimeScaling.
|
static |
The trapezoid that takes duration and spends a share of it, accel_share, in each of the speeding up and the slowing down. accel_share is in (0, 1/2].