Package com. asiankoala. koawalib. command. commands
Types
Link copied to clipboard
Commands are the basis of how koawalib interacts with the robot. Each command has initialize(), execute(), and end() methods executed throughout its lifecycle. Commands contain a list of subsystem "requirements", preventing multiple subsystems accessing a command simultaneously. All commands are scheduled and ran through the CommandScheduler.
Link copied to clipboard
class FieldCentricCmd @JvmOverloads constructor( imu: KIMU, drive: KMecanumDrive, leftStick: KStick, rightStick: KStick, scalars: Pose = Pose(1.0, 1.0, 1.0), cubics: Pose = Pose(1.0, 1.0, 1.0), constants: Pose = Pose(1.0, 1.0, 1.0)) : MecanumCmd
Content copied to clipboard
Link copied to clipboard
class GVFCmd( drive: KMecanumOdoDrive, controller: GVFController, cmds: ProjQuery) : Cmd
Content copied to clipboard
Link copied to clipboard
open class InstantCmd(action: () -> Unit, requirements: KSubsystem) : Cmd
Content copied to clipboard
Command that runs once and stops
Link copied to clipboard
class LoopCmd(action: () -> Unit, requirements: KSubsystem) : LoopUntilCmd
Content copied to clipboard
Command that runs infinitely
Link copied to clipboard
open class LoopUntilCmd( action: () -> Unit, endCondition: () -> Boolean, requirements: KSubsystem) : Cmd
Content copied to clipboard
Link copied to clipboard
open class MecanumCmd @JvmOverloads constructor( drive: KMecanumDrive, leftStick: KStick, rightStick: KStick, scalars: Pose = Pose(1.0, 1.0, 1.0), cubics: Pose = Pose(1.0, 1.0, 1.0), constants: Pose = Pose(1.0, 1.0, 1.0)) : Cmd
Content copied to clipboard
TeleOp drive control command vector drive power is calculated with the function: f(x) = max(0, s * x * (kx^3 - k + 1)) * sgn(x) e.g. xPower = max(0, xScalar * leftStick.x * (xCubic * leftStick.x ^ 3 - xCubic + 1) see the desmos graph for an understanding of it
Link copied to clipboard
Link copied to clipboard
Dummy command, finishes when condition is called
Link copied to clipboard