3#include <gtsam/geometry/Pose2.h>
4#include <gtsam/inference/Symbol.h>
5#include <gtsam/nonlinear/NonlinearFactorGraph.h>
6#include <gtsam/nonlinear/Values.h>
39 std::shared_ptr<OdometryModel>
41 std::queue<MotionData>
43 std::queue<ObservationData>
46 mutable std::shared_mutex
55 rclcpp::CallbackGroup::SharedPtr
77 const std::shared_ptr<GraphSLAMInstance> graph_slam_instance,
78 bool force_update =
false);
92 std::shared_ptr<DataAssociationModel> data_association,
93 std::shared_ptr<V2PMotionModel> motion_model,
94 std::shared_ptr<LandmarkFilter> landmark_filter,
95 std::shared_ptr<std::vector<double>> execution_times,
96 std::shared_ptr<LoopClosure> loop_closure);
107 void init(std::weak_ptr<rclcpp::Node> node)
override;
138 void add_observations(
const std::vector<common_lib::structures::Cone>& cones,
139 rclcpp::Time cones_timestamp)
override;
148 void load_initial_state(
const Eigen::VectorXd& map,
const Eigen::Vector3d& pose)
override;
std::shared_mutex _mutex_
friend class GraphSlamSolverTest_MotionAndObservation_Test
Eigen::VectorXd get_observations_global() const override
~GraphSLAMSolver()=default
bool _optimization_under_way_
Eigen::VectorXd _observations_global_
std::shared_ptr< GraphSLAMInstance > _graph_slam_instance_
void add_odometry(const common_lib::structures::Pose &pose_difference) override
Add odometry data to the solver (for prediction step)
void add_imu_data(const common_lib::sensor_data::ImuData &imu_data) override
Add IMU data to the solver.
void _asynchronous_optimization_routine()
Asynchronous optimization routine.
bool _add_motion_data_to_graph(const std::shared_ptr< PoseUpdater > pose_updater, const std::shared_ptr< GraphSLAMInstance > graph_slam_instance, bool force_update=false)
Adds motion data to the graph if the pose updater is ready.
void add_velocities(const common_lib::structures::Velocities &velocities) override
Process new velocities data (prediction step)
std::shared_ptr< OdometryModel > _odometry_model
void init(std::weak_ptr< rclcpp::Node > node) override
Initialize the SLAM solver.
int get_lap_counter() override
Get the lap counter.
rclcpp::CallbackGroup::SharedPtr _reentrant_group_
void add_observations(const std::vector< common_lib::structures::Cone > &cones, rclcpp::Time cones_timestamp) override
Add observations to the solver (correction step)
rclcpp::TimerBase::SharedPtr _optimization_timer_
std::vector< common_lib::structures::Cone > get_map_estimate() override
Get the map estimate object.
void load_initial_state(const Eigen::VectorXd &map, const Eigen::Vector3d &pose) override
Initialize the graph SLAM solver with a previously saved map and pose.
common_lib::structures::Pose get_pose_estimate() override
Get the pose estimate object.
Eigen::VectorXi _associations_
Eigen::VectorXd get_map_coordinates() const override
std::queue< MotionData > _motion_data_queue_
std::shared_ptr< PoseUpdater > _pose_updater_
Eigen::MatrixXd get_covariance() override
Get the covariance matrix of the graph.
Eigen::VectorXd _map_coordinates_
std::queue< ObservationData > _observation_data_queue_
common_lib::sensor_data::ImuData _last_imu_data_
std::vector< common_lib::structures::Pose > get_trajectory_estimate() override
Get the trajectory estimate of the car (all poses)
Eigen::VectorXi get_associations() const override
Trait class for IMU integration in SLAM solvers.
Trait class for node control in SLAM solvers.
Trait class for odometry integration in SLAM solvers.
Interface for SLAM solvers.
Trait class for trajectory calculation in SLAM solvers.
Trait class for velocities integration in SLAM solvers.
Parameters for the SLAM node.
Struct for pose representation.