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

#include <set_arm_pose_command.h>

Inheritance diagram for SetArmPoseCommand:

Public Member Functions

 SetArmPoseCommand (LifterSubsystem *lifter, BashGuardSubsystem *bashGuard, std::function< ScoringPosition()> scoringPositionCb, frc::Translation2d scoringPositionOffset, std::function< bool()> bashGuardModeCb, std::function< bool()> placeGamePieceInvertedCb, PathType pathType=PathType::unmodified, units::velocity::inches_per_second_t maxVelocity=speeds::armKinematicSpeeds::effectorVelocity, units::acceleration::inches_per_second_squared_t maxAcceleration=speeds::armKinematicSpeeds::effectorAcceleration)
 
 SetArmPoseCommand (LifterSubsystem *lifter, BashGuardSubsystem *bashGuard, ScoringPosition scoringPosition, frc::Translation2d scoringPositionOffset, std::function< bool()> bashGuardModeCb, std::function< bool()> placeGamePieceInvertedCb, PathType pathType=PathType::unmodified, units::velocity::inches_per_second_t maxVelocity=speeds::armKinematicSpeeds::effectorVelocity, units::acceleration::inches_per_second_squared_t maxAcceleration=speeds::armKinematicSpeeds::effectorAcceleration)
 
 SetArmPoseCommand (LifterSubsystem *lifter, BashGuardSubsystem *bashGuard, frc::Translation2d targetPose, frc::Translation2d scoringPositionOffset, BashGuardPosition desiredBashGuardPosition, WristPosition desiredWristPosition=WristPosition::Unknown, PathType pathType=PathType::unmodified, units::velocity::inches_per_second_t maxVelocity=speeds::armKinematicSpeeds::effectorVelocity, units::acceleration::inches_per_second_squared_t maxAcceleration=speeds::armKinematicSpeeds::effectorAcceleration, bool isTunable=false)
 
void Initialize () override
 
void Execute () override
 
void End (bool interrupted) override
 
bool IsFinished () override
 
frc2::Command::InterruptionBehavior GetInterruptionBehavior () const override
 

Private Attributes

LifterSubsystemm_lifter
 
BashGuardSubsystemm_bashGuard
 
std::optional< std::function< ScoringPosition()> > m_scoringPositionCb
 
frc::Translation2d m_scoringPositionOffset
 
std::optional< std::function< bool()> > m_bashGuardModeCb
 
std::optional< std::function< bool()> > m_placeGamePieceInvertedCb
 
frc::Translation2d m_targetPose
 
BashGuardPosition m_bashGuardTarget
 
units::degree_t m_targetShoulder
 
units::inch_t m_targetExtension
 
units::velocity::inches_per_second_t m_maxVelocity
 
units::acceleration::inches_per_second_squared_t m_maxAcceleration
 
bool m_isTunable
 
ScoringPosition m_latestScoringPosition
 
bool m_lastInversion
 
PathType m_pathType
 
WristPosition m_endingWristPosition
 
bool m_hasShoulderMotion
 
bool m_hasExtensionMotion
 
bool m_hasBashGuardMotion
 
bool m_isExtending
 
const units::degree_t m_wristSafeZoneMinAngle
 
unsigned m_id
 

Static Private Attributes

static constexpr auto m_wristSafeZoneMaxExtension = measure_up::lifter::arm_extension::minExtension + 6_in
 

Constructor & Destructor Documentation

◆ SetArmPoseCommand() [1/3]

SetArmPoseCommand::SetArmPoseCommand ( LifterSubsystem lifter,
BashGuardSubsystem bashGuard,
std::function< ScoringPosition()>  scoringPositionCb,
frc::Translation2d  scoringPositionOffset,
std::function< bool()>  bashGuardModeCb,
std::function< bool()>  placeGamePieceInvertedCb,
PathType  pathType = PathType::unmodified,
units::velocity::inches_per_second_t  maxVelocity = speeds::armKinematicSpeeds::effectorVelocity,
units::acceleration::inches_per_second_squared_t  maxAcceleration = speeds::armKinematicSpeeds::effectorAcceleration 
)

◆ SetArmPoseCommand() [2/3]

