A sparse MPC solver for walking motion generation.
Public Member Functions | Public Attributes | List of all members
smpc::state Class Reference

An abstract class representing state. More...

#include <smpc_solver.h>

Inheritance diagram for smpc::state:
smpc::state_com smpc::state_zmp

Public Member Functions

 state ()
 Default constructor (everything set to 0). More...
 
void set (double x_, double y_)
 Set coordinates, velocities and accelerations are assumed to be zero. More...
 
void set (double x_, double vx_, double ax_, double y_, double vy_, double ay_)
 Set state to given values. More...
 
double & x ()
 X/Y coordinate. More...
 
double & y ()
 X/Y coordinate. More...
 
const double & x () const
 X/Y coordinate. More...
 
const double & y () const
 X/Y coordinate. More...
 
double & vx ()
 Velocity along X/Y axis. More...
 
double & vy ()
 Velocity along X/Y axis. More...
 
const double & vx () const
 Velocity along X/Y axis. More...
 
const double & vy () const
 Velocity along X/Y axis. More...
 
double & ax ()
 Acceleration along X/Y axis. More...
 
double & ay ()
 Acceleration along X/Y axis. More...
 
const double & ax () const
 Acceleration along X/Y axis. More...
 
const double & ay () const
 Acceleration along X/Y axis. More...
 

Public Attributes

double state_vector [SMPC_NUM_STATE_VAR]
 

Detailed Description

An abstract class representing state.

Definition at line 50 of file smpc_solver.h.

Constructor & Destructor Documentation

◆ state()

smpc::state::state ( )

Default constructor (everything set to 0).

Definition at line 414 of file smpc_solver.cpp.

Member Function Documentation

◆ ax() [1/2]

double& smpc::state::ax ( )
inline

Acceleration along X/Y axis.

Definition at line 93 of file smpc_solver.h.

◆ ax() [2/2]

const double& smpc::state::ax ( ) const
inline

Acceleration along X/Y axis.

Definition at line 95 of file smpc_solver.h.

◆ ay() [1/2]

double& smpc::state::ay ( )
inline

Acceleration along X/Y axis.

Definition at line 94 of file smpc_solver.h.

◆ ay() [2/2]

const double& smpc::state::ay ( ) const
inline

Acceleration along X/Y axis.

Definition at line 96 of file smpc_solver.h.

◆ set() [1/2]

void smpc::state::set ( double  x_,
double  y_ 
)

Set coordinates, velocities and accelerations are assumed to be zero.

Parameters
[in]x_x CoM/ZMP position [meter]
[in]y_y CoM/ZMP position [meter]

Definition at line 420 of file smpc_solver.cpp.

◆ set() [2/2]

void smpc::state::set ( double  x_,
double  vx_,
double  ax_,
double  y_,
double  vy_,
double  ay_ 
)

Set state to given values.

Parameters
[in]x_x CoM/ZMP position [meter]
[in]vx_x CoM velocity [meter/s]
[in]ax_x CoM acceleration [meter/s^2]
[in]y_y CoM/ZMP position [meter]
[in]vy_y CoM velocity [meter/s]
[in]ay_y CoM acceleration [meter/s^2]

Definition at line 426 of file smpc_solver.cpp.

◆ vx() [1/2]

double& smpc::state::vx ( )
inline

Velocity along X/Y axis.

Definition at line 85 of file smpc_solver.h.

◆ vx() [2/2]

const double& smpc::state::vx ( ) const
inline

Velocity along X/Y axis.

Definition at line 87 of file smpc_solver.h.

◆ vy() [1/2]

double& smpc::state::vy ( )
inline

Velocity along X/Y axis.

Definition at line 86 of file smpc_solver.h.

◆ vy() [2/2]

const double& smpc::state::vy ( ) const
inline

Velocity along X/Y axis.

Definition at line 88 of file smpc_solver.h.

◆ x() [1/2]

double& smpc::state::x ( )
inline

X/Y coordinate.

Definition at line 77 of file smpc_solver.h.

◆ x() [2/2]

const double& smpc::state::x ( ) const
inline

X/Y coordinate.

Definition at line 79 of file smpc_solver.h.

◆ y() [1/2]

double& smpc::state::y ( )
inline

X/Y coordinate.

Definition at line 78 of file smpc_solver.h.

◆ y() [2/2]

const double& smpc::state::y ( ) const
inline

X/Y coordinate.

Definition at line 80 of file smpc_solver.h.

Member Data Documentation

◆ state_vector

double smpc::state::state_vector[SMPC_NUM_STATE_VAR]
state[0] - x CoM or ZMP position [meter]
state[1] - x CoM velocity [meter/s]
state[2] - x CoM acceleration [meter/s^2]
state[3] - y CoM or ZMP position [meter]
state[4] - y CoM velocity [meter/s]
state[5] - y CoM acceleration [meter/s^2]

Definition at line 63 of file smpc_solver.h.


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