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

#include <drive_to_position_spline.h>

Inheritance diagram for DriveToPositionSpline:

Public Member Functions

 DriveToPositionSpline (SwerveDriveSubsystem *drive, 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 frc::TrapezoidProfile< units::degrees >::Constraints rotationalConstraints, const units::feet_per_second_t initialVelocity=0_fps, const units::feet_per_second_t finalVelocity=0_fps)
 
void Initialize () override
 
void Execute () override
 
void End (bool interrupted) override
 
bool IsFinished () override
 

Private Attributes

SwerveDriveSubsystemm_pDrive
 
SwerveTrapezoidalSpline m_splinePath
 
const units::degree_t m_initialAngle
 
const units::degree_t m_finalAngle
 
const frc::TrapezoidProfile< units::inches >::Constraints m_linearConstraints
 
const frc::TrapezoidProfile< units::degrees >::Constraints m_rotationalConstraints
 
const units::feet_per_second_t m_initialVelocity
 
const units::feet_per_second_t m_finalVelocity
 

Detailed Description

Constructor & Destructor Documentation

◆ DriveToPositionSpline()

DriveToPositionSpline::DriveToPositionSpline ( SwerveDriveSubsystem drive,
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 frc::TrapezoidProfile< units::degrees >::Constraints  rotationalConstraints,
const units::feet_per_second_t  initialVelocity = 0_fps,
const units::feet_per_second_t  finalVelocity = 0_fps 
)

Member Function Documentation

◆ End()

void DriveToPositionSpline::End ( bool  interrupted)
override

◆ Execute()

void DriveToPositionSpline::Execute ( )
override

◆ Initialize()

void DriveToPositionSpline::Initialize ( )
override

◆ IsFinished()

bool DriveToPositionSpline::IsFinished ( )
override

Member Data Documentation

◆ m_finalAngle

const units::degree_t DriveToPositionSpline::m_finalAngle
private

◆ m_finalVelocity

const units::feet_per_second_t DriveToPositionSpline::m_finalVelocity
private

◆ m_initialAngle

const units::degree_t DriveToPositionSpline::m_initialAngle
private

◆ m_initialVelocity

const units::feet_per_second_t DriveToPositionSpline::m_initialVelocity
private

◆ m_linearConstraints

const frc::TrapezoidProfile<units::inches>::Constraints DriveToPositionSpline::m_linearConstraints
private

◆ m_pDrive

SwerveDriveSubsystem* DriveToPositionSpline::m_pDrive
private

◆ m_rotationalConstraints

const frc::TrapezoidProfile<units::degrees>::Constraints DriveToPositionSpline::m_rotationalConstraints
private

◆ m_splinePath

SwerveTrapezoidalSpline DriveToPositionSpline::m_splinePath
private

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