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

#include <drive_to_position.h>

Inheritance diagram for DriveToPosition:

Public Member Functions

 DriveToPosition (SwerveDriveSubsystem *drive, const frc::Pose2d source, const units::degree_t sourceAngle, const frc::Pose2d destination, const units::degree_t destAngle, 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
 
const frc::Pose2d m_source
 
const units::degree_t m_sourceAngle
 
const frc::Pose2d m_destination
 
const units::degree_t m_destAngle
 
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

◆ DriveToPosition()

DriveToPosition::DriveToPosition ( SwerveDriveSubsystem drive,
const frc::Pose2d  source,
const units::degree_t  sourceAngle,
const frc::Pose2d  destination,
const units::degree_t  destAngle,
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 DriveToPosition::End ( bool  interrupted)
override

◆ Execute()

void DriveToPosition::Execute ( )
override

◆ Initialize()

void DriveToPosition::Initialize ( )
override

◆ IsFinished()

bool DriveToPosition::IsFinished ( )
override

Member Data Documentation

◆ m_destAngle

const units::degree_t DriveToPosition::m_destAngle
private

◆ m_destination

const frc::Pose2d DriveToPosition::m_destination
private

◆ m_finalVelocity

const units::feet_per_second_t DriveToPosition::m_finalVelocity
private

◆ m_initialVelocity

const units::feet_per_second_t DriveToPosition::m_initialVelocity
private

◆ m_linearConstraints

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

◆ m_pDrive

SwerveDriveSubsystem* DriveToPosition::m_pDrive
private

◆ m_rotationalConstraints

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

◆ m_source

const frc::Pose2d DriveToPosition::m_source
private

◆ m_sourceAngle

const units::degree_t DriveToPosition::m_sourceAngle
private

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