Class FieldDriftCommand

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class FieldDriftCommand : public tap::control::Command

Moves the holonomic drive relative to the field. The orientation of the field is generally set in the direction that the robot faces on startup.

Subclassed by fang::chassis::CounterStrikeCommand

Public Functions

FieldDriftCommand(HolonomicSubsystem &holonomicSubsystem, ChassisInputHandler &inputHandler, const Config &config)

This takes a chassis subsystem and the respective inputHandler

virtual ~FieldDriftCommand() = default
virtual const char *getName() const override
virtual void initialize() override
virtual void execute() override
virtual void end(bool interrupted) override
virtual bool isFinished() const

Protected Functions

physics::Velocity2D getFieldTranslation() const

Scales input translation into tangible values

RPM getFieldRotation() const

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

Protected Attributes

HolonomicSubsystem &holonomicSubsystem_
ChassisInputHandler &chassisInput_
const Config kConfig_

Protected Static Attributes

static constexpr const char *kName = {"Field Drift"}
struct Config

maxVelocity: This needs to have both components greater than or equal to zero. Each component represents the maximum speed each the robot will move

maxRotation is the angular velocity that will be achieved if full throttle is utilized

Public Members

physics::Velocity2D maxTranslation
RPM maxRotation