-
Notifications
You must be signed in to change notification settings - Fork 58
/
state.py
39 lines (31 loc) · 914 Bytes
/
state.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
state.py
author: Keita Nagara 永良慶太 (University of Tokyo) <nagara.keita()gmail.com>
This class is called from "sensor.py" and "image.py", and estimate state variables.
This class is factory class. Model (state type & estimation model) is selected by argment.
"""
from state_coplanarity import StateCoplanarity
from state_RBPF import StateRBPF
from state_IMU_KF import StateIMUKF
from state_IMU_PF import StateIMUPF
class State:
def __init__(self):
pass
def getStateClass(self,stateType):
if(stateType=="Coplanarity"):
return StateCoplanarity()
elif(stateType=="RBPF"):
return StateRBPF()
elif(stateType=="IMUKF"):
return StateIMUKF()
elif(stateType=="IMUPF"):
state = StateIMUPF()
state.initWithType("IMUPF")
return state
elif(stateType=="IMUPF2"):
state = StateIMUPF()
state.initWithType("IMUPF2")
return state
else:
pass