2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
SwerveTrapezoidalSpline Class Reference

#include <swerve_trapezoidal_spline.h>

Public Member Functions

 SwerveTrapezoidalSpline ()=delete
 
 SwerveTrapezoidalSpline (const frc::Spline< 3 >::ControlVector initialPosition, const units::degree_t initialAngle, const std::vector< frc::Translation2d > &waypoints, const frc::Spline< 3 >::ControlVector finalPosition, const units::degree_t finalAngle, const units::second_t turnDelay, const frc::TrapezoidProfile< units::inches >::Constraints linearConstraints, const units::feet_per_second_t initialVelocity=0_fps, const units::feet_per_second_t finalVelocity=0_fps)
 
 SwerveTrapezoidalSpline (const SwerveTrapezoidalSpline &other)=default
 
 SwerveTrapezoidalSpline (SwerveTrapezoidalSpline &&other)=default
 
SwerveTrapezoidalSplineoperator= (const SwerveTrapezoidalSpline &)=delete
 
SwerveTrapezoidalSplineoperator= (SwerveTrapezoidalSpline &&)=delete
 
frc::Trajectory::State Calculate (units::second_t time) const
 
units::degree_t HeadingSetpoint (units::second_t time) const
 
bool IsFinished (units::second_t time) const
 
units::degree_t GetEndAngle () const
 
units::degree_t GetOdometryOffset () const
 
units::second_t GetDriveTime () const
 
void SetTurnDelay (units::second_t delay)
 
units::feet_per_second_t GetXVelocity (const frc::Trajectory::State &state) const
 
units::feet_per_second_t GetYVelocity (const frc::Trajectory::State &state) const
 

Private Attributes

frc::Trajectory m_pathTrajectory
 
units::degree_t m_initialAngle
 
units::degree_t m_finalAngle
 
units::second_t m_turnDelay
 

Detailed Description

Constructor & Destructor Documentation

◆ SwerveTrapezoidalSpline() [1/4]

SwerveTrapezoidalSpline::SwerveTrapezoidalSpline ( )
delete

◆ SwerveTrapezoidalSpline() [2/4]

SwerveTrapezoidalSpline::SwerveTrapezoidalSpline ( const frc::Spline< 3 >::ControlVector  initialPosition,
const units::degree_t  initialAngle,
const std::vector< frc::Translation2d > &  waypoints,
const frc::Spline< 3 >::ControlVector  finalPosition,
const units::degree_t  finalAngle,
const units::second_t  turnDelay,
const frc::TrapezoidProfile< units::inches >::Constraints  linearConstraints,
const units::feet_per_second_t  initialVelocity = 0_fps,
const units::feet_per_second_t  finalVelocity = 0_fps 
)

◆ SwerveTrapezoidalSpline() [3/4]

SwerveTrapezoidalSpline::SwerveTrapezoidalSpline ( const SwerveTrapezoidalSpline other)
default

◆ SwerveTrapezoidalSpline() [4/4]

SwerveTrapezoidalSpline::SwerveTrapezoidalSpline ( SwerveTrapezoidalSpline &&  other)
default

Member Function Documentation

◆ Calculate()

frc::Trajectory::State SwerveTrapezoidalSpline::Calculate ( units::second_t  time) const

◆ GetDriveTime()

units::second_t SwerveTrapezoidalSpline::GetDriveTime ( ) const

◆ GetEndAngle()

units::degree_t SwerveTrapezoidalSpline::GetEndAngle ( ) const

◆ GetOdometryOffset()

units::degree_t SwerveTrapezoidalSpline::GetOdometryOffset ( ) const

◆ GetXVelocity()

units::feet_per_second_t SwerveTrapezoidalSpline::GetXVelocity ( const frc::Trajectory::State &  state) const

◆ GetYVelocity()

units::feet_per_second_t SwerveTrapezoidalSpline::GetYVelocity ( const frc::Trajectory::State &  state) const

◆ HeadingSetpoint()

units::degree_t SwerveTrapezoidalSpline::HeadingSetpoint ( units::second_t  time) const

◆ IsFinished()

bool SwerveTrapezoidalSpline::IsFinished ( units::second_t  time) const

◆ operator=() [1/2]

SwerveTrapezoidalSpline & SwerveTrapezoidalSpline::operator= ( const SwerveTrapezoidalSpline )
delete

◆ operator=() [2/2]

SwerveTrapezoidalSpline & SwerveTrapezoidalSpline::operator= ( SwerveTrapezoidalSpline &&  )
delete

◆ SetTurnDelay()

void SwerveTrapezoidalSpline::SetTurnDelay ( units::second_t  delay)

Member Data Documentation

◆ m_finalAngle

units::degree_t SwerveTrapezoidalSpline::m_finalAngle
private

◆ m_initialAngle

units::degree_t SwerveTrapezoidalSpline::m_initialAngle
private

◆ m_pathTrajectory

frc::Trajectory SwerveTrapezoidalSpline::m_pathTrajectory
private

◆ m_turnDelay

units::second_t SwerveTrapezoidalSpline::m_turnDelay
private

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