Skip to content
Snippets Groups Projects

Resolve "Subscriber&processor for landmark external detections"

Files
35
//--------LICENSE_START--------
//
// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
// Authors: Joan Solà Ortega (jsola@iri.upc.edu)
// All rights reserved.
//
// This file is part of WOLF
// WOLF is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//--------LICENSE_END--------
#pragma once
//Wolf includes
#include "core/capture/capture_base.h"
namespace wolf {
struct LandmarkDetection
{
int id; // id of landmark
Eigen::VectorXd measure; // either pose or position
Eigen::MatrixXd covariance; // covariance of the measure
double quality; // [0, 1] quality of the detection
};
WOLF_PTR_TYPEDEFS(CaptureLandmarksExternal);
//class CaptureLandmarksExternal
class CaptureLandmarksExternal : public CaptureBase
{
protected:
std::vector<LandmarkDetection> detections_;
public:
CaptureLandmarksExternal(const TimeStamp& _ts,
SensorBasePtr _sensor_ptr,
const std::vector<int>& _ids = {},
const std::vector<Eigen::VectorXd>& _detections = {},
const std::vector<Eigen::MatrixXd>& _covs = {},
const std::vector<double>& _qualities = {});
~CaptureLandmarksExternal() override;
std::vector<LandmarkDetection> getDetections() const {return detections_;};
void addDetection(const int& _id, const Eigen::VectorXd& _detection, const Eigen::MatrixXd& _cov, const double& quality);
};
} //namespace wolf
\ No newline at end of file
Loading