8#ifndef HOLISTIC_FUSION_H
9#define HOLISTIC_FUSION_H
15#define ROS_QUEUE_SIZE 100
16#define REQUIRED_GNSS_NUM_NOT_JUMPED 20
17#define GNSS_COVARIANCE_VIOLATION_THRESHOLD 0.2
18#define GREEN_START "\033[92m"
19#define YELLOW_START "\033[33m"
20#define RED_START "\033[31m"
21#define COLOR_END "\033[0m"
36 void activateGlobalGraph(
const gtsam::Vector3& imuPosition,
const gtsam::Rot3& imuRotation,
const double measurementTime);
42 const UnaryMeasurement6D& odometryK,
43 const Eigen::Matrix<double, 6, 1>& poseBetweenNoise);
46 const Eigen::Vector3d& gnssCovarianceXYZ,
const bool attemptGraphSwitching,
47 const bool addedYawBefore);
73 const Eigen::Matrix3d& R_W_frame2);
80 std::vector<std::string>
graphNames_{
"globalGraph",
"fallbackGraph"};
void addDualGnssPositionMeasurement(const UnaryMeasurement3D &W_t_W_frame, const Eigen::Vector3d &lastPosition, const Eigen::Vector3d &gnssCovarianceXYZ, const bool attemptGraphSwitching, const bool addedYawBefore)
No return.
std::shared_ptr< std::map< gtsam::Key, double > > globalGraphKeysTimestampsMapBufferPtr_
void optimizeGraph_()
Worker functions / Updating the factor graph.
std::vector< std::string > graphNames_
Graph names.
bool globalGraphActiveFlag()
void activateGlobalGraph(const gtsam::Vector3 &imuPosition, const gtsam::Rot3 &imuRotation, const double measurementTime)
bool isGnssCovarianceViolated_(const Eigen::Vector3d &gnssCovarianceXYZ)
std::shared_ptr< std::map< gtsam::Key, double > > fallbackGraphKeysTimestampsMapBufferPtr_
void activateFallbackGraph()
HolisticFusionDualGraph()
std::shared_ptr< SafeNavState > addDualOdometryMeasurementAndReturnNavState(const UnaryMeasurement6D &odometryKm1, const UnaryMeasurement6D &odometryK, const Eigen::Matrix< double, 6, 1 > &poseBetweenNoise)
Return.
std::mutex activelyUsingActiveGraphMutex_
std::mutex swappingActiveGraphMutex_
std::shared_ptr< gtsam::PreintegratedCombinedMeasurements > activeImuBufferPreintegratorPtr_
std::shared_ptr< gtsam::IncrementalFixedLagSmoother > activeSmootherPtr_
Selector.
std::shared_ptr< GraphManager > graphMgrPtr_
Eigen::Vector3d W_t_W_Frame1_to_W_t_W_Frame2_(const Eigen::Vector3d &W_t_W_frame1, const std::string &frame1, const std::string &frame2, const Eigen::Matrix3d &R_W_frame2)
Utility functions / Geometric transformation to IMU in world frame.
bool fallbackGraphActiveFlag()
~HolisticFusionDualGraph()=default
std::shared_ptr< gtsam::Values > activeGraphValuesBufferPtr_
std::shared_ptr< std::map< gtsam::Key, double > > activeGraphKeysTimestampsMapBufferPtr_
std::shared_ptr< gtsam::NonlinearFactorGraph > activeFactorsBufferPtr_
HolisticFusion()
Constructor --------—.