Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
double_pose_updater.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Dense>
4#include <utility>
5
9
15 false; //< Flag to check if the first velocities have been received
16 bool _received_first_odometry_ = false; //< Flag to check if the first odometry has been received
17
19 rclcpp::Time(0);
20
22 Eigen::Vector3d::Zero();
23
24 Eigen::Vector3d _last_odometry_pose_ = Eigen::Vector3d::Zero(); //< Last odometry pose
25
26public:
27 explicit DoublePoseUpdater(const SLAMParameters& params);
28
30
32
33 std::shared_ptr<PoseUpdater> clone() const override {
34 return std::make_shared<DoublePoseUpdater>(*this);
35 }
36
43 void predict_pose(const MotionData& motion_data,
44 std::shared_ptr<V2PMotionModel> motion_model) override;
45
46 Eigen::Vector3d get_second_accumulated_pose_difference() const override;
47
48 bool second_pose_difference_ready() const override;
49};
Class to update the pose of the vehicle, including a method to check if the pose is ready for graph u...
TODO: abandoned for now, not working properly.
bool second_pose_difference_ready() const override
Check if the second pose difference is ready.
rclcpp::Time _last_velocities_receive_time_
Last pose update timestamp for velocities.
Eigen::Vector3d _accumulated_odometry_pose_difference_
Accumulated odometry pose difference since the last pose update.
void predict_pose(const MotionData &motion_data, std::shared_ptr< V2PMotionModel > motion_model) override
Updates the last pose and returns the pose difference.
DoublePoseUpdater & operator=(const DoublePoseUpdater &other)
std::shared_ptr< PoseUpdater > clone() const override
Clone the pose updater.
Eigen::Vector3d get_second_accumulated_pose_difference() const override
Get the accumulated pose difference from the second source.
Eigen::Vector3d _last_odometry_pose_
Trait for pose updaters that keep two different pose difference estimates from different sources.
Data structure to hold motion data.
Parameters for the SLAM node.