3#include <yaml-cpp/yaml.h>
105 std::string global_config_path =
108 YAML::Node global_config = YAML::LoadFile(global_config_path);
110 std::string adapter = global_config[
"global"][
"adapter"].as<std::string>();
113 this->
frame_id_ = global_config[
"global"][
"vehicle_frame_id"].as<std::string>();
115 std::string slam_config_path =
118 YAML::Node slam_config = YAML::LoadFile(slam_config_path);
120 this->
motion_model_name_ = slam_config[
"slam"][
"motion_model_name"].as<std::string>();
121 this->
pose_updater_name_ = slam_config[
"slam"][
"pose_updater_name"].as<std::string>();
126 slam_config[
"slam"][
"data_association_model_name"].as<std::string>();
128 slam_config[
"slam"][
"data_association_limit_distance"].as<
float>();
131 slam_config[
"slam"][
"new_landmark_confidence_gate"].as<
double>();
142 this->
slam_solver_name_ = slam_config[
"slam"][
"slam_solver_name"].as<std::string>();
150 slam_config[
"slam"][
"slam_isam2_relinearize_threshold"].as<
double>();
152 slam_config[
"slam"][
"slam_isam2_relinearize_skip"].as<
double>();
154 slam_config[
"slam"][
"slam_isam2_factorization"].as<std::string>();
159 slam_config[
"slam"][
"minimum_frequency_of_detections"].as<
double>();
161 this->
threshold_dist = slam_config[
"slam"][
"threshold_dist"].as<
double>();
162 this->
first_x_cones = slam_config[
"slam"][
"first_x_cones"].as<
double>();
163 this->
border_width = slam_config[
"slam"][
"border_width"].as<
int>();
std::string get_config_yaml_path(const std::string &package_name, const std::string &dir, const std::string &filename)
Parameters for the SLAM node.
double data_association_gate_
double minimum_frequency_of_detections_
int minimum_observation_count_
float data_association_limit_distance_
float observation_y_noise_
bool use_simulated_perception_
int max_pose_history_graph
float imu_acceleration_x_noise_
bool synchronized_timestamps
double slam_isam2_relinearize_skip_
std::string motion_model_name_
int max_pose_history_updater
bool using_preloaded_map_
std::string slam_optimization_mode_
unsigned int sliding_window_size_
SLAMParameters & operator=(const SLAMParameters &other)
Overload the assignment operator for SLAMParameters.
std::string slam_solver_name_
double slam_isam2_relinearize_threshold_
double pose_x_initial_noise_
float angular_velocity_noise_
bool use_simulated_velocities_
std::string landmark_filter_name_
std::string slam_isam2_factorization_
double pose_y_initial_noise_
bool slam_optimization_in_poses_
double slam_optimization_period_
float observation_x_noise_
double pose_theta_initial_noise_
double preloaded_map_noise_
double new_landmark_confidence_gate_
std::string slam_optimization_type_
double slam_min_pose_difference_
std::string data_association_model_name_
bool receive_lidar_odometry_
std::string pose_updater_name_
std::string load_config()
Load the configuration for the SLAM node from YAML file.
std::string lidar_odometry_topic_