Program Listing for File Entity.h

Return to documentation for file (include/mola_kernel/Entity.h)

/* -------------------------------------------------------------------------
 *   A Modular Optimization framework for Localization and mApping  (MOLA)
 * Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
 * See LICENSE for license information.
 * ------------------------------------------------------------------------- */
#pragma once

#include <mola_kernel/entities/entities-common.h>
#include <mrpt/math/TPose3D.h>

#include <array>
#include <variant>

namespace mola
{
using Entity = std::variant<
    std::monostate, RefPose3, RelPose3, RelPose3KF, RelDynPose3KF,
    LandmarkPoint3, EntityOther>;

EntityBase& entity_get_base(Entity& e);
const EntityBase& entity_get_base(const Entity& e);

mrpt::math::TPose3D  entity_get_pose(const Entity& e);
mrpt::math::TTwist3D entity_get_twist(const mola::Entity& e);
void entity_update_pose(Entity& e, const mrpt::math::TPose3D& p);
void entity_update_vel(Entity& e, const std::array<double, 3>& v);
mrpt::Clock::time_point entity_get_timestamp(const Entity& e);

}  // namespace mola