Tetrapod Project
StateEstimator Class Reference

#include <state_estimator.h>

Public Member Functions

 StateEstimator (double gait_period, double controller_frequency)
 
void PrintStates ()
 
void PublishBodyTwistState ()
 
void UpdateStates ()
 

Private Member Functions

void InitializeROS ()
 
void GeneralizedPositionCallback (const std_msgs::Float64MultiArrayConstPtr &msg)
 
void GeneralizedVelocityCallback (const std_msgs::Float64MultiArrayConstPtr &msg)
 

Private Attributes

Eigen::Matrix< double, 3, 1 > _attitude = Eigen::Matrix<double, 3, 1>::Zero()
 
Eigen::Matrix< double, 3, 1 > _lin_vel_body = Eigen::Matrix<double, 3, 1>::Zero()
 
Eigen::Matrix< double, 3, 1 > _ang_vel = Eigen::Matrix<double, 3, 1>::Zero()
 
Eigen::Matrix< double, 3, 1 > _lin_vel_world = Eigen::Matrix<double, 3, 1>::Zero()
 
double _avg_lin_gait_vel_x = 0.0
 
double _avg_lin_gait_vel_y = 0.0
 
double _avg_ang_gait_vel_z = 0.0
 
std::vector< double > _lin_vel_body_x_history
 
std::vector< double > _lin_vel_body_y_history
 
std::vector< double > _ang_vel_body_z_history
 
int gait_iteration = 0
 
int number_of_gait_iterations
 
std::string _node_name = "state_estimation_node"
 
ros::NodeHandlePtr _node_handle
 
ros::Subscriber _generalized_position_subscriber
 
ros::Subscriber _generalized_velocity_subscriber
 
ros::Publisher _body_twist_state_publisher
 

Detailed Description

Definition at line 13 of file state_estimator.h.

Constructor & Destructor Documentation

◆ StateEstimator()

StateEstimator::StateEstimator ( double  gait_period,
double  controller_frequency 
)

Definition at line 3 of file state_estimator.cpp.

Member Function Documentation

◆ PrintStates()

void StateEstimator::PrintStates ( )

Definition at line 105 of file state_estimator.cpp.

◆ PublishBodyTwistState()

void StateEstimator::PublishBodyTwistState ( )

Definition at line 110 of file state_estimator.cpp.

◆ UpdateStates()

void StateEstimator::UpdateStates ( )

Definition at line 81 of file state_estimator.cpp.

◆ InitializeROS()

void StateEstimator::InitializeROS ( )
private

Definition at line 18 of file state_estimator.cpp.

◆ GeneralizedPositionCallback()

void StateEstimator::GeneralizedPositionCallback ( const std_msgs::Float64MultiArrayConstPtr &  msg)
private

Definition at line 54 of file state_estimator.cpp.

◆ GeneralizedVelocityCallback()

void StateEstimator::GeneralizedVelocityCallback ( const std_msgs::Float64MultiArrayConstPtr &  msg)
private

Definition at line 62 of file state_estimator.cpp.

Member Data Documentation

◆ _attitude

Eigen::Matrix<double, 3, 1> StateEstimator::_attitude = Eigen::Matrix<double, 3, 1>::Zero()
private

Definition at line 23 of file state_estimator.h.

◆ _lin_vel_body

Eigen::Matrix<double, 3, 1> StateEstimator::_lin_vel_body = Eigen::Matrix<double, 3, 1>::Zero()
private

Definition at line 25 of file state_estimator.h.

◆ _ang_vel

Eigen::Matrix<double, 3, 1> StateEstimator::_ang_vel = Eigen::Matrix<double, 3, 1>::Zero()
private

Definition at line 27 of file state_estimator.h.

◆ _lin_vel_world

Eigen::Matrix<double, 3, 1> StateEstimator::_lin_vel_world = Eigen::Matrix<double, 3, 1>::Zero()
private

Definition at line 29 of file state_estimator.h.

◆ _avg_lin_gait_vel_x

double StateEstimator::_avg_lin_gait_vel_x = 0.0
private

Definition at line 31 of file state_estimator.h.

◆ _avg_lin_gait_vel_y

double StateEstimator::_avg_lin_gait_vel_y = 0.0
private

Definition at line 33 of file state_estimator.h.

◆ _avg_ang_gait_vel_z

double StateEstimator::_avg_ang_gait_vel_z = 0.0
private

Definition at line 35 of file state_estimator.h.

◆ _lin_vel_body_x_history

std::vector<double> StateEstimator::_lin_vel_body_x_history
private

Definition at line 37 of file state_estimator.h.

◆ _lin_vel_body_y_history

std::vector<double> StateEstimator::_lin_vel_body_y_history
private

Definition at line 39 of file state_estimator.h.

◆ _ang_vel_body_z_history

std::vector<double> StateEstimator::_ang_vel_body_z_history
private

Definition at line 41 of file state_estimator.h.

◆ gait_iteration

int StateEstimator::gait_iteration = 0
private

Definition at line 43 of file state_estimator.h.

◆ number_of_gait_iterations

int StateEstimator::number_of_gait_iterations
private

Definition at line 45 of file state_estimator.h.

◆ _node_name

std::string StateEstimator::_node_name = "state_estimation_node"
private

Definition at line 47 of file state_estimator.h.

◆ _node_handle

ros::NodeHandlePtr StateEstimator::_node_handle
private

Definition at line 49 of file state_estimator.h.

◆ _generalized_position_subscriber

ros::Subscriber StateEstimator::_generalized_position_subscriber
private

Definition at line 51 of file state_estimator.h.

◆ _generalized_velocity_subscriber

ros::Subscriber StateEstimator::_generalized_velocity_subscriber
private

Definition at line 53 of file state_estimator.h.

◆ _body_twist_state_publisher

ros::Publisher StateEstimator::_body_twist_state_publisher
private

Definition at line 55 of file state_estimator.h.


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