Skip to content

Commit

Permalink
mola_kernel: add C++ virtual interface for relocalization methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jul 29, 2024
1 parent a800be6 commit 68fc59a
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
45 changes: 45 additions & 0 deletions mola_kernel/include/mola_kernel/interfaces/Relocalization.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* -------------------------------------------------------------------------
* A Modular Optimization framework for Localization and mApping (MOLA)
* Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
* See LICENSE for license information.
* ------------------------------------------------------------------------- */
/**
* @file Relocalization.h
* @brief Virtual interface for relocalization offered by MOLA modules
* @author Jose Luis Blanco Claraco
* @date Jul 29, 2024
*/
#pragma once

#include <mrpt/poses/CPose3D.h>
#include <mrpt/poses/CPose3DPDFGaussian.h>

namespace mola
{
/** Virtual interface for relocalization offered by MOLA modules
* \ingroup mola_kernel_grp */
class Relocalization
{
public:
Relocalization();
virtual ~Relocalization();

/** @name Virtual interface of Relocalization
*{ */

/** Re-localize near this pose, including uncetainty.
* \param[in] pose The pose, in the local map frame.
* There is no return value from this method.
*/
virtual void relocalize_near_pose_pdf(
const mrpt::poses::CPose3DPDFGaussian& p) = 0;

/** Re-localize with the next incoming GNSS message.
* There is no return value from this method.
*/
virtual void relocalize_from_gnss() = 0;

/** @} */
};

} // namespace mola
19 changes: 19 additions & 0 deletions mola_kernel/src/interfaces/Relocalization.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* -------------------------------------------------------------------------
* A Modular Optimization framework for Localization and mApping (MOLA)
* Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
* See LICENSE for license information.
* ------------------------------------------------------------------------- */
/**
* @file Relocalization.cpp
* @brief Virtual interface for relocalization offered by MOLA modules
* @author Jose Luis Blanco Claraco
* @date Jul 29, 2024
*/

#include <mola_kernel/interfaces/Relocalization.h>

namespace mola
{
Relocalization::Relocalization() = default;
Relocalization::~Relocalization() = default;
} // namespace mola

0 comments on commit 68fc59a

Please sign in to comment.