FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
fsb::CubicTrajectory Class Referencefinal

Detailed Description

Cubic trajectory.

#include <fsb_cubic.h>

Inheritance diagram for fsb::CubicTrajectory:
Inheritance graph
Collaboration diagram for fsb::CubicTrajectory:
Collaboration graph

Public Member Functions

bool generate (Real start_time, Real duration, const TrajState &initial_state, const TrajState &final_state)
 Generate spline.
 
void set_coeffs (Real start_time, Real duration, const CubicCoeffs &coeffs)
 Set coefficients of the cubic trajectory.
 
TrajState evaluate (Real t_eval) const override
 Evaluate position, velocity, acceleration, and jerk.
 
TrajState get_final_state () const override
 Get final state of segment.
 
Real get_start_time () const override
 Get start time of segment.
 
Real get_duration () const override
 Get total duration.
 
Real get_final_time () const override
 Get final time of trajectory.
 

Member Function Documentation

◆ evaluate()

TrajState fsb::CubicTrajectory::evaluate ( Real  t_eval) const
overridevirtual

Evaluate position, velocity, acceleration, and jerk.

Parameters
[in]t_evalTime at which to evaluate the trajectory
Returns
Trajectory state containing position, velocity, acceleration, and jerk at t_eval

Implements fsb::Segment.

◆ generate()

bool fsb::CubicTrajectory::generate ( Real  start_time,
Real  duration,
const TrajState initial_state,
const TrajState final_state 
)

Generate spline.

Parameters
[in]start_timeStart time of the trajectory
[in]durationDuration of the trajectory
[in]initial_stateInitial state of the trajectory
[in]final_stateFinal state of the trajectory
Returns
true if the spline was successfully generated, false otherwise

◆ get_duration()

Real fsb::CubicTrajectory::get_duration ( ) const
inlineoverridevirtual

Get total duration.

Returns
Total duration of trajectory

Implements fsb::SegmentBase.

◆ get_final_state()

TrajState fsb::CubicTrajectory::get_final_state ( ) const
inlineoverridevirtual

Get final state of segment.

Returns
Get final state at end of segment

Implements fsb::Segment.

◆ get_final_time()

Real fsb::CubicTrajectory::get_final_time ( ) const
inlineoverridevirtual

Get final time of trajectory.

Returns
Final time

Implements fsb::SegmentBase.

◆ get_start_time()

Real fsb::CubicTrajectory::get_start_time ( ) const
inlineoverridevirtual

Get start time of segment.

Returns
Start time.

Implements fsb::SegmentBase.

◆ set_coeffs()

void fsb::CubicTrajectory::set_coeffs ( Real  start_time,
Real  duration,
const CubicCoeffs coeffs 
)

Set coefficients of the cubic trajectory.

Parameters
[in]start_timeStart time of the trajectory
[in]durationDuration of the trajectory
[in]coeffsCoefficients of the cubic polynomial

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