Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::chassis::ShurikenCommand Class Reference

#include <shuriken_command.hpp>

Inheritance diagram for fang::chassis::ShurikenCommand:
Collaboration diagram for fang::chassis::ShurikenCommand:

Classes

struct  Config
 

Public Types

using MotionConfig = CounterStrikeCommand::Config
 
- Public Types inherited from fang::chassis::CounterStrikeCommand
using Config = FieldDriftCommand::Config
 

Public Member Functions

 ShurikenCommand (HolonomicSubsystem &chassisSubsystem, const turret::FieldGimbalSubsystem &gimbal, ChassisInputHandler &input, const Config &config)
 
virtual ~ShurikenCommand ()=default
 
const chargetName () const override
 
void execute () override
 
- Public Member Functions inherited from fang::chassis::CounterStrikeCommand
 CounterStrikeCommand (HolonomicSubsystem &holonomicSubsystem, const turret::FieldGimbalSubsystem &gimbal, ChassisInputHandler &inputHandler, const Config &config)
 
virtual ~CounterStrikeCommand ()=default
 
- Public Member Functions inherited from fang::chassis::FieldDriftCommand
 FieldDriftCommand (HolonomicSubsystem &holonomicSubsystem, ChassisInputHandler &inputHandler, const Config &config)
 
virtual ~FieldDriftCommand ()=default
 
void initialize () override
 
void end (bool interrupted) override
 
bool isFinished () const
 
- Public Member Functions inherited from tap::control::Command
 Command ()
 
virtual ~Command ()
 
mockable subsystem_scheduler_bitmap_t getRequirementsBitwise () const
 
int getGlobalIdentifier () const
 
mockable void addSubsystemRequirement (Subsystem *requirement)
 
virtual bool isReady ()
 

Protected Member Functions

RPM getFieldRotation (const physics::Velocity2D &targetFieldTranslation) const
 
- Protected Member Functions inherited from fang::chassis::CounterStrikeCommand
physics::Velocity2D getFieldTranslation () const
 
RPM getFieldRotation () const
 
- Protected Member Functions inherited from fang::chassis::FieldDriftCommand
physics::Velocity2D getFieldTranslation () const
 
RPM getFieldRotation () const
 

Additional Inherited Members

- Protected Attributes inherited from fang::chassis::CounterStrikeCommand
const turret::FieldGimbalSubsystemgimbal_
 
const Config kConfig_
 
- Protected Attributes inherited from fang::chassis::FieldDriftCommand
HolonomicSubsystemholonomicSubsystem_
 
ChassisInputHandlerchassisInput_
 
const Config kConfig_
 
- Protected Attributes inherited from tap::control::Command
command_scheduler_bitmap_t commandRequirementsBitwise = 0
 
- Static Protected Attributes inherited from fang::chassis::CounterStrikeCommand
static constexpr const charkName {"Counter Strike Global!"}
 
- Static Protected Attributes inherited from fang::chassis::FieldDriftCommand
static constexpr const charkName {"Field Drift"}
 

Detailed Description

The holonomic drive will automatically spin

Member Typedef Documentation

◆ MotionConfig

Constructor & Destructor Documentation

◆ ShurikenCommand()

fang::chassis::ShurikenCommand::ShurikenCommand ( HolonomicSubsystem chassisSubsystem,
const turret::FieldGimbalSubsystem gimbal,
ChassisInputHandler input,
const Config config 
)

This takes a chassis subsystem and the respective inputHandler

◆ ~ShurikenCommand()

virtual fang::chassis::ShurikenCommand::~ShurikenCommand ( )
virtualdefault

Member Function Documentation

◆ execute()

void fang::chassis::ShurikenCommand::execute ( )
overridevirtual

The main body of a command. Called repeatedly while the command is scheduled by a CommandScheduler.

Reimplemented from fang::chassis::CounterStrikeCommand.

Reimplemented in fang::chassis::TardisCommand.

◆ getFieldRotation()

RPM fang::chassis::ShurikenCommand::getFieldRotation ( const physics::Velocity2D targetFieldTranslation) const
protected

Translates the rotation input on the remote into a rotation where counterclockwise is positive

It also downscales the angular velocity inversly proportional to the targetFieldTranslation

◆ getName()

const char * fang::chassis::ShurikenCommand::getName ( ) const
overridevirtual
Returns
the name of the command, to be implemented by derived classes.

Reimplemented from fang::chassis::CounterStrikeCommand.

Reimplemented in fang::chassis::TardisCommand.


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