public class Path
Path composed of a list of parametric curves and heading interpolators.
Modifier and Type | Class and Description |
---|---|
static class |
Path.ProjectionResult
Simple container for the result of a projection (i.e., a
Path.project call). |
Constructor and Description |
---|
Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves,
java.util.List<? extends com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> interpolators,
java.util.List<java.lang.Boolean> reversed)
Path composed of a list of parametric curves and heading interpolators.
|
Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves,
java.util.List<? extends com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> interpolators)
Path composed of a list of parametric curves and heading interpolators.
|
Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves)
Path composed of a list of parametric curves and heading interpolators.
|
Path()
Path composed of a list of parametric curves and heading interpolators.
|
Path(ParametricCurve parametricCurve,
HeadingInterpolator interpolator,
boolean reversed) |
Path(ParametricCurve parametricCurve,
HeadingInterpolator interpolator) |
Path(ParametricCurve parametricCurve) |
Modifier and Type | Method and Description |
---|---|
Pose2d |
deriv(double displacement)
Returns the pose derivative displacement units along the path.
|
Pose2d |
end()
Returns the end pose.
|
Pose2d |
endDeriv()
Returns the end pose derivative.
|
Pose2d |
endSecondDeriv()
Returns the end pose second derivative.
|
Pose2d |
get(double displacement)
Returns the pose displacement units along the path.
|
java.util.List<com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> |
getInterpolators()
heading interpolators
|
java.util.List<com.acmerobotics.roadrunner.path.ParametricCurve> |
getParametricCurves()
parametric curves
|
java.util.List<java.lang.Boolean> |
getReversed()
whether or not to travel along the path segment in reverse
|
double |
length()
Returns the length of the path.
|
Path.ProjectionResult |
project(Vector2d point,
double projectGuess)
Project point onto the current path.
|
Pose2d |
secondDeriv(double displacement)
Returns the pose second derivative displacement units along the path.
|
Pose2d |
start()
Returns the start pose.
|
Pose2d |
startDeriv()
Returns the start pose derivative.
|
Pose2d |
startSecondDeriv()
Returns the start pose second derivative.
|
public Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves, java.util.List<? extends com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> interpolators, java.util.List<java.lang.Boolean> reversed)
Path composed of a list of parametric curves and heading interpolators.
parametricCurves
- parametric curvesinterpolators
- heading interpolatorsreversed
- whether or not to travel along the path segment in reverseparametricCurves
- parametric curvesinterpolators
- heading interpolatorsreversed
- whether or not to travel along the path segment in reversepublic Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves, java.util.List<? extends com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> interpolators)
Path composed of a list of parametric curves and heading interpolators.
parametricCurves
- parametric curvesinterpolators
- heading interpolatorsparametricCurves
- parametric curvesinterpolators
- heading interpolatorspublic Path(java.util.List<? extends com.acmerobotics.roadrunner.path.ParametricCurve> parametricCurves)
Path composed of a list of parametric curves and heading interpolators.
parametricCurves
- parametric curvesparametricCurves
- parametric curvespublic Path()
Path composed of a list of parametric curves and heading interpolators.
public Path(ParametricCurve parametricCurve, HeadingInterpolator interpolator, boolean reversed)
parametricCurve
- parametric curveinterpolator
- heading interpolatorreversed
- whether or not to travel in reversepublic Path(ParametricCurve parametricCurve, HeadingInterpolator interpolator)
parametricCurve
- parametric curveinterpolator
- heading interpolatorpublic Path(ParametricCurve parametricCurve)
parametricCurve
- parametric curvepublic double length()
Returns the length of the path.
public Pose2d get(double displacement)
Returns the pose displacement units along the path.
public Pose2d deriv(double displacement)
Returns the pose derivative displacement units along the path.
public Pose2d secondDeriv(double displacement)
Returns the pose second derivative displacement units along the path.
public Path.ProjectionResult project(Vector2d point, double projectGuess)
Project point onto the current path.
point
- query pointprojectGuess
- guess for the projected point's displacement along the pathpublic Pose2d start()
Returns the start pose.
public Pose2d startDeriv()
Returns the start pose derivative.
public Pose2d startSecondDeriv()
Returns the start pose second derivative.
public Pose2d end()
Returns the end pose.
public Pose2d endDeriv()
Returns the end pose derivative.
public Pose2d endSecondDeriv()
Returns the end pose second derivative.
public java.util.List<com.acmerobotics.roadrunner.path.ParametricCurve> getParametricCurves()
parametric curves
public java.util.List<com.acmerobotics.roadrunner.path.heading.HeadingInterpolator> getInterpolators()
heading interpolators
public java.util.List<java.lang.Boolean> getReversed()
whether or not to travel along the path segment in reverse