Search in sources :

Example 6 with Follower

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)

Aggregations

Follower (me.wobblyyyy.pathfinder2.follower.Follower)5 PointXYZ (me.wobblyyyy.pathfinder2.geometry.PointXYZ)5 LinearTrajectory (me.wobblyyyy.pathfinder2.trajectory.LinearTrajectory)5 Trajectory (me.wobblyyyy.pathfinder2.trajectory.Trajectory)5 Controller (me.wobblyyyy.pathfinder2.control.Controller)4 GenericTurnController (me.wobblyyyy.pathfinder2.control.GenericTurnController)4 Robot (me.wobblyyyy.pathfinder2.robot.Robot)4 SimulatedDrive (me.wobblyyyy.pathfinder2.robot.simulated.SimulatedDrive)4 SimulatedOdometry (me.wobblyyyy.pathfinder2.robot.simulated.SimulatedOdometry)4 Test (org.junit.jupiter.api.Test)4 ArrayList (java.util.ArrayList)3 GenericFollowerGenerator (me.wobblyyyy.pathfinder2.follower.generators.GenericFollowerGenerator)3 Translation (me.wobblyyyy.pathfinder2.geometry.Translation)1 TaskTrajectory (me.wobblyyyy.pathfinder2.trajectory.TaskTrajectory)1