humoto
Public Member Functions | Public Attributes | List of all members
humoto::pepper_mpc::PreviewHorizon Class Reference

Detailed Description

Preview horizon of an MPC [form_preview_horizon.m].

Definition at line 149 of file preview_horizon.h.

#include <preview_horizon.h>

Public Member Functions

bool form (const MPCParameters &mpc_params, const Model &model, const MotionParameters &motion_parameters)
 Form the preview horizon object. More...
 
bool form (const MPCParameters &mpc_params, const Model &model, const std::deque< MotionParameters > &motion_parameters_deque)
 Form the preview horizon object. More...
 
etools::Vector2 getBaseReferencePosition (const std::size_t interval_index) const
 Get base reference position. More...
 
etools::Vector2 getBaseReferenceVelocity (const std::size_t interval_index) const
 Get base reference velocity. More...
 
etools::Matrix2 getBodyBounds (const std::size_t interval_index) const
 Get body bounds. More...
 
etools::Matrix2 getCoPBounds (const std::size_t interval_index) const
 Get CoP bounds for given interval. More...
 
std::size_t getIntervalIndexByTimeOffset (std::size_t &offset_ms) const
 Finds interval which contains the time instant with the given offset from the beginning of the preview horizon. More...
 
std::size_t getIntervalIndexByTimeOffset (double &offset) const
 Finds interval which contains the time instant with the given offset from the beginning of the preview horizon. More...
 
etools::Matrix2 getNominalBaseAccelerationBounds (const std::size_t interval_index) const
 Get nominal base acceleration bounds for a given interval. More...
 
etools::Matrix2 getNominalBaseVelocityBounds (const std::size_t interval_index) const
 Get nominal base velocity bounds for a given interval. More...
 
std::size_t getPreviewHorizonLength () const
 Get preview horizon length. More...
 
etools::Matrix2 getRotationMatrix (const std::size_t interval_index) const
 Get orientation of the support corresponding to the given interval. More...
 
void log (humoto::Logger &logger, const LogEntryName &parent=LogEntryName(), const std::string &name="preview_horizon") const
 Log. More...
 

Public Attributes

std::vector< PreviewHorizonIntervalintervals_
 

Member Function Documentation

◆ form() [1/2]

bool humoto::pepper_mpc::PreviewHorizon::form ( const MPCParameters mpc_params,
const Model model,
const MotionParameters motion_parameters 
)
inline

Form the preview horizon object.

Parameters
[in]mpc_params
[in]model
[in]motion_parameters
Returns
true if successful

Definition at line 165 of file preview_horizon.h.

◆ form() [2/2]

bool humoto::pepper_mpc::PreviewHorizon::form ( const MPCParameters mpc_params,
const Model model,
const std::deque< MotionParameters > &  motion_parameters_deque 
)
inline

Form the preview horizon object.

Parameters
[in]mpc_params
[in]model
[in]motion_parameters_deque
Returns
true if successful

Definition at line 202 of file preview_horizon.h.

◆ getBaseReferencePosition()

etools::Vector2 humoto::pepper_mpc::PreviewHorizon::getBaseReferencePosition ( const std::size_t  interval_index) const
inline

Get base reference position.

Parameters
[in]interval_index
Returns
2d vector [base_pos_ref_x, base_pos_ref_y]

Definition at line 339 of file preview_horizon.h.

◆ getBaseReferenceVelocity()

etools::Vector2 humoto::pepper_mpc::PreviewHorizon::getBaseReferenceVelocity ( const std::size_t  interval_index) const
inline

Get base reference velocity.

Parameters
[in]interval_index
Returns
2d vector [base_vel_ref_x, base_vel_ref_y]

Definition at line 326 of file preview_horizon.h.

◆ getBodyBounds()

etools::Matrix2 humoto::pepper_mpc::PreviewHorizon::getBodyBounds ( const std::size_t  interval_index) const
inline

Get body bounds.

Parameters
[in]interval_index
Returns
2d matrix [lb, ub]

Definition at line 300 of file preview_horizon.h.

◆ getCoPBounds()

etools::Matrix2 humoto::pepper_mpc::PreviewHorizon::getCoPBounds ( const std::size_t  interval_index) const
inline

Get CoP bounds for given interval.

Parameters
[in]interval_index
Returns
2d matrix [lb, ub]

Definition at line 313 of file preview_horizon.h.

◆ getIntervalIndexByTimeOffset() [1/2]

std::size_t humoto::pepper_mpc::PreviewHorizon::getIntervalIndexByTimeOffset ( std::size_t &  offset_ms) const
inline

Finds interval which contains the time instant with the given offset from the beginning of the preview horizon.

Parameters
[in,out]offset_msinput: offset within the preview horizon output: offset within the interval
Returns
interval index

Definition at line 367 of file preview_horizon.h.

◆ getIntervalIndexByTimeOffset() [2/2]

std::size_t humoto::pepper_mpc::PreviewHorizon::getIntervalIndexByTimeOffset ( double offset) const
inline

Finds interval which contains the time instant with the given offset from the beginning of the preview horizon.

Parameters
[in,out]offsetinput: offset within the preview horizon output: offset within the interval
Returns
interval index

Definition at line 396 of file preview_horizon.h.

◆ getNominalBaseAccelerationBounds()

etools::Matrix2 humoto::pepper_mpc::PreviewHorizon::getNominalBaseAccelerationBounds ( const std::size_t  interval_index) const
inline

Get nominal base acceleration bounds for a given interval.

Parameters
[in]interval_index
Returns
2d matrix [x_base_acc, y_base_acc]

Definition at line 287 of file preview_horizon.h.

◆ getNominalBaseVelocityBounds()

etools::Matrix2 humoto::pepper_mpc::PreviewHorizon::getNominalBaseVelocityBounds ( const std::size_t  interval_index) const
inline

Get nominal base velocity bounds for a given interval.

Parameters
[in]interval_index
Returns
2d matrix [x_base_vel, y_base_vel]

Definition at line 274 of file preview_horizon.h.

◆ getPreviewHorizonLength()

std::size_t humoto::pepper_mpc::PreviewHorizon::getPreviewHorizonLength ( ) const
inline

Get preview horizon length.

Returns
preview horizon length

Definition at line 261 of file preview_horizon.h.

◆ getRotationMatrix()

etools::Matrix2 humoto::pepper_mpc::PreviewHorizon::getRotationMatrix ( const std::size_t  interval_index) const
inline

Get orientation of the support corresponding to the given interval.

Parameters
[in]interval_index
Returns
2d rotation matrix

Definition at line 352 of file preview_horizon.h.

◆ log()

void humoto::pepper_mpc::PreviewHorizon::log ( humoto::Logger logger,
const LogEntryName parent = LogEntryName(),
const std::string &  name = "preview_horizon" 
) const
inline

Log.

Parameters
[in,out]loggerlogger
[in]parentparent
[in]namename

Definition at line 423 of file preview_horizon.h.

Member Data Documentation

◆ intervals_

std::vector<PreviewHorizonInterval> humoto::pepper_mpc::PreviewHorizon::intervals_

Definition at line 152 of file preview_horizon.h.


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