-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.m
62 lines (50 loc) · 1.43 KB
/
init.m
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
%% init.m
% *Summary:* Defines parameters necessary for the unity simulation
%
% -----------
%
% Editor:
% OMAINSKA Marco - Doctoral Student, Cybernetics
% Supervisor:
% YAMAUCHI Junya - Assistant Professor
%
% Property of: Fujita-Yamauchi Lab, University of Tokyo, 2021
% e-mail: [email protected]
% Website: https://www.scl.ipc.i.u-tokyo.ac.jp
% January 2022
%
% ------------- BEGIN CODE -------------
% Note:
% It is assumed that you have already started the ROS Docker container, and
% that MATLAB can already send & receive ROS messages
% rosinit('docker-ros',11311,'NodeHost','192.168.255.6')
%% Parameters
% vpc gains
Ke = 17*eye(6); % estimation gain
Kc = 10*eye(6); % control gain
% desired pose
gd = [eye(4,3),[0 2 0 1]'];
% initial conditions
gco_init = mergepose(eye(3),[0 2 0]);
% focal length
lambda = 20;
% feature points
fp = [ 0, 0, 0.5;
0.5, 0, 0;
0, 0, -0.5;
-0.5, 0, 0];
% ROS message frequency [Hz]
ros_freq = 50;
% load GP models
load('data/GP_1')
load('data/GP_2')
load('data/GP_full')
% calculate maximum var norms
alpha = [0 1 0 0 0 0];
[~, cov1] = gp_calc([100 100 100 100 100 100], X1, Y1, @SEARD, sn1, hyp1);
[~, cov2] = gp_calc([100 100 100 100 100 100], X2, Y2, @SEARD, sn2, hyp2);
var_max = [norm(alpha*diag(cov1),2), norm(alpha*diag(cov2),2)];
% set switching constant
T = 0.05;