TurnToCommand
package com.seattlesolvers.solverslib.pedropathing
This command calls Pedro Pathing's follower.turnTo(radians), which allows you to easily turn directly to a certain amount of radians (or degrees) in place.
It has three parameters, with the first two being mandatory:
Pedro Pathing's Follower (which controls the robot movement)
The angle to turn by (default is Radians)
TurnToCommand(Follower follower, double angle)
// Example
new TurnToCommand(follower, Math.PI / 2)
An optional parameter for a custom
AngleUnit
to turn to (AngleUnit.Radians
orAngleUnit.Degrees
)
TurnToCommand(Follower follower, double angle, AngleUnit angleUnit)
// Example
new TurnToCommand(follower, 90.0, AngleUnit.DEGREES)
To see how you can use this command in a CommandOpMode
, you can look at this example.
Last updated