acmerobotics / road-runner-quickstart

FTC quickstart for https://github.com/acmerobotics/road-runner
BSD 3-Clause Clear License
187 stars 1k forks source link

lineToY not working #325

Closed ToddInIowa closed 9 months ago

ToddInIowa commented 10 months ago

RR FTC Version

0.1.9

Observed Behavior

We are trying to run lineToY and we come up with this error: "Path tangent orthogonal to the y-axis, try using lineToX() instead". Actions.runBlocking( drive.actionBuilder(drive.pose) .lineToY(20) .build());

Tuning Files

No response

Robot Logs

No response

rbrott commented 10 months ago

lineToY() draw a line along the current tangent direction until it hits a point with the given y-coordinate.

I'm assuming that drive.pose has a heading of zero. The initial tangent used by the builder is the initial heading. So no matter how far you go along the tangent, the y-coordinate remains the same.

Try adding setTangent(0.0) before lineToY().