-
Notifications
You must be signed in to change notification settings - Fork 1
/
robotParameters.asv
103 lines (75 loc) · 2.11 KB
/
robotParameters.asv
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
94
95
96
97
98
99
100
101
102
103
%% robotParameters
% First version
% ground = [20 2 0.1]; % [m]
% z_offset = 0.4; % [m]
% body_dim = [0.46 0.22 0.06]; % [m]
% body_mass = 2.0; % [kg]
% Equal Unitree A1 Feb 22
ground = [20 2 0.1]; % [m]
z_offset = 0.4; % [m]
% body_dim = [0.267 0.194 0.114]; % [m]
% body_mass = 6.0; % [kg]
% femur_length = 0.15; % [m]
% tibia_length = 0.15; % [m]
%% Model Robot Unitree A1 March 6 2022
body_dim = [0.267 0.194 0.114]; % [m]
body_mass = 6.0; % [kg]
femur_length = 0.2; % [m]
femur_width = 0.0245;
femur_height = 0.034;
femur_mass = 0.888; %[kg]
femParam = [femur_length femur_width femur_height femur_mass];
tibia_length = 0.2; % [m]
tibia_width = 0.016;
tibia_height = 0.016;
tibia_mass = 0.151; %[kg]
tibParam = [tibia_length tibia_width tibia_height tibia_mass];
hip_radius = 0.046;
hip_length = 0.04;
hip_mass = 0.595;
hip_offset = 0.065;
leg_offset_x = 0.1805;
leg_offset_y = 0.047;
foot_mass = 0.06;
offset_RF = [leg_offset_x, -leg_offset_y, body_dim(3)/2];
offset_LF = [leg_offset_x, leg_offset_y, body_dim(3)/2];
offset_RR = [-leg_offset_x, -leg_offset_y, body_dim(3)/2];
offset_LR = [-leg_offset_x, leg_offset_y, body_dim(3)/2];
%% Motor Parameters Unitree A1 20 march 2022
PWM_freq = 4000; % [Hz]
max_torque = 33.5; % [V] Scaling PWM 100
m_voltage = 36; % [V] Output PWM
arm_resistance = 4.1730; %[Ohm]
arm_inductance = 250e-6; % [H]
torque_c = 0.8372; %[N*m/A]
rotor_inertia = 72e-6;
rotor_damping = 0.09;
g_ratio = 1.5;%10.3;
%% Spine parameters
spine_eq_pos = 0; %[rad] equlibrium position spine
spine_stiffness = 0; % [Hm/rad] spine joing spring stifness
spine_damping = 0; % [Hm/(rad/s)] spine joint damphing coefficient
% Bounds [rad]
spine_pos_low_limit = pi/
spine_pos_up_limit
%% Contact
sp_rad = 0.02;
pl_x = ground(1);
pl_y = ground(2);
pdepth = 0.03;
cntstiff = 1e5;
cntdmp = 1e5;
staticFriction = 1;
dynamicFriction = 0.9;
%%
world_damping = 20; % Translational damping
world_rot_damping = 10; % Rotational damping
tsTraj = 0.01;
%% Control legs
k_p_fem = 185.2563; % 80;
k_d_fem = 0.0977; % 1;
k_i_fem = 350;
k_p_tib = 185.2563; % 80;
k_d_tib = 0.0977; % 1;
k_i_tib = 275;
% max_torque = 100;