Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
lap_counter.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "loop_closure.hpp"
4
9class LapCounter : public LoopClosure {
10public:
17 LapCounter(double threshold_dist, int first_x_cones, int border_width, int minimum_confidence);
18
29 Result detect(const Eigen::Vector3d& current_pose, const Eigen::VectorXd& map_cones,
30 const Eigen::VectorXi& associations,
31 const Eigen::VectorXd& observations) const override;
32
33private:
34 double threshold_dist_; // TODO: make this const or create parameters struct
38 mutable bool searching_{false};
39};
Implementation of LoopClosure that detects when the robot returns near the origin and re‑observes any...
double threshold_dist_
Result detect(const Eigen::Vector3d &current_pose, const Eigen::VectorXd &map_cones, const Eigen::VectorXi &associations, const Eigen::VectorXd &observations) const override
Detects loop closure when returning to origin and seeing initial cones.
int minimum_confidence_
Interface for detecting loop closures.
Result of loop closure detection.