Implementation of LoopClosure that detects when the robot returns near the origin and re‑observes any of the first X cones from the map.
More...
#include <lap_counter.hpp>
|
| | LapCounter (double threshold_dist, int first_x_cones, int border_width, int minimum_confidence) |
| |
| Result | detect (const Eigen::Vector3d ¤t_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.
|
| |
| virtual | ~LoopClosure ()=default |
| |
Implementation of LoopClosure that detects when the robot returns near the origin and re‑observes any of the first X cones from the map.
Definition at line 9 of file lap_counter.hpp.
◆ LapCounter()
| LapCounter::LapCounter |
( |
double |
threshold_dist, |
|
|
int |
first_x_cones, |
|
|
int |
border_width, |
|
|
int |
minimum_confidence |
|
) |
| |
- Parameters
-
| threshold_dist | distance (m) around origin to trigger closure |
| first_x_cones | consider a loop if you see any of these first X cones |
| border_width | distance to givve to start searching for loop closure again |
| minimum_confidence | minimum number of observations to confirm loop closure |
Definition at line 5 of file lap_counter.cpp.
◆ detect()
| LoopClosure::Result LapCounter::detect |
( |
const Eigen::Vector3d & |
current_pose, |
|
|
const Eigen::VectorXd & |
map_cones, |
|
|
const Eigen::VectorXi & |
associations, |
|
|
const Eigen::VectorXd & |
observations |
|
) |
| const |
|
overridevirtual |
Detects loop closure when returning to origin and seeing initial cones.
- Parameters
-
| current_pose | your latest pose in world frame |
| map_cones | full map of cones (in insertion order) |
| associations | one entry per observation: >=3 → matched map_cones[(j-3)/2] -1 → new landmark, -2 → no match |
| observations | raw observations (unused in this implementation) |
- Returns
- {true,0.0} once you re‑see any of map_cones[0..X-1]
Implements LoopClosure.
Definition at line 13 of file lap_counter.cpp.
◆ border_width_
| int LapCounter::border_width_ |
|
private |
◆ first_x_cones_
| int LapCounter::first_x_cones_ |
|
private |
◆ minimum_confidence_
| int LapCounter::minimum_confidence_ |
|
private |
◆ searching_
| bool LapCounter::searching_ {false} |
|
mutableprivate |
◆ threshold_dist_
| double LapCounter::threshold_dist_ |
|
private |
The documentation for this class was generated from the following files: