2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
SwerveTrapezoidalProfileSegment Class Reference

#include <swerve_trapezoidal_profile.h>

Public Member Functions

 SwerveTrapezoidalProfileSegment ()
 
 SwerveTrapezoidalProfileSegment (const frc::Pose2d initialPosition, const units::degree_t initialAngle, const frc::Translation2d relativeTranslation, const units::degree_t relativeRotation, const frc::TrapezoidProfile< units::inches >::Constraints linearConstraints)
 
 SwerveTrapezoidalProfileSegment (const frc::Pose2d initialPosition, const units::degree_t initialAngle, const frc::Pose2d finalPosition, const units::degree_t finalAngle, const frc::TrapezoidProfile< units::inches >::Constraints linearConstraints)
 
 SwerveTrapezoidalProfileSegment (const SwerveTrapezoidalProfileSegment &other)=default
 
 SwerveTrapezoidalProfileSegment (SwerveTrapezoidalProfileSegment &&other)=default
 
SwerveTrapezoidalProfileSegmentoperator= (const SwerveTrapezoidalProfileSegment &)=delete
 
SwerveTrapezoidalProfileSegmentoperator= (SwerveTrapezoidalProfileSegment &&)=delete
 
frc::Trajectory::State Calculate (units::second_t time) const
 
bool IsFinished (units::second_t time) const
 
units::degree_t GetEndAngle () const
 
units::degree_t GetOdometryOffset () const
 
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::Pose2d m_initialPosition
 
units::degree_t m_initialAngle
 
const frc::Translation2d m_relativeTranslation
 
units::degree_t m_relativeRotation
 
const frc::TrapezoidProfile< units::inches > m_linearProfile
 
const units::degree_t m_motionAngle
 
units::degree_t m_odometryOffsetAngle
 

Constructor & Destructor Documentation

◆ SwerveTrapezoidalProfileSegment() [1/5]

SwerveTrapezoidalProfileSegment::SwerveTrapezoidalProfileSegment ( )

◆ SwerveTrapezoidalProfileSegment() [2/5]

SwerveTrapezoidalProfileSegment::SwerveTrapezoidalProfileSegment ( const frc::Pose2d  initialPosition,
const units::degree_t  initialAngle,
const frc::Translation2d  relativeTranslation,
const units::degree_t  relativeRotation,
const frc::TrapezoidProfile< units::inches >::Constraints  linearConstraints 
)

◆ SwerveTrapezoidalProfileSegment() [3/5]

SwerveTrapezoidalProfileSegment::SwerveTrapezoidalProfileSegment ( const frc::Pose2d  initialPosition,
const units::degree_t  initialAngle,
const frc::Pose2d  finalPosition,
const units::degree_t  finalAngle,
const frc::TrapezoidProfile< units::inches >::Constraints  linearConstraints 
)

◆ SwerveTrapezoidalProfileSegment() [4/5]

SwerveTrapezoidalProfileSegment::SwerveTrapezoidalProfileSegment ( const SwerveTrapezoidalProfileSegment other)
default

◆ SwerveTrapezoidalProfileSegment() [5/5]

SwerveTrapezoidalProfileSegment::SwerveTrapezoidalProfileSegment ( SwerveTrapezoidalProfileSegment &&  other)
default

Member Function Documentation

◆ Calculate()

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

◆ GetEndAngle()

units::degree_t SwerveTrapezoidalProfileSegment::GetEndAngle ( ) const

◆ GetOdometryOffset()

units::degree_t SwerveTrapezoidalProfileSegment::GetOdometryOffset ( ) const

◆ GetXVelocity()

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

◆ GetYVelocity()

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

◆ IsFinished()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

SwerveTrapezoidalProfileSegment & SwerveTrapezoidalProfileSegment::operator= ( SwerveTrapezoidalProfileSegment &&  )
delete

Member Data Documentation

◆ m_initialAngle

units::degree_t SwerveTrapezoidalProfileSegment::m_initialAngle
private

◆ m_initialPosition

frc::Pose2d SwerveTrapezoidalProfileSegment::m_initialPosition
private

◆ m_linearProfile

const frc::TrapezoidProfile<units::inches> SwerveTrapezoidalProfileSegment::m_linearProfile
private

◆ m_motionAngle

const units::degree_t SwerveTrapezoidalProfileSegment::m_motionAngle
private

◆ m_odometryOffsetAngle

units::degree_t SwerveTrapezoidalProfileSegment::m_odometryOffsetAngle
private

◆ m_relativeRotation

units::degree_t SwerveTrapezoidalProfileSegment::m_relativeRotation
private

◆ m_relativeTranslation

const frc::Translation2d SwerveTrapezoidalProfileSegment::m_relativeTranslation
private

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