|
31 | 31 |
|
32 | 32 | #include "odometry_with_covariance.hpp" |
33 | 33 | #include "odometry.hpp" |
| 34 | +#include "point.hpp" |
34 | 35 | #include "glider/utils/parameters.hpp" |
35 | 36 | #include "glider/utils/time.hpp" |
36 | 37 |
|
@@ -92,8 +93,19 @@ class FactorManager |
92 | 93 | * @param gyro: gyroscopre reading |
93 | 94 | * @param orient: orientation in quaternion (w,x,y,z) format */ |
94 | 95 | void addImuFactor(int64_t timestamp, const Eigen::Vector3d& accel, const Eigen::Vector3d& gyro, const Eigen::Vector4d& orient); |
| 96 | + /*! @brief adds a landmark factor for an estimated utm point and covariance |
| 97 | + * @param timestamp: time of the landmark measurements |
| 98 | + * @param landmark_id: a unique id for the landmark |
| 99 | + * @param utm: the estimated utm coordinate of the landmark |
| 100 | + * @param cov: the 3x3 covariance matrix for the estimated utm coordinate of the landmark */ |
| 101 | + void addLandmarkFactor(int64_t timestamp, size_t landmark_id, const Eigen::Vector3d& utm, const Eigen::Matrix3d& cov); |
| 102 | + |
95 | 103 |
|
96 | 104 | // getters and checkers |
| 105 | + /*! @brief gets the estimated landmark utm coordinate and covariance |
| 106 | + * @param landmark_id: the uinque id for the landmark |
| 107 | + * @return the estimated utm point and covariance */ |
| 108 | + PointWithCovariance getLandmarkPoint(size_t landmark_id) const; |
97 | 109 | /*! @brief gets the complete factor graph */ |
98 | 110 | gtsam::ExpressionFactorGraph getGraph(); |
99 | 111 | /*! @brief checks if the imu has been initialized |
@@ -210,5 +222,9 @@ class FactorManager |
210 | 222 | bool imu_initialized_; |
211 | 223 | // @param tracks if a gps measurement has been received |
212 | 224 | bool gps_initialized_; |
| 225 | + |
| 226 | + // landmark variables |
| 227 | + std::unordered_map<size_t, Eigen::Matrix3d> landmark_info_; |
| 228 | + std::unordered_map<size_t, Eigen::Vector3d> landmark_info_vec_; |
213 | 229 | }; |
214 | 230 | } |
0 commit comments