#include <sobec/walk-with-traj/wbc.hpp>
Public Member Functions | |
WBC () | |
WBC (const WBCSettings &settings, const RobotDesigner &design, const HorizonManager &horizon, const Eigen::VectorXd &q0, const Eigen::VectorXd &v0, const std::string &actuationCostName) | |
void | initialize (const WBCSettings &settings, const RobotDesigner &design, const HorizonManager &horizon, const Eigen::VectorXd &q0, const Eigen::VectorXd &v0, const std::string &actuationCostName) |
void | initializeSupportTiming () |
void | updateSupportTiming () |
const supportSwitch & | getSwitches (const unsigned long before, const unsigned long after) |
const Eigen::VectorXd & | shapeState (const Eigen::VectorXd &q, const Eigen::VectorXd &v) |
void | generateWalkingCycle (ModelMaker &mm) |
void | generateStandingCycle (ModelMaker &mm) |
void | generateWalkingCycleNoThinking (ModelMaker &mm) |
void | generateStandingCycleNoThinking (ModelMaker &mm) |
void | updateStepCycleTiming () |
bool | timeToSolveDDP (int iteration) |
void | iterate (const Eigen::VectorXd &q_current, const Eigen::VectorXd &v_current, bool is_feasible) |
void | iterate (int iteration, const Eigen::VectorXd &q_current, const Eigen::VectorXd &v_current, bool is_feasible) |
void | iterateNoThinking (const Eigen::VectorXd &q_current, const Eigen::VectorXd &v_current, bool is_feasible) |
void | iterateNoThinking (int iteration, const Eigen::VectorXd &q_current, const Eigen::VectorXd &v_current, bool is_feasible) |
void | recedeWithCycle () |
void | recedeWithCycle (HorizonManager &cycle) |
void | goToNextDoubleSupport () |
WBCSettings & | get_settings () |
const Eigen::VectorXd & | get_x0 () const |
void | set_x0 (const Eigen::VectorXd &x0) |
HorizonManager & | get_walkingCycle () |
void | set_walkingCycle (const HorizonManager &walkingCycle) |
HorizonManager & | get_standingCycle () |
void | set_standingCycle (const HorizonManager &standingCycle) |
HorizonManager & | get_horizon () |
void | set_horizon (const HorizonManager &horizon) |
RobotDesigner & | get_designer () |
void | set_designer (const RobotDesigner &designer) |
const std::vector< int > & | get_land_LF () |
const std::vector< int > & | get_land_RF () |
const std::vector< int > & | get_takeoff_LF () |
const std::vector< int > & | get_takeoff_RF () |
const int & | get_land_LF_cycle () |
const int & | get_land_RF_cycle () |
const int & | get_takeoff_LF_cycle () |
const int & | get_takeoff_RF_cycle () |
const std::vector< pinocchio::SE3 > & | getPoseRef_LF () |
const pinocchio::SE3 & | getPoseRef_LF (unsigned long time) |
void | setPoseRef_LF (const std::vector< pinocchio::SE3 > &ref_LF_poses) |
void | setPoseRef_LF (const pinocchio::SE3 &ref_LF_pose, unsigned long time) |
const std::vector< pinocchio::SE3 > & | getPoseRef_RF () |
const pinocchio::SE3 & | getPoseRef_RF (unsigned long time) |
void | setPoseRef_RF (const std::vector< pinocchio::SE3 > &ref_RF_poses) |
void | setPoseRef_RF (const pinocchio::SE3 &ref_RF_pose, unsigned long time) |
const eVector3 & | getCoMRef () |
void | setCoMRef (eVector3 ref_com) |
const Eigen::Matrix3d & | getBaseRotRef () |
void | setBaseRotRef (Eigen::Matrix3d ref_base_rotation) |
const eVector3 & | getVelRef_COM () |
void | setVelRef_COM (eVector3 ref_com_vel) |
std::vector< pinocchio::SE3 > & | ref_LF_poses () |
std::vector< pinocchio::SE3 > & | ref_RF_poses () |
eVector3 & | ref_com () |
Eigen::Matrix3d & | ref_base_rot () |
eVector3 & | ref_com_vel () |
void | switchToWalk () |
void | switchToStand () |
LocomotionType | currentLocomotion () |
Protected Member Functions | |
void | updateStepTrackerReferences () |
void | updateStepTrackerLastReference () |
void | updateNonThinkingReferences () |
void | rewindWalkingCycle () |
Protected Attributes | |
WBCSettings | settings_ |
RobotDesigner | designer_ |
HorizonManager | horizon_ |
HorizonManager | walkingCycle_ |
HorizonManager | standingCycle_ |
eVector3 | ref_com_vel_ |
eVector3 | ref_com_ |
eVector3 | ref_dcm_ |
Eigen::Matrix3d | ref_base_rotation_ |
Eigen::VectorXd | x0_ |
LocomotionType | now_ = WALKING |
int | nWalkingCycles_ |
double | yaw_left_ |
double | yaw_right_ |
std::vector< int > | takeoff_RF_ |
std::vector< int > | takeoff_LF_ |
std::vector< int > | land_RF_ |
std::vector< int > | land_LF_ |
int | takeoff_RF_cycle_ |
int | takeoff_LF_cycle_ |
int | land_RF_cycle_ |
int | land_LF_cycle_ |
std::vector< pinocchio::SE3 > | ref_LF_poses_ |
std::vector< pinocchio::SE3 > | ref_RF_poses_ |
bool | initialized_ = false |
std::vector< unsigned long > | controlled_joints_id_ |
Eigen::VectorXd | x_internal_ |
bool | time_to_solve_ddp_ = false |
bool | first_switch_to_stand_ = true |
std::set< std::string > | contacts_before_ |
std::set< std::string > | contacts_after_ |
supportSwitch | switch_ |
int | horizon_end_ |
sobec::WBC::WBC | ( | ) |
sobec::WBC::WBC | ( | const WBCSettings & | settings, |
const RobotDesigner & | design, | ||
const HorizonManager & | horizon, | ||
const Eigen::VectorXd & | q0, | ||
const Eigen::VectorXd & | v0, | ||
const std::string & | actuationCostName | ||
) |
|
inline |
void sobec::WBC::generateStandingCycle | ( | ModelMaker & | mm | ) |
void sobec::WBC::generateStandingCycleNoThinking | ( | ModelMaker & | mm | ) |
void sobec::WBC::generateWalkingCycle | ( | ModelMaker & | mm | ) |
void sobec::WBC::generateWalkingCycleNoThinking | ( | ModelMaker & | mm | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
const supportSwitch & sobec::WBC::getSwitches | ( | const unsigned long | before, |
const unsigned long | after | ||
) |
|
inline |
void sobec::WBC::goToNextDoubleSupport | ( | ) |
void sobec::WBC::initialize | ( | const WBCSettings & | settings, |
const RobotDesigner & | design, | ||
const HorizonManager & | horizon, | ||
const Eigen::VectorXd & | q0, | ||
const Eigen::VectorXd & | v0, | ||
const std::string & | actuationCostName | ||
) |
The posture required here is the full robot posture in the order of pinicchio
void sobec::WBC::initializeSupportTiming | ( | ) |
void sobec::WBC::iterate | ( | const Eigen::VectorXd & | q_current, |
const Eigen::VectorXd & | v_current, | ||
bool | is_feasible | ||
) |
void sobec::WBC::iterate | ( | int | iteration, |
const Eigen::VectorXd & | q_current, | ||
const Eigen::VectorXd & | v_current, | ||
bool | is_feasible | ||
) |
void sobec::WBC::iterateNoThinking | ( | const Eigen::VectorXd & | q_current, |
const Eigen::VectorXd & | v_current, | ||
bool | is_feasible | ||
) |
void sobec::WBC::iterateNoThinking | ( | int | iteration, |
const Eigen::VectorXd & | q_current, | ||
const Eigen::VectorXd & | v_current, | ||
bool | is_feasible | ||
) |
void sobec::WBC::recedeWithCycle | ( | ) |
void sobec::WBC::recedeWithCycle | ( | HorizonManager & | cycle | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
This function brings the walking cycle to the beggining of a double support
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
const Eigen::VectorXd & sobec::WBC::shapeState | ( | const Eigen::VectorXd & | q, |
const Eigen::VectorXd & | v | ||
) |
|
inline |
|
inline |
bool sobec::WBC::timeToSolveDDP | ( | int | iteration | ) |
|
protected |
void sobec::WBC::updateStepCycleTiming | ( | ) |
|
protected |
|
protected |
void sobec::WBC::updateSupportTiming | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Form to use this class: 1) The function iterate produces the torques to command. 2) All cost references must be updated separtely in the control loop.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |