My Project
1.0
Holistic Fusion: A Generic Framework for Multimodal Sensor Fusion
Loading...
Searching...
No Matches
DynamicDictionaryContainer.h
Go to the documentation of this file.
1
/*
2
Copyright 2024 by Julian Nubert, Robotic Systems Lab, ETH Zurich.
3
All rights reserved.
4
This file is released under the "BSD-3-Clause License".
5
Please see the LICENSE file that has been included as part of this package.
6
*/
7
8
// GTSAM
9
#include <gtsam/geometry/Point3.h>
10
#include <gtsam/geometry/Pose3.h>
11
12
// Workspace
13
#include "
holistic_fusion/core/DynamicTransformDictionary.h
"
14
15
#ifndef DYNAMIC_DICTIONARY_CONTAINER_H
16
#define DYNAMIC_DICTIONARY_CONTAINER_H
17
18
namespace
holistic_fusion
{
19
20
class
DynamicDictionaryContainer
{
21
public
:
22
DynamicDictionaryContainer
() =
default
;
23
~DynamicDictionaryContainer
() =
default
;
24
25
// Get the right dictionary based on template type
26
template
<
class
GTSAM_DYNAMIC_STATE_TYPE>
27
DynamicTransformDictionary<GTSAM_DYNAMIC_STATE_TYPE>
&
get
() {
28
constexpr
bool
isPose3 = std::is_same<GTSAM_DYNAMIC_STATE_TYPE, gtsam::Pose3>::value;
29
constexpr
bool
isPoint3 = std::is_same<GTSAM_DYNAMIC_STATE_TYPE, gtsam::Point3>::value;
30
static_assert
(isPose3 || isPoint3,
"Type not supported."
);
31
// Return correct dictionary
32
// Pose3
33
if
constexpr
(isPose3) {
34
return
gtsamPose3ExpressionKeys_
;
35
}
36
// Point3
37
else
if
constexpr
(isPoint3) {
38
return
gtsamPoint3ExpressionKeys_
;
39
}
40
}
41
42
private
:
43
DynamicTransformDictionary<gtsam::Pose3>
gtsamPose3ExpressionKeys_
;
44
DynamicTransformDictionary<gtsam::Point3>
gtsamPoint3ExpressionKeys_
;
45
};
46
47
}
// namespace holistic_fusion
48
49
#endif
// HOLISTIC_FUSION_CLION_DYNAMICDICTIONARYCONTAINER_H
DynamicTransformDictionary.h
holistic_fusion::DynamicDictionaryContainer::DynamicDictionaryContainer
DynamicDictionaryContainer()=default
holistic_fusion::DynamicDictionaryContainer::gtsamPoint3ExpressionKeys_
DynamicTransformDictionary< gtsam::Point3 > gtsamPoint3ExpressionKeys_
Definition
DynamicDictionaryContainer.h:44
holistic_fusion::DynamicDictionaryContainer::gtsamPose3ExpressionKeys_
DynamicTransformDictionary< gtsam::Pose3 > gtsamPose3ExpressionKeys_
Definition
DynamicDictionaryContainer.h:43
holistic_fusion::DynamicDictionaryContainer::~DynamicDictionaryContainer
~DynamicDictionaryContainer()=default
holistic_fusion::DynamicDictionaryContainer::get
DynamicTransformDictionary< GTSAM_DYNAMIC_STATE_TYPE > & get()
Definition
DynamicDictionaryContainer.h:27
holistic_fusion::DynamicTransformDictionary
Definition
DynamicTransformDictionary.h:33
holistic_fusion
Absolute.
Definition
AdmissibleGtsamSymbols.h:11
holistic_fusion
include
holistic_fusion
core
DynamicDictionaryContainer.h
Generated by
1.15.0