My Project 1.0
Holistic Fusion: A Generic Framework for Multimodal Sensor Fusion
Loading...
Searching...
No Matches
GmsfUnaryExpressionLocal.h
Go to the documentation of this file.
1/*
2Copyright 2024 by Julian Nubert, Robotic Systems Lab, ETH Zurich.
3All rights reserved.
4This file is released under the "BSD-3-Clause License".
5Please see the LICENSE file that has been included as part of this package.
6 */
7
8#ifndef GMSF_UNARY_EXPRESSION_LOCAL_H
9#define GMSF_UNARY_EXPRESSION_LOCAL_H
10
11// GTSAM
12#include <gtsam/base/types.h>
13
14// Workspace
17
18namespace holistic_fusion {
19
20template <class GTSAM_MEASUREMENT_TYPE, char CALIBRATION_CHAR>
21class GmsfUnaryExpressionLocal : public GmsfUnaryExpression<GTSAM_MEASUREMENT_TYPE, UnaryExpressionType::Local, CALIBRATION_CHAR> {
22 public:
23 // Constructor
24 GmsfUnaryExpressionLocal(const std::shared_ptr<UnaryMeasurement>& baseUnaryAbsoluteMeasurementPtr, const std::string& imuFrameName,
25 const Eigen::Isometry3d& T_I_sensorFrame)
26 : GmsfUnaryExpression<GTSAM_MEASUREMENT_TYPE, UnaryExpressionType::Local, CALIBRATION_CHAR>(baseUnaryAbsoluteMeasurementPtr,
27 imuFrameName, T_I_sensorFrame) {}
28
29 // Destructor
31
32 protected:
33 // Virtual Methods
34 // ii.A) Holistically Optimize over Fixed Frames
36 const gtsam::NavState& W_currentPropagatedState,
37 const bool centerMeasurementsAtKeyframePositionBeforeAlignmentFlag) final {
38 // Do nothing as this velocity measurement is purely local
39 throw std::logic_error("GmsfUnaryExpressionLocal: transformStateFromWorldToFixedFrame not implemented, as it is a local measurement.");
40 }
41
42 // ii.B) Adding Landmark State in Dynamic Memory
44 const gtsam::NavState& W_currentPropagatedState) final {
45 // Raise runtime error, as it is not a landmark measurement
46 throw std::logic_error(
47 "GmsfUnaryExpressionLocal: convertRobotAndLandmarkStatesToMeasurement not implemented, as it is not a landmark "
48 "measurement.");
49 }
50};
51
52} // namespace holistic_fusion
53
54#endif // GMSF_UNARY_EXPRESSION_LOCAL_H
GmsfUnaryExpressionLocal(const std::shared_ptr< UnaryMeasurement > &baseUnaryAbsoluteMeasurementPtr, const std::string &imuFrameName, const Eigen::Isometry3d &T_I_sensorFrame)
void transformImuStateFromWorldToReferenceFrame(DynamicDictionaryContainer &gtsamDynamicExpressionKeys, const gtsam::NavState &W_currentPropagatedState, const bool centerMeasurementsAtKeyframePositionBeforeAlignmentFlag) final
void transformLandmarkInWorldToImuFrame(DynamicDictionaryContainer &gtsamDynamicExpressionKeys, const gtsam::NavState &W_currentPropagatedState) final
GmsfUnaryExpression(const std::shared_ptr< UnaryMeasurement > &gmsfBaseUnaryMeasurementPtr, const std::string &imuFrameName, const Eigen::Isometry3d &T_I_sensorFrame)