Package me.wobblyyyy.pathfinder.config
Class SimpleConfig
java.lang.Object
me.wobblyyyy.pathfinder.config.PathfinderConfig
me.wobblyyyy.pathfinder.config.SimpleConfig
public class SimpleConfig extends PathfinderConfig
A simple pathfinder configuration that relies on a lot less input
parameters.
It's worth noting that the more abstract a configuration is, the less control you have over how Pathfinder functions. If you find that you don't feel as if you have enough control over Pathfinder as-is, you should check out lower-level configurations.
- Since:
- 0.1.0
- Author:
- Colin Robertson
-
Field Summary
Fields Modifier and Type Field Description private static boolean
FAST
private static boolean
LIGHTNING
private static int
SPECIFICITY
private static boolean
THETA
-
Constructor Summary
Constructors Constructor Description SimpleConfig()
SimpleConfig(Odometry odometry, int fieldWidth, int fieldHeight, double robotX, double robotY, double gapX, double gapY, RobotProfile profile, Drive drive, Map map, Followers follower, double speed)
Create a new PathfinderConfig to be fed to a Pathfinder. -
Method Summary
Methods inherited from class me.wobblyyyy.pathfinder.config.PathfinderConfig
doesUseFast, doesUseLightning, doesUseThetaStar, driveInvertX, driveInvertX, driveInvertY, driveInvertY, driveSwapXY, driveSwapXY, getDrive, getFieldHeight, getFieldWidth, getFollowerType, getGapX, getGapY, getMap, getOdometry, getProfile, getRawDrive, getRawOdometry, getRobotX, getRobotY, getSpecificity, getSpeed, odometryInvertX, odometryInvertX, odometryInvertY, odometryInvertY, odometrySwapXY, odometrySwapXY, setDrive, setFieldHeight, setFieldWidth, setFollower, setGapX, setGapY, setMap, setProfile, setRawOdometry, setRobotX, setRobotY, setSpecificity, setSpeed, setUsesFast, setUsesLightning, setUsesThetaStar
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
SPECIFICITY
private static final int SPECIFICITY- See Also:
- Constant Field Values
-
LIGHTNING
private static final boolean LIGHTNING- See Also:
- Constant Field Values
-
FAST
private static final boolean FAST- See Also:
- Constant Field Values
-
THETA
private static final boolean THETA- See Also:
- Constant Field Values
-
-
Constructor Details
-
SimpleConfig
public SimpleConfig() -
SimpleConfig
public SimpleConfig(Odometry odometry, int fieldWidth, int fieldHeight, double robotX, double robotY, double gapX, double gapY, RobotProfile profile, Drive drive, Map map, Followers follower, double speed)Create a new PathfinderConfig to be fed to a Pathfinder.For your own sake - please go read the field descriptions in this Java file if you're confused about what any of these means. I've written out nice and long descriptions for everything, so there shouldn't be all that much confusion about what's going on.
- Parameters:
odometry
- the odometry subsystem that's used by the pathfinder in determining the robot's position. This odometry system should be as accurate as possible and maintain contact with the ground at all times.fieldWidth
- the fieldWidth of the field, in whatever units you'd like. Although the units don't matter much, you need to be sure to keep the units consistent.fieldHeight
- the fieldHeight of the field, in whatever units you'd like. Although the units don't matter much, you need to be sure to keep the units consistent.robotX
- the robot's X dimension. X/Y are the same thing here. That's not to say that you shouldn't measure X and Y values - accuracy is still just as important as ever.robotY
- the robot's Y dimension. X/Y are the same thing here. That's not to say that you shouldn't measure X and Y values - accuracy is still just as important as ever.gapX
- the distance (in inches) between the pair of front right and front left wheel centers.gapY
- the distance (in inches) between the pair of front right and back right wheel centers.profile
- the robot's motion profiling profile. This profile should provide (at least somewhat accurate) info on the robot's motion in real life.drive
- the robot's drivetrain. The drivetrain is (rather obviously) used to actually drive the robot.map
- a virtual map of something. In most cases, this is a game field with all your different obstacles and what not.follower
- what type of follower the pathfinder uses.speed
- the speed that linear followers should run at.
-