22 #ifndef OV_MSCKF_STATE_OPTIONS_H 23 #define OV_MSCKF_STATE_OPTIONS_H 95 void print(
const std::shared_ptr<ov_core::YamlParser> &parser =
nullptr) {
97 parser->parse_config(
"use_fej", do_fej);
100 std::string integration_str =
"rk4";
101 parser->parse_config(
"integration", integration_str);
102 if (integration_str ==
"discrete") {
103 integration_method = IntegrationMethod::DISCRETE;
104 }
else if (integration_str ==
"rk4") {
105 integration_method = IntegrationMethod::RK4;
106 }
else if (integration_str ==
"analytical") {
107 integration_method = IntegrationMethod::ANALYTICAL;
110 PRINT_ERROR(
RED "please select a valid model: discrete, rk4, analytical\n" RESET);
111 std::exit(EXIT_FAILURE);
115 parser->parse_config(
"calib_cam_extrinsics", do_calib_camera_pose);
116 parser->parse_config(
"calib_cam_intrinsics", do_calib_camera_intrinsics);
117 parser->parse_config(
"calib_cam_timeoffset", do_calib_camera_timeoffset);
118 parser->parse_config(
"calib_imu_intrinsics", do_calib_imu_intrinsics);
119 parser->parse_config(
"calib_imu_g_sensitivity", do_calib_imu_g_sensitivity);
122 parser->parse_config(
"max_clones", max_clone_size);
123 parser->parse_config(
"max_slam", max_slam_features);
124 parser->parse_config(
"max_slam_in_update", max_slam_in_update);
125 parser->parse_config(
"max_msckf_in_update", max_msckf_in_update);
126 parser->parse_config(
"num_aruco", max_aruco_features);
127 parser->parse_config(
"max_cameras", num_cameras);
131 parser->parse_config(
"feat_rep_msckf", rep1);
134 parser->parse_config(
"feat_rep_slam", rep2);
137 parser->parse_config(
"feat_rep_aruco", rep3);
141 std::string imu_model_str =
"kalibr";
142 parser->parse_external(
"relative_config_imu",
"imu0",
"model", imu_model_str);
143 if (imu_model_str ==
"kalibr" || imu_model_str ==
"calibrated") {
144 imu_model = ImuModel::KALIBR;
145 }
else if (imu_model_str ==
"rpng") {
146 imu_model = ImuModel::RPNG;
149 PRINT_ERROR(
RED "please select a valid model: kalibr, rpng\\n" RESET);
150 std::exit(EXIT_FAILURE);
152 if (imu_model_str ==
"calibrated" && (do_calib_imu_intrinsics || do_calib_imu_g_sensitivity)) {
154 PRINT_ERROR(
RED "please select what model you have: kalibr, rpng\n" RESET);
155 std::exit(EXIT_FAILURE);
159 PRINT_DEBUG(
" - integration: %d\n", integration_method);
160 PRINT_DEBUG(
" - calib_cam_extrinsics: %d\n", do_calib_camera_pose);
161 PRINT_DEBUG(
" - calib_cam_intrinsics: %d\n", do_calib_camera_intrinsics);
162 PRINT_DEBUG(
" - calib_cam_timeoffset: %d\n", do_calib_camera_timeoffset);
163 PRINT_DEBUG(
" - calib_imu_intrinsics: %d\n", do_calib_imu_intrinsics);
164 PRINT_DEBUG(
" - calib_imu_g_sensitivity: %d\n", do_calib_imu_g_sensitivity);
166 PRINT_DEBUG(
" - max_clones: %d\n", max_clone_size);
167 PRINT_DEBUG(
" - max_slam: %d\n", max_slam_features);
168 PRINT_DEBUG(
" - max_slam_in_update: %d\n", max_slam_in_update);
169 PRINT_DEBUG(
" - max_msckf_in_update: %d\n", max_msckf_in_update);
170 PRINT_DEBUG(
" - max_aruco: %d\n", max_aruco_features);
180 #endif // OV_MSCKF_STATE_OPTIONS_H int num_cameras
Number of distinct cameras that we will observe features in.
ImuModel imu_model
What model our IMU intrinsics are.
Extended Kalman Filter estimator.
bool do_fej
Bool to determine whether or not to do first estimate Jacobians.
ImuModel
IMU intrinsic models.
IntegrationMethod
Numerical integration methods.
Struct which stores all our filter options.
int max_slam_in_update
Max number of SLAM features we allow to be included in a single EKF update.
int max_aruco_features
Max number of estimated ARUCO features.
int max_msckf_in_update
Max number of MSCKF features we will use at a given image timestep.
static std::string as_string(Representation feat_representation)
IntegrationMethod integration_method
What type of numerical integration is used during propagation.
ov_type::LandmarkRepresentation::Representation feat_rep_msckf
What representation our features are in (msckf features)
static Representation from_string(const std::string &feat_representation)
bool do_calib_camera_intrinsics
Bool to determine whether or not to calibrate camera intrinsics.
bool do_calib_imu_intrinsics
Bool to determine whether or not to calibrate the IMU intrinsics.
ov_type::LandmarkRepresentation::Representation feat_rep_slam
What representation our features are in (slam features)
void print(const std::shared_ptr< ov_core::YamlParser > &parser=nullptr)
Nice print function of what parameters we have loaded.
bool do_calib_imu_g_sensitivity
Bool to determine whether or not to calibrate the Gravity sensitivity.
#define PRINT_ERROR(x...)
bool do_calib_camera_pose
Bool to determine whether or not to calibrate imu-to-camera pose.
int max_clone_size
Max clone size of sliding window.
ov_type::LandmarkRepresentation::Representation feat_rep_aruco
What representation our features are in (aruco tag features)
bool do_calib_camera_timeoffset
Bool to determine whether or not to calibrate camera to IMU time offset.
int max_slam_features
Max number of estimated SLAM features.
#define PRINT_DEBUG(x...)