robotoc
robotoc - efficient ROBOT Optimal Control solvers
|
Newton direction of the solution to the optimal control problem split into a time stage. More...
#include <split_direction.hpp>
Public Member Functions | |
SplitDirection (const Robot &robot) | |
Construct a split solution. More... | |
SplitDirection () | |
Default constructor. More... | |
~SplitDirection ()=default | |
Default destructor. More... | |
SplitDirection (const SplitDirection &)=default | |
Default copy constructor. More... | |
SplitDirection & | operator= (const SplitDirection &)=default |
Default copy operator. More... | |
SplitDirection (SplitDirection &&) noexcept=default | |
Default move constructor. More... | |
SplitDirection & | operator= (SplitDirection &&) noexcept=default |
Default move assign operator. More... | |
void | setContactDimension (const int dimf) |
Sets contact status, i.e., set dimension of the contact forces. More... | |
void | setSwitchingConstraintDimension (const int dims) |
Sets the dimension of the switching constraint. More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dq () |
Newton direction of SplitSolution::q. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dq () const |
const version of SplitDirection::dq(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dv () |
Newton direction of SplitSolution::gmm. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dv () const |
const version of SplitDirection::dv(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | daf () |
Stack of Newton direction of SplitSolution::a and SplitSolution::f. Size is Robot::dimv() + ContactStatus::dimf(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | daf () const |
const version of SplitDirection::daf(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | da () |
Newton direction of SplitSolution::a. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | da () const |
const version of SplitDirection::da(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | ddvf () |
Stack of Newton direction of SplitSolution::dv and SplitSolution::f. Size is Robot::dimv() + ContactStatus::dimf(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | ddvf () const |
const version of SplitDirection::ddvf(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | ddv () |
Newton direction of SplitSolution::dv. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | ddv () const |
const version of SplitDirection::ddv(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | df () |
Newton direction of SplitSolution::f_stack(). Size is ContactStatus::dimf(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | df () const |
const version of SplitDirection::df(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dlmd () |
Newton direction of SplitSolution::lmd. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dlmd () const |
const version of SplitDirection::dlmd(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dgmm () |
Newton direction of SplitSolution::gmm. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dgmm () const |
const version of SplitDirection::dgmm(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dbetamu () |
Stack of the Newton direction of SplitSolution::beta and SplitSolution::mu_stack(). Size is Robot::dimv() + SplitSolution::dimf(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dbetamu () const |
const version of SplitDirection::dbetamu(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dbeta () |
Newton direction of SplitSolution::beta. Size is Robot::dimv(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dbeta () const |
const version of SplitDirection::dbeta(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dmu () |
Newton direction of SplitSolution::mu_stack(). Size is SplitSolution::dimf(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dmu () const |
const version of SplitDirection::dmu(). More... | |
Eigen::VectorBlock< Eigen::VectorXd > | dxi () |
Newton direction of SplitSolution::xi_stack(). Size is SplitSolution::dims(). More... | |
const Eigen::VectorBlock< const Eigen::VectorXd > | dxi () const |
const version of SplitDirection::dxi(). More... | |
void | setZero () |
Set the all directions zero. More... | |
int | dimf () const |
Returns the dimension of the contact. More... | |
int | dims () const |
Returns the dimension of the switching constraint. More... | |
bool | isDimensionConsistent () const |
Checks dimensional consistency of each component. More... | |
bool | isApprox (const SplitDirection &other) const |
Return true if two SplitDirection have the same values and false if not. More... | |
void | setRandom () |
Sets each component vector by random value based on the current contact status. More... | |
void | setRandom (const ContactStatus &contact_status) |
Sets each component vector by random value. Contact status is reset. More... | |
void | setRandom (const ImpactStatus &impact_status) |
Sets each component vector by random value. Impact status is reset. More... | |
void | setRandom (const ContactStatus &contact_status, const ImpactStatus &impact_status) |
Sets each component vector by random value. Contact status and impact status are reset. More... | |
void | disp (std::ostream &os) const |
Displays the split direction onto a ostream. More... | |
Static Public Member Functions | |
static SplitDirection | Random (const Robot &robot) |
Generates split direction filled randomly. More... | |
static SplitDirection | Random (const Robot &robot, const ContactStatus &contact_status) |
Generates split direction filled randomly. More... | |
static SplitDirection | Random (const Robot &robot, const ImpactStatus &impact_status) |
Generates split direction filled randomly. More... | |
static SplitDirection | Random (const Robot &robot, const ContactStatus &contact_status, const ImpactStatus &impact_status) |
Generates split direction filled randomly. More... | |
Public Attributes | |
Eigen::VectorXd | dx |
Stack of the Newton directions of SplitSolution::q and SplitSolution::v. Size is 2 * Robot::dimv(). More... | |
Eigen::VectorXd | du |
Newton direction of SplitSolution::u. Size is Robot::dimu(). More... | |
Eigen::VectorXd | dlmdgmm |
Stack of the Newton direction of SplitSolution::lmd and SplitSolution::gmm. Size is 2 * Robot::dimv(). More... | |
Eigen::VectorXd | dnu_passive |
Newton direction of SplitSolution::nu_passive. Size is Robot::dim_passive(). More... | |
double | dts |
Newton direction of the switching time. More... | |
double | dts_next |
Newton direction of the next switching time. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SplitDirection &d) |
Newton direction of the solution to the optimal control problem split into a time stage.
robotoc::SplitDirection::SplitDirection | ( | const Robot & | robot | ) |
Construct a split solution.
[in] | robot | Robot model. |
robotoc::SplitDirection::SplitDirection | ( | ) |
Default constructor.
|
default |
Default destructor.
|
default |
Default copy constructor.
|
defaultnoexcept |
Default move constructor.
|
inline |
Newton direction of SplitSolution::a. Size is Robot::dimv().
|
inline |
const version of SplitDirection::da().
|
inline |
Stack of Newton direction of SplitSolution::a and SplitSolution::f. Size is Robot::dimv() + ContactStatus::dimf().
|
inline |
const version of SplitDirection::daf().
|
inline |
Newton direction of SplitSolution::beta. Size is Robot::dimv().
|
inline |
const version of SplitDirection::dbeta().
|
inline |
Stack of the Newton direction of SplitSolution::beta and SplitSolution::mu_stack(). Size is Robot::dimv() + SplitSolution::dimf().
|
inline |
const version of SplitDirection::dbetamu().
|
inline |
Newton direction of SplitSolution::dv. Size is Robot::dimv().
|
inline |
const version of SplitDirection::ddv().
|
inline |
Stack of Newton direction of SplitSolution::dv and SplitSolution::f. Size is Robot::dimv() + ContactStatus::dimf().
|
inline |
const version of SplitDirection::ddvf().
|
inline |
Newton direction of SplitSolution::f_stack(). Size is ContactStatus::dimf().
|
inline |
const version of SplitDirection::df().
|
inline |
Newton direction of SplitSolution::gmm. Size is Robot::dimv().
|
inline |
const version of SplitDirection::dgmm().
|
inline |
Returns the dimension of the contact.
|
inline |
Returns the dimension of the switching constraint.
void robotoc::SplitDirection::disp | ( | std::ostream & | os | ) | const |
Displays the split direction onto a ostream.
|
inline |
Newton direction of SplitSolution::lmd. Size is Robot::dimv().
|
inline |
const version of SplitDirection::dlmd().
|
inline |
Newton direction of SplitSolution::mu_stack(). Size is SplitSolution::dimf().
|
inline |
const version of SplitDirection::dmu().
|
inline |
Newton direction of SplitSolution::q. Size is Robot::dimv().
|
inline |
const version of SplitDirection::dq().
|
inline |
Newton direction of SplitSolution::gmm. Size is Robot::dimv().
|
inline |
const version of SplitDirection::dv().
|
inline |
Newton direction of SplitSolution::xi_stack(). Size is SplitSolution::dims().
|
inline |
const version of SplitDirection::dxi().
bool robotoc::SplitDirection::isApprox | ( | const SplitDirection & | other | ) | const |
Return true if two SplitDirection have the same values and false if not.
[in] | other | Split direction that is compared with this object. |
bool robotoc::SplitDirection::isDimensionConsistent | ( | ) | const |
Checks dimensional consistency of each component.
|
default |
Default copy operator.
|
defaultnoexcept |
Default move assign operator.
|
static |
Generates split direction filled randomly.
[in] | robot | Robot model. Must be initialized by URDF or XML. |
|
static |
Generates split direction filled randomly.
[in] | robot | Robot model. Must be initialized by URDF or XML. |
[in] | contact_status | Contact status. |
|
static |
Generates split direction filled randomly.
[in] | robot | Robot model. Must be initialized by URDF or XML. |
[in] | contact_status | Contact status. |
[in] | impact_status | Impact status. |
|
static |
Generates split direction filled randomly.
[in] | robot | Robot model. Must be initialized by URDF or XML. |
[in] | impact_status | Impact status. |
|
inline |
Sets contact status, i.e., set dimension of the contact forces.
[in] | dimf | The dimension of the contact. Must be non-negative. |
void robotoc::SplitDirection::setRandom | ( | ) |
Sets each component vector by random value based on the current contact status.
void robotoc::SplitDirection::setRandom | ( | const ContactStatus & | contact_status | ) |
Sets each component vector by random value. Contact status is reset.
[in] | contact_status | Contact status. |
void robotoc::SplitDirection::setRandom | ( | const ContactStatus & | contact_status, |
const ImpactStatus & | impact_status | ||
) |
Sets each component vector by random value. Contact status and impact status are reset.
[in] | contact_status | Contact status. |
[in] | impact_status | Impact status. |
void robotoc::SplitDirection::setRandom | ( | const ImpactStatus & | impact_status | ) |
Sets each component vector by random value. Impact status is reset.
[in] | impact_status | Impact status. |
|
inline |
Sets the dimension of the switching constraint.
[in] | dims | The dimension of the switching constraint. Must be non-negative. |
|
inline |
Set the all directions zero.
|
friend |
Eigen::VectorXd robotoc::SplitDirection::dlmdgmm |
Stack of the Newton direction of SplitSolution::lmd and SplitSolution::gmm. Size is 2 * Robot::dimv().
Eigen::VectorXd robotoc::SplitDirection::dnu_passive |
Newton direction of SplitSolution::nu_passive. Size is Robot::dim_passive().
double robotoc::SplitDirection::dts |
Newton direction of the switching time.
double robotoc::SplitDirection::dts_next |
Newton direction of the next switching time.
Eigen::VectorXd robotoc::SplitDirection::du |
Newton direction of SplitSolution::u. Size is Robot::dimu().
Eigen::VectorXd robotoc::SplitDirection::dx |
Stack of the Newton directions of SplitSolution::q and SplitSolution::v. Size is 2 * Robot::dimv().