RunToVelocity

constructor(controllable: Controllable, targetVelocity: Double, controller: Controller, subsystem: Subsystem, outCondition: () -> Boolean = { abs(controllable.velocity)-targetVelocity < 10 })


constructor(controllable: Controllable, targetVelocity: Double, controller: Controller, subsystems: Set<Subsystem> = setOf(), outCondition: () -> Boolean = { abs(controllable.velocity)-targetVelocity < 10 })

Parameters

controllable

the Controllable to control

targetVelocity

the target velocity

controller

the Controller to implement

subsystems

the list of Subsystems this command interacts with (should be whatever subsystem holds this command)

outCondition

will be evaluated every update, and the command will stop once it returns true