robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
robotoc::ControlPolicy Class Reference

Control pocily constructed for the MPC solution. More...

#include <control_policy.hpp>

Public Member Functions

 ControlPolicy (const OCPSolver &ocp_solver, const double t)
 Constructs the policy from the OCP solver. More...
 
 ControlPolicy ()
 Default constructor. More...
 
 ~ControlPolicy ()=default
 Default destructor. More...
 
 ControlPolicy (const ControlPolicy &)=default
 Default copy constructor. More...
 
ControlPolicyoperator= (const ControlPolicy &)=default
 Default copy assign operator. More...
 
 ControlPolicy (ControlPolicy &&) noexcept=default
 Default move constructor. More...
 
ControlPolicyoperator= (ControlPolicy &&) noexcept=default
 Default move assign operator. More...
 
void set (const OCPSolver &ocp_solver, const double t)
 Sets the control policy from the OCP solver. More...
 
void disp (std::ostream &os) const
 

Static Public Member Functions

static ControlPolicy FromOCPSolver (const OCPSolver &ocp_solver)
 

Public Attributes

double t
 Inquired time of the control. More...
 
Eigen::VectorXd tauJ
 Joint torques. Size must be Robot::dimu(). More...
 
Eigen::VectorXd qJ
 Joint positions. Size must be Robot::dimu(). More...
 
Eigen::VectorXd dqJ
 Joint velocities. Size must be Robot::dimu(). More...
 
Eigen::MatrixXd Kp
 Joint position gain. Size must be Robot::dimu() x Robot::dimu(). More...
 
Eigen::MatrixXd Kd
 Joint velocity gain. Size must be Robot::dimu() x Robot::dimu(). More...
 

Friends

std::ostream & operator<< (std::ostream &os, const ControlPolicy &control_policy)
 

Detailed Description

Control pocily constructed for the MPC solution.

Constructor & Destructor Documentation

◆ ControlPolicy() [1/4]

robotoc::ControlPolicy::ControlPolicy ( const OCPSolver ocp_solver,
const double  t 
)

Constructs the policy from the OCP solver.

Parameters
[in]ocp_solverOCP solver.
[in]tInquired time of the control.

◆ ControlPolicy() [2/4]

robotoc::ControlPolicy::ControlPolicy ( )

Default constructor.

◆ ~ControlPolicy()

robotoc::ControlPolicy::~ControlPolicy ( )
default

Default destructor.

◆ ControlPolicy() [3/4]

robotoc::ControlPolicy::ControlPolicy ( const ControlPolicy )
default

Default copy constructor.

◆ ControlPolicy() [4/4]

robotoc::ControlPolicy::ControlPolicy ( ControlPolicy &&  )
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ disp()

void robotoc::ControlPolicy::disp ( std::ostream &  os) const

◆ FromOCPSolver()

static ControlPolicy robotoc::ControlPolicy::FromOCPSolver ( const OCPSolver ocp_solver)
static

◆ operator=() [1/2]

ControlPolicy & robotoc::ControlPolicy::operator= ( const ControlPolicy )
default

Default copy assign operator.

◆ operator=() [2/2]

ControlPolicy & robotoc::ControlPolicy::operator= ( ControlPolicy &&  )
defaultnoexcept

Default move assign operator.

◆ set()

void robotoc::ControlPolicy::set ( const OCPSolver ocp_solver,
const double  t 
)

Sets the control policy from the OCP solver.

Parameters
[in]ocp_solverOCP solver.
[in]tInquired time of the control.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const ControlPolicy control_policy 
)
friend

Member Data Documentation

◆ dqJ

Eigen::VectorXd robotoc::ControlPolicy::dqJ

Joint velocities. Size must be Robot::dimu().

◆ Kd

Eigen::MatrixXd robotoc::ControlPolicy::Kd

Joint velocity gain. Size must be Robot::dimu() x Robot::dimu().

◆ Kp

Eigen::MatrixXd robotoc::ControlPolicy::Kp

Joint position gain. Size must be Robot::dimu() x Robot::dimu().

◆ qJ

Eigen::VectorXd robotoc::ControlPolicy::qJ

Joint positions. Size must be Robot::dimu().

◆ t

double robotoc::ControlPolicy::t

Inquired time of the control.

◆ tauJ

Eigen::VectorXd robotoc::ControlPolicy::tauJ

Joint torques. Size must be Robot::dimu().


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