38 Eigen::VectorXd state = Eigen::VectorXd::Zero(3);
39 Eigen::MatrixXd covariance = Eigen::MatrixXd::Identity(3, 3);
40 Eigen::VectorXd new_landmarks_coordinates(10);
41 new_landmarks_coordinates << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
42 ekf_slam_solver->state_augmentation(state, covariance, new_landmarks_coordinates);
43 std::vector<double> expected_state = {0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
44 EXPECT_EQ(state.size(), expected_state.size());
45 for (
int i = 0; i < state.size(); i++) {
46 EXPECT_NEAR(state(i), expected_state[i], 0.0001);
55 Eigen::VectorXd state = Eigen::VectorXd::Zero(3);
56 state << 0, 0, M_PI / 2;
57 Eigen::MatrixXd covariance = Eigen::MatrixXd::Identity(3, 3);
58 Eigen::VectorXd new_landmarks_coordinates(10);
59 Eigen::VectorXd new_landmarks_confidences(5);
60 new_landmarks_coordinates << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;
61 ekf_slam_solver->state_augmentation(state, covariance, new_landmarks_coordinates);
62 std::vector<double> expected_state = {0, 0, M_PI / 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
63 EXPECT_EQ(state.size(), expected_state.size());
64 for (
int i = 0; i < state.size(); i++) {
65 EXPECT_NEAR(state(i), expected_state[i], 0.0001);
const std::map< std::string, std::function< std::shared_ptr< DataAssociationModel >(const DataAssociationParameters &)>, std::less<> > data_association_models_map
Map of data association models, with the key being the name of the data association model and the val...