wbc
wbc::Scene Class Referenceabstract

Base class for all wbc scenes. More...

#include <Scene.hpp>

Inheritance diagram for wbc::Scene:
wbc::AccelerationSceneReducedTSID wbc::AccelerationSceneTSID wbc::VelocitySceneQP

Public Member Functions

 Scene (RobotModelPtr robot_model, QPSolverPtr solver, const double dt)
 
 ~Scene ()
 
virtual bool configure (const std::vector< TaskPtr > &tasks)=0
 Configure the WBC scene. Create tasks and sort them by priority given the task config.
 
virtual const HierarchicalQPupdate ()=0
 Update the wbc scene and return the (updated) optimization problem.
 
virtual const types::JointCommandsolve (const HierarchicalQP &hqp)=0
 Solve the given optimization problem.
 
RobotModelPtr getRobotModel ()
 Return the current robot model.
 
QPSolverPtr getSolver ()
 Return the current solver.
 
const Eigen::VectorXd & getSolverOutputRaw () const
 Get current solver output in raw values.
 
void setHessianRegularizer (const double reg)
 setHessianRegularizer
 
double getHessianRegularizer ()
 Return the current value of hessian regularizer.
 
const std::vector< types::Wrench > & getContactWrenches ()
 Get estimated contact wrenches.
 

Protected Attributes

RobotModelPtr robot_model
 
QPSolverPtr solver
 
Eigen::VectorXd solver_output
 
double hessian_regularizer
 
std::vector< types::Wrenchcontact_wrenches
 

Detailed Description

Base class for all wbc scenes.

Constructor & Destructor Documentation

◆ Scene()

wbc::Scene::Scene ( RobotModelPtr robot_model,
QPSolverPtr solver,
const double dt )

◆ ~Scene()

wbc::Scene::~Scene ( )

Member Function Documentation

◆ configure()

virtual bool wbc::Scene::configure ( const std::vector< TaskPtr > & tasks)
pure virtual

Configure the WBC scene. Create tasks and sort them by priority given the task config.

Parameters
tasksTasks used in optimization function. Size has to be > 0. All tasks have to be valid. See tasks and TaskConfig.hpp for more details.

Implemented in wbc::AccelerationSceneReducedTSID, wbc::AccelerationSceneTSID, and wbc::VelocitySceneQP.

◆ getContactWrenches()

const std::vector< types::Wrench > & wbc::Scene::getContactWrenches ( )
inline

Get estimated contact wrenches.

◆ getHessianRegularizer()

double wbc::Scene::getHessianRegularizer ( )
inline

Return the current value of hessian regularizer.

◆ getRobotModel()

RobotModelPtr wbc::Scene::getRobotModel ( )
inline

Return the current robot model.

◆ getSolver()

QPSolverPtr wbc::Scene::getSolver ( )
inline

Return the current solver.

◆ getSolverOutputRaw()

const Eigen::VectorXd & wbc::Scene::getSolverOutputRaw ( ) const
inline

Get current solver output in raw values.

◆ setHessianRegularizer()

void wbc::Scene::setHessianRegularizer ( const double reg)
inline

setHessianRegularizer

Parameters
regThis value is added to the diagonal of the Hessian matrix inside the QP to reduce the risk of infeasibility. Default is 1e-8

◆ solve()

virtual const types::JointCommand & wbc::Scene::solve ( const HierarchicalQP & hqp)
pure virtual

Solve the given optimization problem.

Returns
Solver output as joint command

Implemented in wbc::AccelerationSceneReducedTSID, wbc::AccelerationSceneTSID, and wbc::VelocitySceneQP.

◆ update()

virtual const HierarchicalQP & wbc::Scene::update ( )
pure virtual

Update the wbc scene and return the (updated) optimization problem.

Returns
Hierarchical quadratic program (solver input)

Implemented in wbc::AccelerationSceneReducedTSID, wbc::AccelerationSceneTSID, and wbc::VelocitySceneQP.

Member Data Documentation

◆ contact_wrenches

std::vector<types::Wrench> wbc::Scene::contact_wrenches
protected

◆ hessian_regularizer

double wbc::Scene::hessian_regularizer
protected

◆ robot_model

RobotModelPtr wbc::Scene::robot_model
protected

◆ solver

QPSolverPtr wbc::Scene::solver
protected

◆ solver_output

Eigen::VectorXd wbc::Scene::solver_output
protected

The documentation for this class was generated from the following files: