94 std::
size_t dim() const;
97 std::
size_t len() const;
123 std::vector<
double>
s_values(std::
size_t idx_s_from, std::
size_t idx_s_to) const;
126 std::vector<
double>
amax_values(std::
size_t idx_s_from, std::
size_t idx_s_to) const;
192 bool is_negative = false);
214 bool is_negative = false);
219 void *handle_ =
nullptr;
267 std::vector<
double>
s_values(std::
size_t idx_s_from, std::
size_t idx_s_to) const;
268 std::vector<
double>
amax_values(std::
size_t idx_s_from, std::
size_t idx_s_to) const;
284 bool is_negative = false);
292 bool is_negative = false);
297 std::unique_ptr<Impl> impl_;
400 Span<const
double> upper,
401 Span<const
double> lower,
402 std::
size_t start_idx_s,
403 std::
size_t length = 0);
413 Span<const
double> upper,
414 Span<const
double> lower,
415 std::
size_t start_idx_s,
416 std::
size_t length = 0);
426 Span<const
double> upper,
427 Span<const
double> lower,
428 std::
size_t start_idx_s,
429 std::
size_t length = 0);
444 Span<const
double> upper,
445 Span<const
double> lower,
446 std::
size_t start_idx_s,
447 std::
size_t length = 0);
455 std::unique_ptr<Impl> impl_;
Constraints(Constraints &&) noexcept
Constraints & pop_front_until(std::size_t idx_s_cut)
Constraints & amax_substitute(Span< const double > amax, std::size_t idx_s)
Constraints & add_constraint_2nd(MatrixView acc_a, MatrixView acc_b, MatrixView acc_max, std::size_t idx_s, bool is_negative=false)
Constraints & pop_back_until(std::size_t idx_s_cut)
Constraints & pop_back_n(std::size_t n_cols)
Constraints & pop_front_n(std::size_t n_cols)
std::size_t capacity() const
Constraints & add_constraint_1st(Span< const double > amax, std::size_t idx_s)
std::pair< std::size_t, std::size_t > idx_s_range() const
double amax_value(std::size_t idx_s) const
Constraints & clear(bool keep_idx_s=false)
std::vector< double > s_values(std::size_t idx_s_from, std::size_t idx_s_to) const
Constraints & append_s(Span< const double > s)
Constraints(std::size_t dim, std::size_t capacity=0)
double s_value(std::size_t idx_s) const
ConstraintsRef ref() noexcept
Borrow this owning object as a solver/constraint reference.
std::vector< double > amax_values(std::size_t idx_s_from, std::size_t idx_s_to) const
Constraints & add_constraint_3rd(MatrixView jerk_a, MatrixView jerk_b, MatrixView jerk_c, MatrixView jerk_d, MatrixView jerk_max, std::size_t idx_s, bool is_negative=false)
Non-owning view of a Rust-backed constraint buffer.
ConstraintsRef & add_constraint_2nd(MatrixView acc_a, MatrixView acc_b, MatrixView acc_max, std::size_t idx_s, bool is_negative=false)
Append second-order raw constraint rows.
ConstraintsRef & pop_back_until(std::size_t idx_s_cut)
Remove back stations until the kept window ends at or before idx_s_cut.
ConstraintsRef() noexcept=default
std::size_t capacity() const
Return the allocated station-buffer capacity.
bool valid() const noexcept
Return whether this reference points to a live bridge handle.
std::pair< std::size_t, std::size_t > idx_s_range() const
Return the active global station-id interval [first, second).
ConstraintsRef & amax_substitute(Span< const double > amax, std::size_t idx_s)
Overwrite first-order upper bounds starting at idx_s.
std::vector< double > amax_values(std::size_t idx_s_from, std::size_t idx_s_to) const
Export first-order upper bounds over [idx_s_from, idx_s_to).
std::vector< double > s_values(std::size_t idx_s_from, std::size_t idx_s_to) const
Export stored station samples over [idx_s_from, idx_s_to).
friend const void * detail::constraints_handle(ConstraintsRef constraints) noexcept
std::size_t dim() const
Return the robot/path dimension.
ConstraintsRef & clear(bool keep_idx_s=false)
Clear all stored stations and constraints.
std::size_t size() const
Alias for len(), useful for STL-style code.
double amax_value(std::size_t idx_s) const
Read one first-order upper bound by global station id.
ConstraintsRef & pop_front_n(std::size_t n_cols)
Remove n_cols logical stations from the front.
ConstraintsRef & add_constraint_1st(Span< const double > amax, std::size_t idx_s)
Add or tighten first-order constraints from a vector.
bool is_empty() const
Return whether no path stations are stored.
ConstraintsRef & pop_back_n(std::size_t n_cols)
Remove n_cols logical stations from the back.
ConstraintsRef & pop_front_until(std::size_t idx_s_cut)
Remove front stations until the kept window starts at idx_s_cut.
friend void * detail::constraints_handle_mut(ConstraintsRef constraints) noexcept
ConstraintsRef & append_s(Span< const double > s)
Append strictly increasing path station samples.
double s_value(std::size_t idx_s) const
Read one stored station sample by global station id.
ConstraintsRef & add_constraint_3rd(MatrixView jerk_a, MatrixView jerk_b, MatrixView jerk_c, MatrixView jerk_d, MatrixView jerk_max, std::size_t idx_s, bool is_negative=false)
Append third-order raw constraint rows.
std::size_t len() const
Return the number of stored path stations.
Non-owning view of a two-dimensional double matrix.
Geometric path wrapper backed by Rust Path.
Robot facade backed by Rust Robot<CppRobotModel>.
ConstraintsRef constraints() noexcept
Return a borrowed raw constraint-buffer facade.
Robot & set_q_2nd(MatrixView q, MatrixView dq, MatrixView ddq, std::size_t idx_s)
Store path derivatives up to second order over an existing station interval.
friend void * detail::robot_handle_mut(Robot &robot) noexcept
Robot & set_q_3rd(MatrixView q, MatrixView dq, MatrixView ddq, MatrixView dddq, std::size_t idx_s)
Store path derivatives up to third order over an existing station interval.
Robot & clear_inverse_dynamics()
Restore point-mass torque evaluation (tau = ddq).
friend const void * detail::robot_handle(const Robot &robot) noexcept
Robot & add_torque_limits(Span< const double > upper, Span< const double > lower, std::size_t start_idx_s, std::size_t length=0)
Add torque limits from broadcast vectors.
Robot & set_q_from_path_2nd(const Path &path, std::size_t idx_s_from, std::size_t idx_s_to)
Sample a path and store derivatives up to second order.
Robot(std::size_t dim, std::size_t capacity=0)
Robot(std::size_t dim, InverseDynamics inverse_dynamics, std::size_t capacity=0)
Robot & add_acceleration_limits(Span< const double > upper, Span< const double > lower, std::size_t start_idx_s, std::size_t length=0)
Add acceleration limits from broadcast vectors.
bool has_inverse_dynamics() const
Return whether a user inverse-dynamics callback is installed.
Robot & append_s(Span< const double > s)
Append strictly increasing path station samples.
Robot & add_velocity_limits(Span< const double > upper, Span< const double > lower, std::size_t start_idx_s, std::size_t length=0)
Add velocity limits from broadcast vectors.
std::pair< std::size_t, std::size_t > idx_s_range() const
Robot & set_inverse_dynamics(InverseDynamics inverse_dynamics)
Replace the inverse-dynamics callback.
std::size_t capacity() const
Robot & set_q_from_path_3rd(const Path &path, std::size_t idx_s_from, std::size_t idx_s_to)
Sample a path and store derivatives up to third order.
Robot & add_jerk_limits(Span< const double > upper, Span< const double > lower, std::size_t start_idx_s, std::size_t length=0)
Add jerk limits from broadcast vectors.
Non-owning view of a contiguous one-dimensional array.
Internal helpers for error conversion, no-throw overloads, and small implementation utilities used by...
COPP_API void * constraints_handle_mut(ConstraintsRef constraints) noexcept
Return the mutable private bridge handle stored by ConstraintsRef.
COPP_API void * robot_handle_mut(Robot &robot) noexcept
Return the mutable private bridge handle stored by Robot.
COPP_API const void * robot_handle(const Robot &robot) noexcept
Return the private bridge handle stored by Robot.
COPP_API const void * constraints_handle(ConstraintsRef constraints) noexcept
Return the private bridge handle stored by ConstraintsRef.
Root namespace for the C++ facade: paths, robots, constraints, matrices, profiles,...
std::function< void( Span< const double > q, Span< const double > dq, Span< const double > ddq, Span< double > tau)> InverseDynamics
User-supplied inverse dynamics callback.