FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
fsb::Timescale Class Reference

Detailed Description

Timescale trajectory with trapezoidal velocity profile.

#include <fsb_timescale.h>

Collaboration diagram for fsb::Timescale:
Collaboration graph

Public Member Functions

bool set_limits (Real max_timescale, Real max_timescale_deriv, Real max_timescale_2nd_deriv)
 Set timescale transition limits.
 
bool start (Real time_mono, Real time_scaled_init, Real timescale=1.0)
 Start timescale with initial conditions.
 
TimescaleResult goto_timescale (Real time_mono, Real target_timescale)
 Set new timescale.
 
TrajState evaluate (Real time_mono) const
 Evaluate timescale at given monotonic time.
 

Member Function Documentation

◆ evaluate()

TrajState fsb::Timescale::evaluate ( Real  time_mono) const

Evaluate timescale at given monotonic time.

Parameters
time_monoMonotonic clock time in seconds
Returns
Scaled time state (position, velocity, acceleration)

◆ goto_timescale()

TimescaleResult fsb::Timescale::goto_timescale ( Real  time_mono,
Real  target_timescale 
)

Set new timescale.

Parameters
time_monoMonotonic clock time in seconds
target_timescaleTarget timescale
Returns
TimescaleResult indicating success or failure reason

◆ set_limits()

bool fsb::Timescale::set_limits ( Real  max_timescale,
Real  max_timescale_deriv,
Real  max_timescale_2nd_deriv 
)

Set timescale transition limits.

Parameters
max_timescaleMaximum timescale
max_timescale_derivMaximum first derivative of timescale transition
max_timescale_2nd_derivMaximum second derivative of timescale transition
Returns
true if limits were set successfully, false otherwise

◆ start()

bool fsb::Timescale::start ( Real  time_mono,
Real  time_scaled_init,
Real  timescale = 1.0 
)

Start timescale with initial conditions.

Parameters
time_monoMonotonic clock time in seconds
time_scaled_initInitial scaled time in seconds
timescaleInitial timescale value. Default 1.0
Returns
true if started successfully, false otherwise

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