Skip to content

Commit

Permalink
Add some documentation to spline_mapping.h.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 601161487
Change-Id: I75101a0f25180939f098f70f60ca8cbca49913f6
  • Loading branch information
nimrod-gileadi authored and copybara-github committed Jan 24, 2024
1 parent 4b97700 commit 80afe47
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions mjpc/planners/gradient/spline_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80afe47

Please sign in to comment.