Skip to content

Commit

Permalink
chore: save setup figures in high resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Mar 18, 2024
1 parent 204b37d commit 94c222f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/evaluation/scenario_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@ def create_video(
env_inst_demo.plot(fig=fig)
fig.tight_layout()
plt.savefig("animations/scenario_setup/initial.png", dpi=300)
plt.savefig("animations/scenario_setup/initial_high_res.png", dpi=400)
plt.savefig("animations/scenario_setup/initial_highest_res.png", dpi=500)

## 2) Plot the scenario with only static obstacle active
fig = plt.figure(figsize=(6, 2.4))
env_inst_demo.plot(fig=fig, query_time=0, show_inactive=True)
fig.tight_layout()
plt.savefig("animations/scenario_setup/static.png", dpi=300)
plt.savefig("animations/scenario_setup/static_high_res.png", dpi=400)
plt.savefig("animations/scenario_setup/static_highest_res.png", dpi=500)

## 3) Plot the scenario with only dynamic obstacle active
env_demo.reset()
Expand All @@ -171,6 +175,8 @@ def create_video(
env_inst_demo.plot(fig=fig, query_time=20, show_inactive=True)
fig.tight_layout()
plt.savefig("animations/scenario_setup/dynamic.png", dpi=300)
plt.savefig("animations/scenario_setup/dynamic_high_res.png", dpi=400)
plt.savefig("animations/scenario_setup/dynamic_highest_res.png", dpi=500)

## 4) Highlight task without obstacle active
fig = plt.figure(figsize=(6, 2.4))
Expand All @@ -179,6 +185,8 @@ def create_video(
plt.plot(goal_coords[0], goal_coords[1], "go")
fig.tight_layout()
plt.savefig("animations/scenario_setup/task.png", dpi=300)
plt.savefig("animations/scenario_setup/task_high_res.png", dpi=400)
plt.savefig("animations/scenario_setup/task_highest_res.png", dpi=500)

### Create video of scenario in animations (with pictures in scenar_images)
if generate_images:
Expand Down

0 comments on commit 94c222f

Please sign in to comment.