diff --git a/mjpc/planners/gradient/spline_mapping.h b/mjpc/planners/gradient/spline_mapping.h index b96bcf9c6..1f80747b4 100644 --- a/mjpc/planners/gradient/spline_mapping.h +++ b/mjpc/planners/gradient/spline_mapping.h @@ -25,11 +25,27 @@ namespace mjpc { // ----- spline constants ----- // inline constexpr int kMinGradientSplinePoints = 1; inline constexpr int kMaxGradientSplinePoints = 25; -inline constexpr int kMinGradientSplinePower = 1; -inline constexpr int kMaxGradientSplinePower = 5; // matrix representation for mapping between spline points and interpolated time -// series +// series. +// A spline is made of num_input points, and each has one associated time, and +// `dim` associated parameters. +// The time series has num_output entries, each associated with a time and with +// dim associated values. +// +// For sampling policies, we have +// dim = model->nu +// num_input = num_spline_points +// num_output = trajectory_length +// +// The mapping is a matrix, A, of shape (dim*num_output) x (dim*num_input), +// which can be used to go from spline parameters to the values of the sampled +// time series, assuming a fixed set of times. +// +// Given a vector of containing spline parameters, v (length=dim*num_input), +// flattened so that the parameters for each spline point are next to each +// other, A*v gives the corresponding interpolated values, sampled at +// output_times. class SplineMapping { public: // constructor