Node variables used to construct the base motion spline. More...
#include <base_nodes.h>
Public Member Functions | |
BaseNodes (int n_nodes, std::string variable_id) | |
virtual std::vector< IndexInfo > | GetNodeInfoAtOptIndex (int idx) const override |
The node information that the optimization index represents. More... | |
virtual | ~BaseNodes ()=default |
Public Member Functions inherited from towr::Nodes | |
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 |
virtual VecBound | GetBounds () const override |
int | GetDim () const |
const std::vector< Node > | GetNodes () const |
int | GetPolynomialCount () const |
VectorXd | GetValues () const override |
int | Index (const IndexInfo &node_info) const |
The index at which a specific node variable is stored. More... | |
int | Index (int node_id, Dx deriv, int node_dim) const |
void | InitializeNodesTowardsGoal (const VectorXd &initial_pos, const VectorXd &final_pos, double t_total) |
Sets nodes pos/vel equally spaced from initial to final position. More... | |
void | SetVariables (const VectorXd &x) override |
Sets the node position and velocity optimization variables. More... | |
Additional Inherited Members | |
Public Types inherited from towr::Nodes | |
using | ObserverPtr = NodesObserver * |
using | Ptr = std::shared_ptr< Nodes > |
enum | Side { Start =0, End } |
using | VecDurations = std::vector< double > |
Static Public Member Functions inherited from towr::Nodes | |
static int | GetNodeId (int poly_id, Side side) |
The node ID that belongs to a specific side of a specific polynomial. More... | |
Protected Member Functions inherited from towr::Nodes | |
void | InitMembers (int n_nodes, int n_variables) |
initializes the member variables. More... | |
Nodes (int n_dim, const std::string &variable_name) | |
virtual | ~Nodes ()=default |
Protected Attributes inherited from towr::Nodes | |
VecBound | bounds_ |
the bounds on the node values. More... | |
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 43 of file base_nodes.h.
towr::BaseNodes::BaseNodes | ( | int | n_nodes, |
std::string | variable_id | ||
) |
n_nodes | The number of nodes to construct the spline. |
variable_id | The name of this variables set in the optimization. |
Definition at line 35 of file base_nodes.cc.
|
virtualdefault |
|
overridevirtual |
The node information that the optimization index represents.
idx | The index (=row) of the node optimization variable. |
One optimization variables can also represent multiple nodes in the spline if they are always equal (e.g. constant phases). This is why this function returns a vector.
Implements towr::Nodes.
Definition at line 43 of file base_nodes.cc.