#include <ekf.hpp>
|
| void | predict (Eigen::Vector3d &state, Eigen::Matrix3d &covariance, const Eigen::Matrix3d &process_noise_matrix, const rclcpp::Time last_update, common_lib::sensor_data::ImuData &imu_data) |
| | Predict velocities at the next index based on IMU measurements and current state.
|
| |
| void | correct_wheels (Eigen::Vector3d &state, Eigen::Matrix3d &covariance, common_lib::sensor_data::WheelEncoderData &wss_data, double motor_rpm, double steering_angle) |
| | Correct the state estimate based on wheel speed sensor, resolver, and steering data.
|
| |
| void | correct_imu (Eigen::Vector3d &state, Eigen::Matrix3d &covariance, common_lib::sensor_data::ImuData &imu_data) |
| |
Definition at line 17 of file ekf.hpp.
◆ EKF()
◆ correct_imu()
◆ correct_wheels()
Correct the state estimate based on wheel speed sensor, resolver, and steering data.
This function updates the state and covariance estimates using measurements from the wheel speed sensor, resolver, and steering angle sensor. It corrects the predicted state to better match the observed measurements.
- Parameters
-
| state | Vector of velocities {velocity_x, velocity_y, rotational_velocity} |
| covariance | Covariance matrix representing the uncertainty in the state estimate. |
| wss_data | Wheel speed sensor data containing wheel speeds. |
| motor_rpm | data representing the motor's rpms. |
| steering_angle | data representing the steering angle. |
Definition at line 130 of file ekf.cpp.
◆ get_velocities()
◆ imu_callback()
Callback function for the IMU data that should be called by adapters when new IMU data is available.
Implements VelocityEstimator.
Definition at line 23 of file ekf.cpp.
◆ motor_rpm_callback()
| void EKF::motor_rpm_callback |
( |
double |
motor_rpm | ) |
|
|
overridevirtual |
Callback function for the motor RPM data that should be called by adapters when new motor RPM data is available.
Implements VelocityEstimator.
Definition at line 64 of file ekf.cpp.
◆ predict()
| void EKF::predict |
( |
Eigen::Vector3d & |
state, |
|
|
Eigen::Matrix3d & |
covariance, |
|
|
const Eigen::Matrix3d & |
process_noise_matrix, |
|
|
const rclcpp::Time |
last_update, |
|
|
common_lib::sensor_data::ImuData & |
imu_data |
|
) |
| |
|
private |
Predict velocities at the next index based on IMU measurements and current state.
- Parameters
-
| state | Vector of velocities {velocity_x, velocity_y, rotational_velocity} |
| covariance | Covariance matrix representing the uncertainty in the state estimate. |
| process_noise_matrix | Process noise matrix representing the uncertainty in the process model. |
| last_update | Time point of the last update. |
| imu_data | IMU data containing acceleration and rotational velocity measurements. |
Definition at line 108 of file ekf.cpp.
◆ steering_callback()
| void EKF::steering_callback |
( |
double |
steering_angle | ) |
|
|
overridevirtual |
Callback function for the steering angle data that should be called by adapters when new steering angle data is available.
Implements VelocityEstimator.
Definition at line 80 of file ekf.cpp.
◆ wss_callback()
Callback function for the wheel speed sensor data that should be called by adapters when new wheel speed sensor data is available.
Implements VelocityEstimator.
Definition at line 48 of file ekf.cpp.
◆ _covariance_
| Eigen::Matrix3d EKF::_covariance_ = Eigen::Matrix3d::Identity() |
|
private |
◆ _has_made_prediction_
| bool EKF::_has_made_prediction_ = false |
|
private |
◆ _imu_measurement_noise_matrix_
| Eigen::MatrixXd EKF::_imu_measurement_noise_matrix_ |
|
private |
◆ _last_update_
| rclcpp::Time EKF::_last_update_ |
|
private |
◆ _process_noise_matrix_
| Eigen::Matrix3d EKF::_process_noise_matrix_ |
|
private |
◆ _state_
| Eigen::Vector3d EKF::_state_ = Eigen::Vector3d::Zero() |
|
private |
◆ _wheels_measurement_noise_matrix_
| Eigen::MatrixXd EKF::_wheels_measurement_noise_matrix_ |
|
private |
◆ car_parameters_
◆ imu_data_
◆ imu_data_received_
| bool EKF::imu_data_received_ = false |
|
private |
◆ motor_rpm_
◆ motor_rpm_received_
| bool EKF::motor_rpm_received_ = false |
|
private |
◆ observation_model_
◆ process_model
◆ steering_angle_
| double EKF::steering_angle_ |
|
private |
◆ steering_angle_received_
| bool EKF::steering_angle_received_ = false |
|
private |
◆ wss_data_
◆ wss_data_received_
| bool EKF::wss_data_received_ = false |
|
private |
The documentation for this class was generated from the following files:
- src/velocity_estimation/include/estimators/ekf.hpp
- src/velocity_estimation/src/estimators/ekf.cpp