mars_lib 0.1.0.2abe2576fe7f
Modular and Robust Sensor-Fusion
Loading...
Searching...
No Matches
imu_sensor_class.h
Go to the documentation of this file.
1// Copyright (C) 2021 Christian Brommer, Control of Networked Systems, University of Klagenfurt, Austria.
2//
3// All rights reserved.
4//
5// This software is licensed under the terms of the BSD-2-Clause-License with
6// no commercial use allowed, the full terms of which are made available
7// in the LICENSE file. No license in patents is granted.
8//
9// You can contact the author at <christian.brommer@ieee.org>
10
11#ifndef IMU_SENSOR_CLASS_H
12#define IMU_SENSOR_CLASS_H
13
15#include <mars/time.h>
16#include <Eigen/Dense>
17#include <iostream>
18#include <string>
19
20namespace mars
21{
23{
24public:
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
26
27 ImuSensorClass(const std::string& name)
28 {
29 name_ = name;
30 std::cout << "Created: [" << this->name_ << "] Sensor" << std::endl;
31 }
32
33 virtual ~ImuSensorClass() = default;
34
35 Eigen::MatrixXd get_covariance(const std::shared_ptr<void>& /*sensor_data*/)
36 {
37 return {};
38 }
39
40 void set_initial_calib(std::shared_ptr<void> /*calibration*/)
41 {
42 }
43
44 BufferDataType Initialize(const Time& /*timestamp*/, std::shared_ptr<void> /*measurement*/,
45 std::shared_ptr<CoreType> /*latest_core_data*/)
46 {
47 return {};
48 }
49
50 bool CalcUpdate(const Time& /*timestamp*/, std::shared_ptr<void> /*measurement*/,
51 const CoreStateType& /*prior_core_state_data*/, std::shared_ptr<void> /*latest_sensor_data*/,
52 const Eigen::MatrixXd& /*prior_cov*/, BufferDataType* /*new_state_data*/)
53 {
54 return false;
55 }
56};
57} // namespace mars
58
59#endif // IMU_SENSOR_CLASS_H
The BufferDataType binds the core and sensor state in form of a shared void pointer.
Definition buffer_data_type.h:36
Definition core_state_type.h:21
Definition imu_sensor_class.h:23
void set_initial_calib(std::shared_ptr< void >)
set_initial_calib Sets the calibration of an individual sensor
Definition imu_sensor_class.h:40
BufferDataType Initialize(const Time &, std::shared_ptr< void >, std::shared_ptr< CoreType >)
Initialize the state of an individual sensor.
Definition imu_sensor_class.h:44
virtual ~ImuSensorClass()=default
bool CalcUpdate(const Time &, std::shared_ptr< void >, const CoreStateType &, std::shared_ptr< void >, const Eigen::MatrixXd &, BufferDataType *)
CalcUpdate Calculates the update for an individual sensor definition.
Definition imu_sensor_class.h:50
Eigen::MatrixXd get_covariance(const std::shared_ptr< void > &)
get_covariance Resolves a void pointer to the covariance matrix of the corresponding sensor type Each...
Definition imu_sensor_class.h:35
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ImuSensorClass(const std::string &name)
Definition imu_sensor_class.h:27
Definition sensor_abs_class.h:20
std::string name_
Name of the individual sensor instance.
Definition sensor_abs_class.h:23
Definition time.h:20
Definition buffer.h:27