Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
difference_based_ready_pose_updater.cpp
Go to the documentation of this file.
2
4
9
15
17
20 if (this == &other) return *this; // Prevent self-assignment
21
22 // Copy each member individually
23 PoseUpdater::operator=(other); // Call base class assignment operator
25
26 return *this;
27}
28
29std::shared_ptr<PoseUpdater> DifferenceBasedReadyPoseUpdater::clone() const {
30 return std::make_shared<DifferenceBasedReadyPoseUpdater>(*this);
31}
32
34 Eigen::Vector3d pose_difference =
36 double pose_difference_norm =
37 ::sqrt(pow(pose_difference(0), 2) + pow(pose_difference(1), 2) + pow(pose_difference(2), 2));
38 return pose_difference_norm >= this->minimum_pose_difference_;
39}
Class to update the pose of the vehicle, including a method to check if the pose is ready for graph u...
DifferenceBasedReadyPoseUpdater & operator=(const DifferenceBasedReadyPoseUpdater &other)
DifferenceBasedReadyPoseUpdater(const SLAMParameters &params)
virtual bool pose_ready_for_graph_update() const override
Check if the accumulated pose difference is greater than the minimum threshold.
virtual std::shared_ptr< PoseUpdater > clone() const override
Clone the pose updater.
Class to update the pose of the vehicle.
Eigen::Vector3d _last_graphed_pose_
PoseUpdater & operator=(const PoseUpdater &other)
Eigen::Vector3d _last_pose_
Eigen::Vector3d pose_difference_eigen(const Eigen::Vector3d &pose1, const Eigen::Vector3d &pose2)
Definition utils.cpp:11
Parameters for the SLAM node.
double slam_min_pose_difference_