Skip to content

Commit

Permalink
Move experimental methods to another branch, and update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Apr 29, 2024
1 parent 9a76d55 commit 3bbae88
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 275 deletions.
1 change: 0 additions & 1 deletion mola_relocalization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ mola_add_library(
TARGET ${PROJECT_NAME}
SOURCES
src/find_best_poses_se2.cpp
src/AlignBEV.cpp
src/RelocalizationICP_SE2.cpp
src/RelocalizationLikelihood_SE2.cpp
include/mola_relocalization/relocalization.h
Expand Down
24 changes: 23 additions & 1 deletion mola_relocalization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,29 @@ C++ library with algorithms for relocalization, global localization, or pose est

Note that particle filtering is implemented in its own repository under [mrpt_navigation](https://github.com/mrpt-ros-pkg/mrpt_navigation).

Example result for the `mola::Relocalization_SE2` method (from a unit test, see [the code](https://github.com/MOLAorg/mola/blob/develop/mola_relocalization/tests/test-relocalization-se2-kitti.cpp) for details):
## Method #1: mola::RelocalizationICP_SE2

Takes a global and a local metric map, a SE(2) ROI, and tries to match
the local map in the global map by running ICP from all initial guesses
defined by a regular SE(2) lattice, returning the result as a SE(3) hashed
lattice.

This method is based on [mp2p_icp ICP pipelines](https://docs.mola-slam.org/latest/module-mp2p-icp.html).

## Method #2: mola::RelocalizationLikelihood_SE2

Takes a global metric map, an observation, and a SE(2) ROI, and evaluates
the likelihood of the observation in a regular SE(2) lattice.

This is based on mrpt maps observationLikelihood() evaluation, so the main
parameters that determine the way likelihood is computed must be defined
on before hand within each of the metric map layers of the input reference
map.
At present this algorithm is useful for these sensor/map types:
- observations: pointclouds/2d_scan, reference_map: 2D gridmap
- observations: pointclouds, reference_map: pointclouds

Example result for the `mola::RelocalizationLikelihood_SE2` method (from a unit test, see [the code](https://github.com/MOLAorg/mola/blob/develop/mola_relocalization/tests/test-relocalization-se2-kitti.cpp) for details):

![mola_relocalize_figs](https://github.com/MOLAorg/mola/assets/5497818/6622739f-95ca-4e39-a770-d5f15c01adb3)

Expand Down
31 changes: 0 additions & 31 deletions mola_relocalization/include/mola_relocalization/relocalization.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,37 +147,6 @@ struct RelocalizationICP_SE2
static Output run(const Input& in);
};

/** Takes a global and a local point cloud maps, and builds a point cloud
* density "grid map image" from a bird-eye-view (BEV), then applies the
* grid-map align algorithm in mrpt::maps.
*
* \ingroup mola_relocalization_grp
*/
struct AlignBEV
{
struct Input
{
mp2p_icp::metric_map_t reference_map;
std::vector<std::string> ref_map_layers; //!< empty=all
mp2p_icp::metric_map_t local_map;
std::vector<std::string> local_map_layers; //!< empty=all

double resolution_xy = 0.40;

Input() = default;
};

struct Output
{
mola::HashedSetSE3 found_poses;
double time_cost = .0; //!< [s]

Output() = default;
};

static Output run(const Input& in);
};

/** Finds the SE(2) poses with the top given percentile likelihood, and returns
* them sorted by likelihood (higher values are better matches).
*
Expand Down
171 changes: 0 additions & 171 deletions mola_relocalization/src/AlignBEV.cpp

This file was deleted.

7 changes: 0 additions & 7 deletions mola_relocalization/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@ mola_add_test(
target_compile_definitions(test-relocalization-se2-kitti PRIVATE TEST_DATASETS_ROOT=\"${TEST_DATASETS_ROOT}\")
endif()


mola_add_test(
TARGET test-relocalization-align-bev
SOURCES test-relocalization-align-bev.cpp
LINK_LIBRARIES
mola::mola_relocalization
)
64 changes: 0 additions & 64 deletions mola_relocalization/tests/test-relocalization-align-bev.cpp

This file was deleted.

0 comments on commit 3bbae88

Please sign in to comment.