Node variables used to construct the base motion spline. More...
#include <nodes_variables_all.h>
Public Member Functions | |
std::vector< NodeValueInfo > | GetNodeValuesInfo (int idx) const override |
Node values affected by one specific optimization variable. More... | |
NodesVariablesAll (int n_nodes, int n_dim, std::string variable_id) | |
virtual | ~NodesVariablesAll ()=default |
Public Member Functions inherited from towr::NodesVariables | |
void | AddFinalBound (Dx deriv, const std::vector< int > &dimensions, const VectorXd &val) |
Restricts the last node in the spline. More... | |
void | AddObserver (ObserverPtr const spline) |
Adds a dependent observer that gets notified when the nodes change. More... | |
void | AddStartBound (Dx deriv, const std::vector< int > &dimensions, const VectorXd &val) |
Restricts the first node in the spline. More... | |
const std::vector< Node > | GetBoundaryNodes (int poly_id) const |
VecBound | GetBounds () const override |
int | GetDim () const |
const std::vector< Node > | GetNodes () const |
int | GetOptIndex (const NodeValueInfo &nvi) const |
Index in the optimization vector for a specific nodes' pos/vel. More... | |
int | GetPolynomialCount () const |
VectorXd | GetValues () const override |
Pure optimization variables that define the nodes. More... | |
void | SetByLinearInterpolation (const VectorXd &initial_val, const VectorXd &final_val, double t_total) |
Sets nodes pos/vel equally spaced from initial to final position. More... | |
void | SetVariables (const VectorXd &x) override |
Sets some node positions and velocity from the optimization variables. More... | |
Public Member Functions inherited from ifopt::VariableSet | |
Jacobian | GetJacobian () const final |
VariableSet (int n_var, const std::string &name) | |
virtual | ~VariableSet ()=default |
Public Member Functions inherited from ifopt::Component | |
Component (int num_rows, const std::string &name) | |
std::string | GetName () const |
int | GetRows () const |
virtual void | Print (double tolerance, int &index_start) const |
void | SetRows (int num_rows) |
virtual | ~Component ()=default |
Additional Inherited Members | |
Public Types inherited from towr::NodesVariables | |
using | ObserverPtr = NodesObserver * |
using | Ptr = std::shared_ptr< NodesVariables > |
enum | Side { Start =0, End } |
using | VecDurations = std::vector< double > |
Public Types inherited from ifopt::Component | |
typedef Eigen::SparseMatrix< double, Eigen::RowMajor > | Jacobian |
typedef std::shared_ptr< Component > | Ptr |
typedef std::vector< Bounds > | VecBound |
typedef Eigen::VectorXd | VectorXd |
Static Public Member Functions inherited from towr::NodesVariables | |
static int | GetNodeId (int poly_id, Side side) |
The node ID that belongs to a specific side of a specific polynomial. More... | |
Static Public Attributes inherited from towr::NodesVariables | |
static const int | NodeValueNotOptimized = -1 |
Static Public Attributes inherited from ifopt::Component | |
static const int | kSpecifyLater |
Protected Member Functions inherited from towr::NodesVariables | |
NodesVariables (const std::string &variable_name) | |
virtual | ~NodesVariables ()=default |
Protected Attributes inherited from towr::NodesVariables | |
VecBound | bounds_ |
the bounds on the node values. More... | |
int | n_dim_ |
std::vector< Node > | nodes_ |
Node variables used to construct the base motion spline.
Every node is optimized over, in contrast to PhaseNodes, where multiple nodes in the spline are represented by the same optimization variables.
Definition at line 45 of file nodes_variables_all.h.
towr::NodesVariablesAll::NodesVariablesAll | ( | int | n_nodes, |
int | n_dim, | ||
std::string | variable_id | ||
) |
n_nodes | Number of nodes to construct the spline. |
n_dim | Number of dimensions of each node. |
variable_id | Name of this variables set in the optimization. |
Definition at line 34 of file nodes_variables_all.cc.
|
virtualdefault |
|
overridevirtual |
Node values affected by one specific optimization variable.
opt_idx | The index (=row) of the optimization variable. |
This function determines which node values are optimized over, and which nodes values are set by the same optimization variable.
Reverse of GetOptIndex().
Implements towr::NodesVariables.
Definition at line 46 of file nodes_variables_all.cc.