Skip to content

Commit 4313ad6

Browse files
authored
Feature/owdy rl (#43)
* action * wip * ddpg * measurement logger * measurement binding * wip * replicate ekf in python * run through the data * automate the procedure * fix logging * run * timestamp fix? * fix timestamps * fix bindings * training * wip * more wip * progress * nis on contact * wip * fix pendulum * wip * add ppo * still no rl * ppo still doesn't work * ppo works * nitpick * log gt to mcap * use the gt in train * wip * one agent per end-effector * on python api * fix copy * full serow bindings * fix serow python bindings * wip * train run * wip * train/evaluate loop ok * on training * deterministic train/evaluate * almost there * wip in dynamic state initialization * refactoring * maybe it's the same? * revert conf * log joint state * add joint state read * running * on RL * fix training * open pr
1 parent 0e651ad commit 4313ad6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+6431
-703
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ serow_layout.json:Zone.Identifier
1414
/python/serow/__pycache__/
1515
/python/build/
1616
/python/serow.egg-info/
17-
/python/serow/contact_ekf.cpython-310-x86_64-linux-gnu.so
18-
/python/serow/state.cpython-310-x86_64-linux-gnu.so
17+
/python/serow/serow.*.so
18+
/python/serow/policy/*

config/a1.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,7 @@
225225
"T_base_to_odom": null,
226226
"enable_terrain_estimation": true,
227227
"terrain_estimator": "fast",
228-
"minimum_terrain_height_variance": 1e-3
229-
}
228+
"minimum_terrain_height_variance": 1e-3,
229+
"T_base_to_ground_truth": null,
230+
"log_dir": "/tmp/"
231+
}

config/anymal_b.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,7 @@
225225
"T_base_to_odom": null,
226226
"enable_terrain_estimation": true,
227227
"terrain_estimator": "naive",
228-
"minimum_terrain_height_variance": 1e-3
229-
}
228+
"minimum_terrain_height_variance": 1e-3,
229+
"T_base_to_ground_truth": null,
230+
"log_dir": "/tmp/"
231+
}

config/estimation.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,5 +316,10 @@
316316
"terrain_estimator": "fast",
317317
// double: minimum terrain measurement uncertainty (m^2)
318318
// Only applies if enable_terrain_estimation = true
319-
"minimum_terrain_height_variance": 1e-3
319+
"minimum_terrain_height_variance": 1e-3,
320+
// array: rigid body transformation from base frame to ground truth frame. Can be null if no
321+
// ground truth is provided
322+
"T_base_to_ground_truth": null,
323+
// string: directory to save the log files
324+
"log_dir": "/tmp/"
320325
}

config/go1.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,7 @@
225225
"T_base_to_odom": null,
226226
"enable_terrain_estimation": false,
227227
"terrain_estimator": "fast",
228-
"minimum_terrain_height_variance": 1e-3
229-
}
228+
"minimum_terrain_height_variance": 1e-3,
229+
"T_base_to_ground_truth": null,
230+
"log_dir": "/tmp/"
231+
}

config/go2.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,5 +225,24 @@
225225
"T_base_to_odom": null,
226226
"enable_terrain_estimation": true,
227227
"terrain_estimator": "fast",
228-
"minimum_terrain_height_variance": 1e-3
229-
}
228+
"minimum_terrain_height_variance": 1e-3,
229+
"T_base_to_ground_truth": [
230+
1.0,
231+
0.0,
232+
0.0,
233+
-0.03270961,
234+
0.0,
235+
1.0,
236+
0.0,
237+
-0.00222456,
238+
0.0,
239+
0.0,
240+
1.0,
241+
-0.01544948,
242+
0.0,
243+
0.0,
244+
0.0,
245+
1.0
246+
],
247+
"log_dir": "/tmp/"
248+
}

config/go2_rl.json

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
{
2+
"base_frame": "base",
3+
"point_feet": true,
4+
"foot_frames": {
5+
"0": "FL_foot",
6+
"1": "FR_foot",
7+
"2": "RL_foot",
8+
"3": "RR_foot"
9+
},
10+
"model_path": "go2.urdf",
11+
"g": 9.81,
12+
"joint_rate": 500.0,
13+
"estimate_joint_velocity": true,
14+
"joint_cutoff_frequency": 15.0,
15+
"joint_position_variance": 0.001,
16+
"angular_momentum_cutoff_frequency": 5.0,
17+
"tau_0": 0.1,
18+
"tau_1": 0.0,
19+
"imu_rate": 500.0,
20+
"R_base_to_gyro": [
21+
1.0,
22+
0.0,
23+
0.0,
24+
0.0,
25+
-1.0,
26+
0.0,
27+
0.0,
28+
0.0,
29+
-1.0
30+
],
31+
"R_base_to_acc": [
32+
1.0,
33+
0.0,
34+
0.0,
35+
0.0,
36+
-1.0,
37+
0.0,
38+
0.0,
39+
0.0,
40+
-1.0
41+
],
42+
"calibrate_initial_imu_bias": false,
43+
"max_imu_calibration_cycles": 1000,
44+
"bias_gyro": [
45+
0.0,
46+
0.0,
47+
0.0
48+
],
49+
"bias_acc": [
50+
0.0,
51+
0.0,
52+
0.0
53+
],
54+
"gyro_cutoff_frequency": 5.0,
55+
"force_torque_rate": 500.0,
56+
"R_foot_to_force": {
57+
"0": [
58+
1.0,
59+
0.0,
60+
0.0,
61+
0.0,
62+
1.0,
63+
0.0,
64+
0.0,
65+
0.0,
66+
1.0
67+
],
68+
"1": [
69+
1.0,
70+
0.0,
71+
0.0,
72+
0.0,
73+
1.0,
74+
0.0,
75+
0.0,
76+
0.0,
77+
1.0
78+
],
79+
"2": [
80+
1.0,
81+
0.0,
82+
0.0,
83+
0.0,
84+
1.0,
85+
0.0,
86+
0.0,
87+
0.0,
88+
1.0
89+
],
90+
"3": [
91+
1.0,
92+
0.0,
93+
0.0,
94+
0.0,
95+
1.0,
96+
0.0,
97+
0.0,
98+
0.0,
99+
1.0
100+
]
101+
},
102+
"R_foot_to_torque": null,
103+
"attitude_estimator_proportional_gain": 0.1,
104+
"attitude_estimator_integral_gain": 0.0,
105+
"estimate_contact_status": true,
106+
"high_threshold": 4.0,
107+
"low_threshold": 2.0,
108+
"median_window": 13,
109+
"outlier_detection": true,
110+
"convergence_cycles": 100,
111+
"imu_angular_velocity_covariance": [
112+
5e-5,
113+
5e-5,
114+
5e-5
115+
],
116+
"imu_angular_velocity_bias_covariance": [
117+
1e-8,
118+
1e-8,
119+
1e-8
120+
],
121+
"imu_linear_acceleration_covariance": [
122+
5e-3,
123+
5e-3,
124+
5e-3
125+
],
126+
"imu_linear_acceleration_bias_covariance": [
127+
1e-8,
128+
1e-8,
129+
1e-8
130+
],
131+
"use_contacts_in_base_estimation": true,
132+
"base_linear_velocity_covariance": [
133+
5e-3,
134+
5e-3,
135+
5e-3
136+
],
137+
"base_orientation_covariance": [
138+
1e-3,
139+
1e-3,
140+
1e-3
141+
],
142+
"contact_position_covariance": [
143+
5e-6,
144+
5e-6,
145+
5e-5
146+
],
147+
"contact_orientation_covariance": null,
148+
"contact_position_slip_covariance": [
149+
1e-6,
150+
1e-6,
151+
1e-6
152+
],
153+
"contact_orientation_slip_covariance": null,
154+
"com_position_process_covariance": [
155+
1e-6,
156+
1e-6,
157+
1e-6
158+
],
159+
"com_linear_velocity_process_covariance": [
160+
1e-4,
161+
1e-4,
162+
1e-4
163+
],
164+
"external_forces_process_covariance": [
165+
1e-1,
166+
1e-1,
167+
1e-1
168+
],
169+
"com_position_covariance": [
170+
1e-6,
171+
1e-6,
172+
1e-6
173+
],
174+
"com_linear_acceleration_covariance": [
175+
1e-2,
176+
1e-2,
177+
1e-2
178+
],
179+
"initial_base_position_covariance": [
180+
1e-4,
181+
1e-4,
182+
1e-4
183+
],
184+
"initial_base_orientation_covariance": [
185+
1e-6,
186+
1e-6,
187+
1e-6
188+
],
189+
"initial_base_linear_velocity_covariance": [
190+
1e-3,
191+
1e-3,
192+
1e-3
193+
],
194+
"initial_contact_position_covariance": [
195+
1e-6,
196+
1e-6,
197+
1e-6
198+
],
199+
"initial_contact_orientation_covariance": null,
200+
"initial_imu_linear_acceleration_bias_covariance": [
201+
1e-4,
202+
1e-4,
203+
1e-4
204+
],
205+
"initial_imu_angular_velocity_bias_covariance": [
206+
1e-4,
207+
1e-4,
208+
1e-4
209+
],
210+
"initial_com_position_covariance": [
211+
1e-6,
212+
1e-6,
213+
1e-6
214+
],
215+
"initial_com_linear_velocity_covariance": [
216+
1e-3,
217+
1e-3,
218+
1e-3
219+
],
220+
"initial_external_forces_covariance": [
221+
1.0,
222+
1.0,
223+
1.0
224+
],
225+
"T_base_to_odom": null,
226+
"enable_terrain_estimation": false,
227+
"terrain_estimator": "fast",
228+
"minimum_terrain_height_variance": 1e-3,
229+
"T_base_to_ground_truth": null,
230+
"log_dir": "/tmp/serow_logs"
231+
}

config/h1.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,5 +253,7 @@
253253
],
254254
"enable_terrain_estimation": true,
255255
"terrain_estimator": "fast",
256-
"minimum_terrain_height_variance": 1e-3
257-
}
256+
"minimum_terrain_height_variance": 1e-3,
257+
"T_base_to_ground_truth": null,
258+
"log_dir": "/tmp/"
259+
}

config/nao.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,5 +236,7 @@
236236
"T_base_to_odom": null,
237237
"enable_terrain_estimation": false,
238238
"terrain_estimator": "fast",
239-
"minimum_terrain_height_variance": 1e-3
240-
}
239+
"minimum_terrain_height_variance": 1e-3,
240+
"T_base_to_ground_truth": null,
241+
"log_dir": "/tmp/"
242+
}

config/valkyrie.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,5 +248,7 @@
248248
],
249249
"enable_terrain_estimation": false,
250250
"terrain_estimator": "fast",
251-
"minimum_terrain_height_variance": 1e-3
252-
}
251+
"minimum_terrain_height_variance": 1e-3,
252+
"T_base_to_ground_truth": null,
253+
"log_dir": "/tmp/"
254+
}

0 commit comments

Comments
 (0)