Shooter
The shooter subsystem is for a single flywheel shooter. It can be used to spin up, hold at a position and respond to manual commands.
To create and schedule a shooter behaviour, you can use the following code:
Parameters
Type | Name | Description | See Also |
---|---|---|---|
std::string | path | The path to the shooter in the NT tables | |
wom::ShooterConfig | config | The configuration for the shooter |
Config
Type | Name | Description | See Also |
---|---|---|---|
wom::Gearbox | gearbox | The gearbox for the shooter | |
wom::PIDConfig<units::radians_per_second, units::volt> | pid | The PID configuration for the shooter | PID Config |
units::ampere_t | currentLimit | The current limit for the shooter |
States
wom::ShooterState is an enum of states for the shooter.
Name | Value | Description |
---|---|---|
kPID | 0 | The shooter is idle |
kManual | 1 | The shooter is in manual mode |
kIdle | 2 | The shooter is idle |
Methods
SetManual
Sets the shooter to manual mode.
Usage
SetPID
Sets the shooter to PID mode.
Usage
SetState
Sets the state of the shooter.
See States for the possible states.
Usage
IsStable
Returns whether the shooter is stable.
Usage
Behaviours
Shooter Constant
The shooter constant behaviour is used to hold the shooter at a constant speed.
Parameters
Type | Name | Description | See Also |
---|---|---|---|
wom::Shooter* | s | The shooter to use | Shooter |
units::volt_t | setpoint | The setpoint for the shooter |
Shooter Spinup
The shooter spinup behaviour is used to spin up the shooter to a certain speed.
Parameters
Type | Name | Description | See Also |
---|---|---|---|
wom::Shooter* | s | The shooter to use | Shooter |
units::radians_per_second_t | speed | The speed to spin up to | |
bool | hold | Whether to hold the shooter at the speed |