COPP C ABI 0.2.3
C interface for COPP trajectory optimization
Loading...
Searching...
No Matches
CoppSmoothingOptions Struct Reference

Options for tolerance-bounded waypoint fitting. More...

#include <path.h>

Data Fields

double tolerance
 Absolute tolerance broadcast to every selected axis when tolerance_per_axis is empty.
struct CoppSliceF64 tolerance_per_axis
 Optional per-axis absolute tolerances.
struct CoppSliceUsize axes
 Optional 0-based input rows allowed to deviate from their reference polylines.
struct CoppSliceF64 parameters
 Optional common path parameter assigned to each waypoint column.
size_t max_refinements
 Maximum number of adaptive knot-refinement passes.
size_t max_segments
 Maximum number of polynomial spans used by the selected axes.
enum CoppPathOutOfRangeMode out_of_range_mode
 Behavior for out-of-range evaluation of the returned path.

Detailed Description

Options for tolerance-bounded waypoint fitting.

Use copp_smoothing_default_options first, then override only the fields you need. Empty borrowed slices (data = NULL, len = 0) select the documented defaults. Borrowed slices are read only during copp_path_from_waypoints_fitting; the returned path does not keep them.

This options type is currently unstable: its fields and layout may change as additional waypoint path-construction algorithms are introduced.

Example

The example below fits translational rows 0..=2 to 1e-3 input units and rotary rows 3..=4 to 1e-2 input units. Tolerance entries follow axes order.

size_t axes[] = {0, 1, 2, 3, 4};
double tolerances[] = {1e-3, 1e-3, 1e-3, 1e-2, 1e-2};
struct CoppSmoothingOptions options;
options.axes = (struct CoppSliceUsize){axes, 5};
options.tolerance_per_axis = (struct CoppSliceF64){tolerances, 5};
enum CoppStatus copp_smoothing_default_options(struct CoppSmoothingOptions *out_options)
Write default tolerance-bounded fitting options into out_options.
struct CoppSliceUsize axes
Optional 0-based input rows allowed to deviate from their reference polylines.
Definition path.h:539

Definition at line 510 of file path.h.

Field Documentation

◆ tolerance

double CoppSmoothingOptions::tolerance

Absolute tolerance broadcast to every selected axis when tolerance_per_axis is empty.

The value is expressed in each selected row's input units and must be finite and strictly positive. The default is 0.001.

Definition at line 518 of file path.h.

◆ tolerance_per_axis

struct CoppSliceF64 CoppSmoothingOptions::tolerance_per_axis

Optional per-axis absolute tolerances.

When non-empty, this replaces tolerance. Its length must equal the number of selected axes, and entry i applies to input row axes[i]: the order follows axes, not the row index. When axes is empty, the order is the natural row order 0..rows. Every entry must be finite and strictly positive, in the corresponding row's input units.

Definition at line 528 of file path.h.

◆ axes

struct CoppSliceUsize CoppSmoothingOptions::axes

Optional 0-based input rows allowed to deviate from their reference polylines.

Empty selects every row. A non-empty list must contain distinct, in-range row indices; its order also defines the order of tolerance_per_axis and of the report's axes and max_errors. Unselected rows keep quintic C4 interpolation through all waypoint columns, with zero first and second parameter derivatives at both ends.

Definition at line 539 of file path.h.

◆ parameters

struct CoppSliceF64 CoppSmoothingOptions::parameters

Optional common path parameter assigned to each waypoint column.

Empty assigns the columns uniformly on [0, 1]. A non-empty list must contain one finite, strictly increasing entry per column; its first and last entries become the path parameter range. Relative spacing affects the fitted geometry, not only the returned parameter range.

Definition at line 548 of file path.h.

◆ max_refinements

size_t CoppSmoothingOptions::max_refinements

Maximum number of adaptive knot-refinement passes.

The default is 20. Reaching this limit before the whole-interval audit passes returns COPP_STATUS_PATH_SMOOTHING.

Definition at line 555 of file path.h.

◆ max_segments

size_t CoppSmoothingOptions::max_segments

Maximum number of polynomial spans used by the selected axes.

The default is 20000. Spans of the separate unselected-axis interpolant do not consume this budget.

Definition at line 562 of file path.h.

◆ out_of_range_mode

enum CoppPathOutOfRangeMode CoppSmoothingOptions::out_of_range_mode

Behavior for out-of-range evaluation of the returned path.

The default is COPP_PATH_OUT_OF_RANGE_MODE_ERROR. Clamping affects later queries, not fitting or auditing.

Definition at line 569 of file path.h.


The documentation for this struct was generated from the following file:
  • bindings/c/include/copp/path.h