use of me.wobblyyyy.pathfinder2.utils in project Pathfinder2 by Wobblyyyy.
the class CircleSurrounder method fastSurround.
/**
* Surround the circle. This will find the closest point, create a new
* {@link me.wobblyyyy.pathfinder2.trajectory.FastTrajectory} to that
* point, and then instruct Pathfinder to follow it.
*/
public void fastSurround() {
PointXYZ robotPosition = pathfinder.getPosition();
double speed = pathfinder.getSpeed();
double tolerance = pathfinder.getTolerance();
Angle angleTolerance = pathfinder.getAngleTolerance();
Trajectory trajectory = CircleSurround.fastTrajectoryToClosestPoint(robotPosition, center, radius, speed);
pathfinder.followTrajectory(trajectory);
}
use of me.wobblyyyy.pathfinder2.utils in project Pathfinder2 by Wobblyyyy.
the class CircleSurrounder method surround.
/**
* Surround the circle. This will find the closest point, create a new
* {@link me.wobblyyyy.pathfinder2.trajectory.LinearTrajectory} to that
* point, and then instruct Pathfinder to follow it.
*/
public void surround() {
PointXYZ robotPosition = pathfinder.getPosition();
double speed = pathfinder.getSpeed();
double tolerance = pathfinder.getTolerance();
Angle angleTolerance = pathfinder.getAngleTolerance();
Trajectory trajectory = CircleSurround.trajectoryToClosestPoint(robotPosition, center, radius, speed, tolerance, angleTolerance);
pathfinder.followTrajectory(trajectory);
}
Aggregations