sot-talos-balance  2.0.5
Collection of dynamic-graph entities aimed at implementing balance control on talos.
balance_ctrl_conf.py
Go to the documentation of this file.
1 from math import sqrt
2 
3 import numpy as np
4 
5 """ *********************** USER-PARAMETERS *********************** """
6 
7 COM_DES = (0.00, 0.0, 0.81)
8 
9 # CONTROLLER GAINS
10 NJ = 32
11 kp_posture = NJ * (100.0,)
12 # proportional gain of postural task
13 kd_posture = NJ * (0 * sqrt(kp_posture[0]),)
14 kp_pos = NJ * (0.0,)
15 # proportional gain of position controller
16 kd_pos = NJ * (0 * sqrt(kp_pos[0]),)
17 kp_constr = 0.0 * 1.0
18 # constraint proportional feedback gain
19 kd_constr = 0 * sqrt(kp_constr)
20 # constraint derivative feedback gain
21 kp_com = 0.0 * 30.0
22 kd_com = 0.0
23 kp_feet = 0.0 * 30.0
24 kd_feet = 0.0
25 kp_admittance = (0, 0, 0, 0.0 * 1, 0.0 * 1, 0.0)
26 ki_admittance = 6 * (0.0,)
27 constraint_mask = np.array([True, True, True, True, True, True]).T
28 ee_mask = np.array([True, True, True, True, True, True]).T
29 
30 # CONTROLLER WEIGTHS
31 w_com = 0.0 * 1.0
32 w_feet = 0.0 * 1.0
33 w_posture = 1e-3
34 # weight of postural task
35 w_forces = 0.0 * 1e-6
36 w_base_orientation = 0.0
37 w_torques = 0.0
38 
39 # CONTACT PARAMETERS
40 RIGHT_FOOT_SIZES = (0.100, -0.100, 0.060, -0.060)
41 # pos x, neg x, pos y, neg y size
42 LEFT_FOOT_SIZES = (0.100, -0.100, 0.060, -0.060)
43 # pos x, neg x, pos y, neg y size
44 
45 RIGHT_FOOT_CONTACT_POINTS = (
46  (
47  RIGHT_FOOT_SIZES[0],
48  RIGHT_FOOT_SIZES[0],
49  RIGHT_FOOT_SIZES[1],
50  RIGHT_FOOT_SIZES[1],
51  ),
52  (
53  RIGHT_FOOT_SIZES[3],
54  RIGHT_FOOT_SIZES[2],
55  RIGHT_FOOT_SIZES[3],
56  RIGHT_FOOT_SIZES[2],
57  ),
58  (-0.105, -0.105, -0.105, -0.105),
59 )
60 # contact points in local reference frame
61 
62 LEFT_FOOT_CONTACT_POINTS = np.matrix(
63  [
64  [LEFT_FOOT_SIZES[0], LEFT_FOOT_SIZES[3], -0.105],
65  [LEFT_FOOT_SIZES[0], LEFT_FOOT_SIZES[2], -0.105],
66  [LEFT_FOOT_SIZES[1], LEFT_FOOT_SIZES[3], -0.105],
67  [LEFT_FOOT_SIZES[1], LEFT_FOOT_SIZES[2], -0.105],
68  ]
69 ).T # contact points in local reference frame
70 FOOT_CONTACT_NORMAL = (0.0, 0.0, 1.0)
71 mu = np.array([0.3, 0.1])
72 # force and moment friction coefficient
73 fMin = 1.0
74 # minimum normal force
75 fMax = 1e3
76 # maximum normal force
77 
78 RF_FORCE_DES = (0, 0, 300, 0, 0, 0.0)
79 LF_FORCE_DES = (0, 0, 300, 0, 0, 0.0)