Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
SLAMObservationModel Class Reference

#include <slam_base_observation_model.hpp>

Collaboration diagram for SLAMObservationModel:
Collaboration graph

Public Member Functions

 SLAMObservationModel ()=default
 
virtual ~SLAMObservationModel ()=default
 
virtual Eigen::VectorXd observation_model (const Eigen::VectorXd &state, const std::vector< int > matched_landmarks) const
 transform landmarks' positions from global frame to the car's frame
 
virtual Eigen::VectorXd inverse_observation_model (const Eigen::VectorXd &state, const Eigen::VectorXd &observations) const
 transforms the landmarks' coordinates from the car's frame to the global frame
 
virtual Eigen::MatrixXd observation_model_jacobian (const Eigen::VectorXd &state, const std::vector< int > &matched_landmarks) const
 jacobian of the observation model
 
virtual Eigen::MatrixXd inverse_observation_model_jacobian_pose (const Eigen::VectorXd &state, const Eigen::VectorXd &new_landmarks) const
 get the Gv matrix used in the state augmentation function, calculated as the jacobian of the inverse observation model with respect to the car's position and orientation
 
virtual Eigen::MatrixXd inverse_observation_model_jacobian_landmarks (const Eigen::VectorXd &state, const Eigen::VectorXd &new_landmarks) const
 get the Gz matrix used in the state augmentation function of the EKF, calculated as the jacobian of the inverse observation model with respect to the new landmarks positions (in the car's frame)
 

Detailed Description

Definition at line 7 of file slam_base_observation_model.hpp.

Constructor & Destructor Documentation

◆ SLAMObservationModel()

SLAMObservationModel::SLAMObservationModel ( )
default

◆ ~SLAMObservationModel()

virtual SLAMObservationModel::~SLAMObservationModel ( )
virtualdefault

Member Function Documentation

◆ inverse_observation_model()

Eigen::VectorXd SLAMObservationModel::inverse_observation_model ( const Eigen::VectorXd &  state,
const Eigen::VectorXd &  observations 
) const
virtual

transforms the landmarks' coordinates from the car's frame to the global frame

Parameters
stateused to get the car's pose
observationsobserved landmarks in the car's frame in form {x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
Returns
Eigen::VectorXd landmarks in the global frame in form {x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}

Definition at line 16 of file slam_base_observation_model.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inverse_observation_model_jacobian_landmarks()

Eigen::MatrixXd SLAMObservationModel::inverse_observation_model_jacobian_landmarks ( const Eigen::VectorXd &  state,
const Eigen::VectorXd &  new_landmarks 
) const
virtual

get the Gz matrix used in the state augmentation function of the EKF, calculated as the jacobian of the inverse observation model with respect to the new landmarks positions (in the car's frame)

Parameters
statecar's position and orientation, followed by the landmarks in the form {car_x, car_y, car_theta, x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
new_landmarksnew landmarks in the form {x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
Returns
Eigen::MatrixXd Gz matrix of size (2 * num_new_landmarks, 2 * num_new_landmarks)

Definition at line 63 of file slam_base_observation_model.cpp.

◆ inverse_observation_model_jacobian_pose()

Eigen::MatrixXd SLAMObservationModel::inverse_observation_model_jacobian_pose ( const Eigen::VectorXd &  state,
const Eigen::VectorXd &  new_landmarks 
) const
virtual

get the Gv matrix used in the state augmentation function, calculated as the jacobian of the inverse observation model with respect to the car's position and orientation

Parameters
statecar's position and orientation, followed by the landmarks in the form {car_x, car_y, car_theta, x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
new_landmarksnew landmarks in the form {x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
Returns
Eigen::MatrixXd Gv matrix of size (2 * num_new_landmarks, 3)

Definition at line 47 of file slam_base_observation_model.cpp.

◆ observation_model()

Eigen::VectorXd SLAMObservationModel::observation_model ( const Eigen::VectorXd &  state,
const std::vector< int >  matched_landmarks 
) const
virtual

transform landmarks' positions from global frame to the car's frame

Parameters
statevector with the car's position and orientation, followed by the landmark positions {car_x, car_y, car_theta, x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
matched_landmarksindexes of the x coordinate of landmarks in the state vector that were observed in a specific measurement
Returns
Eigen::VectorXd predicted observations {x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}

Definition at line 5 of file slam_base_observation_model.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ observation_model_jacobian()

Eigen::MatrixXd SLAMObservationModel::observation_model_jacobian ( const Eigen::VectorXd &  state,
const std::vector< int > &  matched_landmarks 
) const
virtual

jacobian of the observation model

Parameters
statevector with the car's position and orientation, followed by the landmark positions {car_x, car_y, car_theta, x_cone_1, y_cone_1, x_cone_2, y_cone_2, ...}
matched_landmarksindexes of the x coordinate of landmarks in the state vector that were observed in a specific measurement
Returns
Eigen::MatrixXd jacobian of the observation prediction

Definition at line 21 of file slam_base_observation_model.cpp.


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