public class Path
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Path.Waypoint
A point along the Path, which consists of the location, the speed, and a
string marker (that future code can identify).
|
Modifier and Type | Field and Description |
---|---|
protected static double |
kSegmentCompletePercentage |
protected java.util.Set<java.lang.String> |
mMarkersCrossed |
protected java.util.List<PathSegment> |
mSegments |
protected java.util.List<Path.Waypoint> |
mWaypoints |
Constructor and Description |
---|
Path(java.util.List<Path.Waypoint> waypoints) |
Modifier and Type | Method and Description |
---|---|
PathSegment.Sample |
getLookaheadPoint(Translation2d position,
double lookahead_distance) |
java.util.Set<java.lang.String> |
getMarkersCrossed() |
double |
getRemainingLength() |
double |
update(Translation2d position) |
protected static final double kSegmentCompletePercentage
protected java.util.List<Path.Waypoint> mWaypoints
protected java.util.List<PathSegment> mSegments
protected java.util.Set<java.lang.String> mMarkersCrossed
public Path(java.util.List<Path.Waypoint> waypoints)
public double update(Translation2d position)
position
- initial positionpublic java.util.Set<java.lang.String> getMarkersCrossed()
public double getRemainingLength()
public PathSegment.Sample getLookaheadPoint(Translation2d position, double lookahead_distance)
position
- The robot's current positionlookahead_distance
- A specified distance to predict a future waypoint