Expand description
Path abstraction for trajectory planning.
The main entry point is Path. Pick the constructor by the path data you own:
| You have | Use | Notes |
|---|---|---|
Analytic formula q(s) | Path::from_parametric | Computes derivatives up to third order by Jet3 automatic differentiation. |
| Waypoints the path must pass through | Path::from_waypoints_interpolating | Interpolates every column of a (dim x n_points) waypoint matrix. |
| A reference polyline that may be approximated | Path::from_waypoints_fitting | C4 quintic fitting; per-axis tolerance defaults to 0.001. |
Explicit q/dq/ddq evaluator | Path::from_evaluator_2nd | Use for TOPP2/COPP2 or other workflows that do not need jerk. See PathEvaluator2nd. |
Explicit q/dq/ddq/dddq evaluator | Path::from_evaluator_3rd | Use for TOPP3/COPP3 workflows. See PathEvaluator3rd. |
The waypoint constructor families also provide borrowed-view companions:
Path::from_waypoints_interpolating_view and
Path::from_waypoints_fitting_view. They accept compatible strided
column-major nalgebra views without requiring callers to first materialize a
DMatrix.
§Interpolating versus fitting waypoint paths
Path::from_waypoints_interpolating
constrains the path to pass through every input waypoint at its assigned
parameter, up to floating-point roundoff. Choose it when each waypoint is a
position or event that must be retained.
Path::from_waypoints_fitting
instead treats adjacent columns as a reference polyline under one common
parameter. The fitted curve is not required to pass through interior
waypoints: selected axes may deviate from them within their configured
tolerances. Their absolute error at the same parameter is numerically audited
over every complete reference interval, while endpoint positions are retained
up to floating-point roundoff. Configure axis selection, parameters,
tolerances, and construction budgets with SmoothingConfig and
SmoothingTolerance; inspect final bounds and refinement work through
SmoothingReport.
Fitting is geometric preprocessing, not time parameterization. Values from
the evaluation methods below are derivatives with respect to s; physical
velocity, acceleration, and jerk also depend on the later time law s(t).
§API stability
The waypoint interpolation and fitting constructor families, including
their _view variants, are currently unstable. As additional algorithms
are introduced, their names, signatures, configuration types, and
method-selection interfaces may change in future releases.
Once built, call one of the evaluation methods with a one-dimensional parameter slice:
| Method | Output |
|---|---|
Path::evaluate_q | position q only |
Path::evaluate_up_to_2nd | q, dq, ddq |
Path::evaluate_up_to_3rd | q, dq, ddq, dddq |
Re-exports§
pub use autodiff::Jet3;pub use autodiff::cos;pub use autodiff::exp;pub use autodiff::ln;pub use autodiff::powi;pub use autodiff::sin;pub use autodiff::sqrt;pub use spline::Parametrization;pub use spline::SplineConfig;
Modules§
- autodiff
- Third-order forward-mode automatic differentiation primitives.
- spline
- Waypoint-based spline path construction and evaluation kernels.
Structs§
- Path
- Unified path abstraction over parametric, spline, and evaluator representations.
- Path
Derivatives - Output of path evaluation.
- Smoothing
Config - Configuration for tolerance-bounded waypoint fitting.
- Smoothing
Report - Diagnostics recorded while constructing a smoothed waypoint path.
Enums§
- OutOf
Range Mode - Policy for handling path queries outside the configured
srange. - Smoothing
Tolerance - Absolute deviation limits for the axes selected for smoothing.
Traits§
- Path
Evaluator - Compatibility alias for third-order explicit path evaluators.
- Path
Evaluator2nd - User-provided path evaluator with explicit derivatives up to second order.
- Path
Evaluator3rd - User-provided path evaluator with explicit derivatives up to third order.
Type Aliases§
- Parametric
Fn - Shared analytic path function used by
Path::from_parametric.