Class StateObserverParam

Inheritance Relationships

Derived Types

Class Documentation

class StateObserverParam

Base class for state observer parameters.

The StateObserverParam class provides methods to initialize and manage the parameters required for a state observer, including state-space matrices and the initial state vector.

Subclassed by state_observer::KalmanFilterParam, state_observer::LuenbergerParam

Public Types

using SharedPtr = std::shared_ptr<StateObserverParam>

Public Functions

inline StateObserverParam()

Default constructor.

inline virtual ~StateObserverParam()

Destructor.

virtual void initialize(const rclcpp_lifecycle::LifecycleNode::SharedPtr &node)

Initialize the parameters from a ROS 2 lifecycle node.

Parameters:

node – Shared pointer to an rclcpp_lifecycle::LifecycleNode.

Throws:

std::runtime_error – if parameter retrieval fails.

inline Eigen::MatrixXd get_state_transition_matrix()

Get the state transition matrix A.

Returns:

State transition matrix A_ (n x n).

inline Eigen::MatrixXd get_input_matrix()

Get the input matrix B.

Returns:

Input matrix B_ (n x p).

inline Eigen::MatrixXd get_output_matrix()

Get the output matrix C.

Returns:

Output matrix C_ (q x n).

inline Eigen::MatrixXd get_feedforward_matrix()

Get the feedforward matrix D.

Returns:

Feedforward matrix D_ (q x p).

inline Eigen::VectorXd get_initial_state() const

Get the initial state vector.

Returns:

Initial state vector initial_state_ (n x 1).

inline Eigen::MatrixXd get_A()

Get the state transition matrix A.

Returns:

State transition matrix A_ (n x n).

inline Eigen::MatrixXd get_B()

Get the input matrix B.

Returns:

Input matrix B_ (n x p).

inline Eigen::MatrixXd get_C()

Get the output matrix C.

Returns:

Output matrix C_ (q x n).

inline Eigen::MatrixXd get_D()

Get the feedforward matrix D.

Returns:

Feedforward matrix D_ (q x p).

inline virtual std::string get_type() const

Get the type of the state observer.

Throws:

std::runtime_error – if not implemented.

Returns:

A string representing the type of the state observer.

Protected Functions

void fully_declare_parameter(const std::string &param_name, const rclcpp::ParameterType type, const std::string &description)

Protected Attributes

rclcpp_lifecycle::LifecycleNode::SharedPtr node_
Eigen::MatrixXd A_
Eigen::MatrixXd B_
Eigen::MatrixXd C_
Eigen::MatrixXd D_
Eigen::VectorXd initial_state_