use of me.wobblyyyy.pathfinder2.follower.Follower in project Pathfinder2 by Wobblyyyy.
the class TestGenericFollowerGenerator method testGeneration.
@Test
public void testGeneration() {
Robot robot = new Robot(new SimulatedDrive(), new SimulatedOdometry());
Controller controller = new GenericTurnController(0.1);
Trajectory trajectory = new LinearTrajectory(new PointXYZ(10, 10, 10), 0.5, 0.1, Angle.fromDeg(3));
GenericFollowerGenerator generator = new GenericFollowerGenerator(controller);
Follower follower = generator.generate(robot, trajectory);
Assertions.assertEquals(trajectory, follower.getTrajectory());
}
Also used :
LinearTrajectory(me.wobblyyyy.pathfinder2.trajectory.LinearTrajectory)
SimulatedDrive(me.wobblyyyy.pathfinder2.robot.simulated.SimulatedDrive)
GenericTurnController(me.wobblyyyy.pathfinder2.control.GenericTurnController)
Follower(me.wobblyyyy.pathfinder2.follower.Follower)
SimulatedOdometry(me.wobblyyyy.pathfinder2.robot.simulated.SimulatedOdometry)
LinearTrajectory(me.wobblyyyy.pathfinder2.trajectory.LinearTrajectory)
Trajectory(me.wobblyyyy.pathfinder2.trajectory.Trajectory)
PointXYZ(me.wobblyyyy.pathfinder2.geometry.PointXYZ)
GenericTurnController(me.wobblyyyy.pathfinder2.control.GenericTurnController)
Controller(me.wobblyyyy.pathfinder2.control.Controller)
Robot(me.wobblyyyy.pathfinder2.robot.Robot)
Test(org.junit.jupiter.api.Test)