22 #ifndef OV_INIT_SIMULATORINIT_H 23 #define OV_INIT_SIMULATORINIT_H 25 #include <Eigen/Eigen> 27 #include <opencv2/core/core.hpp> 31 #include <unordered_map> 71 bool ok() {
return is_running; }
85 bool get_state(
double desired_time, Eigen::Matrix<double, 17, 1> &imustate);
94 bool get_next_imu(
double &time_imu, Eigen::Vector3d &wm, Eigen::Vector3d &am);
103 bool get_next_cam(
double &time_cam, std::vector<int> &camids, std::vector<std::vector<std::pair<size_t, Eigen::VectorXf>>> &feats);
106 std::unordered_map<size_t, Eigen::Vector3d>
get_map() {
return featmap; }
120 std::vector<std::pair<size_t, Eigen::VectorXf>> project_pointcloud(
const Eigen::Matrix3d &R_GtoI,
const Eigen::Vector3d &p_IinG,
121 int camid,
const std::unordered_map<size_t, Eigen::Vector3d> &feats);
131 void generate_points(
const Eigen::Matrix3d &R_GtoI,
const Eigen::Vector3d &p_IinG,
int camid,
132 std::unordered_map<size_t, Eigen::Vector3d> &feats,
int numpts);
149 std::shared_ptr<ov_core::BsplineSE3>
spline;
153 std::unordered_map<size_t, Eigen::Vector3d>
featmap;
184 Eigen::Vector3d true_bias_accel = Eigen::Vector3d::Zero();
187 Eigen::Vector3d true_bias_gyro = Eigen::Vector3d::Zero();
197 #endif // OV_INIT_SIMULATORINIT_H
std::vector< double > hist_true_bias_time
std::vector< Eigen::Vector3d > hist_true_bias_accel
std::mt19937 gen_state_init
Mersenne twister PRNG for state initialization.
std::vector< Eigen::VectorXd > traj_data
Our loaded trajectory data (timestamp(s), q_GtoI, p_IinG)
std::unordered_map< size_t, Eigen::Vector3d > featmap
bool ok()
Returns if we are actively simulating.
double timestamp
Current timestamp of the system.
State initialization code.
std::unordered_map< size_t, Eigen::Vector3d > get_map()
Returns the true 3d map of features.
std::mt19937 gen_meas_imu
Mersenne twister PRNG for measurements (IMU)
InertialInitializerOptions params
True params (a copy of the parsed ones)
std::shared_ptr< ov_core::BsplineSE3 > spline
Our b-spline trajectory.
double timestamp_last_imu
Last time we had an IMU reading.
InertialInitializerOptions get_true_parameters()
Access function to get the true parameters (i.e. calibration and settings)
std::vector< Eigen::Vector3d > hist_true_bias_gyro
double current_timestamp()
Gets the timestamp we have simulated up too.
Master simulator class that generated visual-inertial measurements.
std::mt19937 gen_state_perturb
Mersenne twister PRNG for state perturbations.
std::vector< std::mt19937 > gen_meas_cams
Mersenne twister PRNG for measurements (CAMERAS)
bool is_running
If our simulation is running.
double timestamp_last_cam
Last time we had an CAMERA reading.
Struct which stores all options needed for state estimation.