-
Notifications
You must be signed in to change notification settings - Fork 0
/
CV2D_mm.py
99 lines (73 loc) · 2.66 KB
/
CV2D_mm.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import torch
import src.parameters as params
T = params.T_cv
T_dec = T*params.ratio_cv
q = params.q_cv
#######################
### DATA GENERATION ###
#######################
F_gen = torch.tensor([[1, T, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, T],
[0, 0, 0, 1]]).float()
Q_gen = torch.tensor([[0, 0, 0, 0],
[0, 0, 0 ,0],
[0, 0, 0, 0],
[0, 0, 0, 0]]).float()
H_gen = torch.tensor([[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]]).float()
R_gen = torch.tensor([[0, 0, 0, 0],
[0, 0, 0 ,0],
[0, 0, 0, 0],
[0, 0, 0, 0]]).float()
########################
### FULL OBSERVATION ###
########################
F_FO = torch.tensor([[1, T_dec, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, T_dec],
[0, 0, 0, 1]]).float()
Q_FO = torch.tensor([[T_dec**3/3, T_dec**2/2, 0, 0],
[T_dec**2/2, T_dec, 0, 0],
[0, 0, T_dec**3/3, T_dec**2/2],
[0, 0, T_dec**2/2, T_dec]]).float()
H_FO = torch.tensor([[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]]).float()
R_FO = torch.tensor([[1, 0, 0 ,0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]]).float()
#######################
### POS OBSERVATION ###
#######################
F_PO = torch.tensor([[1, T_dec, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, T_dec],
[0, 0, 0, 1]]).float()
Q_PO = torch.tensor([[T_dec**3/3, T_dec**2/2, 0, 0],
[T_dec**2/2, T_dec, 0, 0],
[0, 0, T_dec**3/3, T_dec**2/2],
[0, 0, T_dec**2/2, T_dec]]).float()
H_PO = torch.tensor([[1, 0, 0, 0],
[0, 0, 1, 0]]).float()
R_PO = torch.tensor([[1, 0],
[0, 1]]).float()
#######################
### VEL OBSERVATION ###
#######################
F_VO = torch.tensor([[1, T_dec, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, T_dec],
[0, 0, 0, 1]]).float()
Q_VO = torch.tensor([[T_dec**3/3, T_dec**2/2, 0, 0],
[T_dec**2/2, T_dec, 0, 0],
[0, 0, T_dec**3/3, T_dec**2/2],
[0, 0, T_dec**2/2, T_dec]]).float()
H_VO = torch.tensor([[0, 1, 0, 0],
[0, 0, 0, 1]]).float()
R_VO = torch.tensor([[0.001, 0],
[0, 0.001]]).float()