use of me.wobblyyyy.pathfinder2.trajectory.ArcTrajectory in project Pathfinder2 by Wobblyyyy.
the class TestSimulatedChassis method testArcTrajectory.
@SuppressWarnings("deprecation")
public void testArcTrajectory() {
ArcTrajectory arc = new ArcTrajectory(new PointXYZ(5, 5, 0), 5, 0.5, Angle.fromDeg(-5), Angle.fromDeg(0), Angle.fromDeg(180), Angle.fromDeg(90));
pathfinder.followTrajectory(arc);
pathfinder.tickUntil(500);
assertPositionIs(new PointXYZ(5, 5, 0));
}
use of me.wobblyyyy.pathfinder2.trajectory.ArcTrajectory in project Pathfinder2 by Wobblyyyy.
the class TestArcTrajectory method testSingleArcTrajectory.
@SuppressWarnings("deprecation")
private void testSingleArcTrajectory(Angle startAngle, Angle size, Angle targetHeading) {
Trajectory trajectory = new ArcTrajectory(new PointXYZ(), RADIUS, speed, ANGLE_STEP, targetHeading, startAngle, startAngle.add(size));
pathfinder.followTrajectory(trajectory);
PointXYZ end = new PointXY().inDirection(RADIUS, startAngle.add(size)).withHeading(targetHeading);
pathfinder.tickUntil(1_000);
assertPositionIs(end);
}
Aggregations