A REAL PROGRESS
This commit is contained in:
Binary file not shown.
+2
-2
@@ -120,7 +120,7 @@ class CustomEnv(gym.Env):
|
||||
# barrier.wait()
|
||||
self.fifo_states.append(self.flow_field.obs.copy()[2:14])
|
||||
|
||||
def calc_reward():
|
||||
def proc_data():
|
||||
states = np.array(self.fifo_states)
|
||||
forces = states[-1, 6:12] / self.force_norm_fact
|
||||
cd = (forces[0] + forces[2] + forces[4]) / 3
|
||||
@@ -179,7 +179,7 @@ class CustomEnv(gym.Env):
|
||||
result_queue.put((np.hstack([forces, sens]), reward))
|
||||
|
||||
run_flow_field(action)
|
||||
calc_reward()
|
||||
proc_data()
|
||||
observation, reward = result_queue.get()
|
||||
|
||||
truncated = bool(np.any(observation > 1) or np.any(observation < -1))
|
||||
|
||||
File diff suppressed because one or more lines are too long
+151
-77
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user