SetArmPoseCommand::SetArmPoseCommand ( LifterSubsystem lifter,
BashGuardSubsystem bashGuard,
ScoringPosition  scoringPosition,
frc::Translation2d  scoringPositionOffset,
std::function< bool()>  bashGuardModeCb,
std::function< bool()>  placeGamePieceInvertedCb,
PathType  pathType = PathType::unmodified,
units::velocity::inches_per_second_t  maxVelocity = speeds::armKinematicSpeeds::effectorVelocity,
units::acceleration::inches_per_second_squared_t  maxAcceleration = speeds::armKinematicSpeeds::effectorAcceleration 
)

◆ SetArmPoseCommand() [3/3]

SetArmPoseCommand::SetArmPoseCommand ( LifterSubsystem lifter,
BashGuardSubsystem bashGuard,
frc::Translation2d  targetPose,
frc::Translation2d  scoringPositionOffset,
BashGuardPosition  desiredBashGuardPosition,
WristPosition  desiredWristPosition = WristPosition::Unknown,
PathType  pathType = PathType::unmodified,
units::velocity::inches_per_second_t  maxVelocity = speeds::armKinematicSpeeds::effectorVelocity,
units::acceleration::inches_per_second_squared_t  maxAcceleration = speeds::armKinematicSpeeds::effectorAcceleration,
bool  isTunable = false 
)

Member Function Documentation

◆ End()

void SetArmPoseCommand::End ( bool  interrupted)
override

◆ Execute()

void SetArmPoseCommand::Execute ( )
override

◆ GetInterruptionBehavior()

frc2::Command::InterruptionBehavior SetArmPoseCommand::GetInterruptionBehavior ( ) const
override

◆ Initialize()

void SetArmPoseCommand::Initialize ( )
override

◆ IsFinished()

bool SetArmPoseCommand::IsFinished ( )
override

Member Data Documentation

◆ m_bashGuard

BashGuardSubsystem* SetArmPoseCommand::m_bashGuard
private

◆ m_bashGuardModeCb

std::optional<std::function<bool()> > SetArmPoseCommand::m_bashGuardModeCb
private

◆ m_bashGuardTarget

BashGuardPosition SetArmPoseCommand::m_bashGuardTarget
private

◆ m_endingWristPosition

WristPosition SetArmPoseCommand::m_endingWristPosition
private

◆ m_hasBashGuardMotion

bool SetArmPoseCommand::m_hasBashGuardMotion
private

◆ m_hasExtensionMotion

bool SetArmPoseCommand::m_hasExtensionMotion
private

◆ m_hasShoulderMotion

bool SetArmPoseCommand::m_hasShoulderMotion
private

◆ m_id

unsigned SetArmPoseCommand::m_id
private

◆ m_isExtending

bool SetArmPoseCommand::m_isExtending
private

◆ m_isTunable

bool SetArmPoseCommand::m_isTunable
private

◆ m_lastInversion

bool SetArmPoseCommand::m_lastInversion
private

◆ m_latestScoringPosition

ScoringPosition SetArmPoseCommand::m_latestScoringPosition
private

◆ m_lifter

LifterSubsystem* SetArmPoseCommand::m_lifter
private

◆ m_maxAcceleration

units::acceleration::inches_per_second_squared_t SetArmPoseCommand::m_maxAcceleration
private

◆ m_maxVelocity

units::velocity::inches_per_second_t SetArmPoseCommand::m_maxVelocity
private

◆ m_pathType

PathType SetArmPoseCommand::m_pathType
private

◆ m_placeGamePieceInvertedCb

std::optional<std::function<bool()> > SetArmPoseCommand::m_placeGamePieceInvertedCb
private

◆ m_scoringPositionCb

std::optional<std::function<ScoringPosition()> > SetArmPoseCommand::m_scoringPositionCb
private

◆ m_scoringPositionOffset

frc::Translation2d SetArmPoseCommand::m_scoringPositionOffset
private

◆ m_targetExtension

units::inch_t SetArmPoseCommand::m_targetExtension
private

◆ m_targetPose

frc::Translation2d SetArmPoseCommand::m_targetPose
private

◆ m_targetShoulder

units::degree_t SetArmPoseCommand::m_targetShoulder
private

◆ m_wristSafeZoneMaxExtension

constexpr auto SetArmPoseCommand::m_wristSafeZoneMaxExtension = measure_up::lifter::arm_extension::minExtension + 6_in
staticconstexprprivate

◆ m_wristSafeZoneMinAngle

const units::degree_t SetArmPoseCommand::m_wristSafeZoneMinAngle
private

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