RotateTask

class RotateTask(var goal: Double, val relative: Boolean, val controller: PTPController) : Task

Rotate the robot to a set angle or by a set amount

Parameters

goal

Target angle in radians

relative

If true robot will rotate relative to its current rotation and if false it will rotate to the goal orientation

controller

Point to point controller

Constructors

Link copied to clipboard
constructor(goal: Double, relative: Boolean, controller: PTPController)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun kill()

Used to stop tasks part of the way through.

Link copied to clipboard
open override fun loop(): Boolean

Called every loop cycle of the queue. Returning true moves on to next task.

Link copied to clipboard
open override fun onBegin(): Boolean

Called when task is started. Returning false will skip the task.

Link copied to clipboard
fun unkill()

Allow task to continue after being killed. Must be re-added to queue for this to work