Skip to content

Commit 64a06f9

Browse files
committed
small
1 parent 8e1efb0 commit 64a06f9

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

proj/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Set up logging
2+
import logging
3+
4+
for module in ["matplotlib", "pandas", "numpy"]:
5+
requests_logger = logging.getLogger("matplotlib")
6+
requests_logger.setLevel(logging.ERROR)
7+
8+
# import stuff
19
from proj.model.config import Config
210
from proj.model.model import Model
311
from proj.model.model_polar import ModelPolar

proj/environment/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, model, winstor=False):
3030
self.simstart = timestamp()
3131

3232
self.model = model
33-
self.exp_name = f'{model.trajectory["name"]}_{timestamp()}_{np.random.randint(low=0, high=10000)}'
33+
self.exp_name = f'{model.SIMULATION_NAME}_{model.trajectory["name"]}_{timestamp()}_{np.random.randint(low=0, high=10000)}'
3434

3535
# get main folder
3636
if winstor:

proj/model/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33

44
class Config:
5+
SIMULATION_NAME = ""
56
USE_FAST = True # if true use cumba's methods
67
SPAWN_TYPE = "trajectory"
78

workspace.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
from proj.utils.dropbox import DropBoxUtils
1+
# %%
2+
from proj.utils.misc import load_results_from_folder
23

3-
dbx = DropBoxUtils()
4+
fld = "/Users/federicoclaudi/Dropbox (UCL - SWC)/Rotation_vte/Locomotion/control/tracking_200923_141709_1491_good_example/results"
45

5-
dbx.upload_file("winstor.py", "winstor.py")
6+
# %%
7+
config, trajectory, history, cost_history = load_results_from_folder(fld)
8+
9+
# %%
10+
import matplotlib.pyplot as plt
11+
12+
plt.plot(cost_history["x"])
13+
14+
# %%
15+
plt.plot(history["tau_r"])
16+
plt.plot(history["tau_l"])
17+
18+
# %%
19+
plt.plot(history["v"])
20+
21+
# %%

0 commit comments

Comments
 (0)