Skip to content

Commit

Permalink
minihawk experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
lyg1597 committed Jan 13, 2025
1 parent ec4ea6f commit 246c437
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 6 additions & 4 deletions minihawk/minihawk_scenario4.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ class AgentMode(Enum):
# params={'bloating_method':'GLOBAL'}
)

traces.dump('sc1.json')

# fig = go.Figure()
# fig = reachtube_tree(traces, None, fig, 0, 1)
# fig.show()
Expand Down Expand Up @@ -287,24 +289,24 @@ class AgentMode(Enum):
plt.xticks(fontsize=14)
plt.yticks(fontsize=14)
plt.tight_layout()
plt.savefig('sc4_x.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
# plt.savefig('sc4_x.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
plt.figure(1,figsize=(2,2))
plt.xlabel('t',fontsize=14)
plt.ylabel('y',fontsize=14)
plt.xticks(fontsize=14)
plt.yticks(fontsize=14)
plt.legend(prop={'size': 14},loc='upper right')
plt.tight_layout()
plt.savefig('sc4_y.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
# plt.savefig('sc4_y.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
plt.figure(2,figsize=(2,2))
plt.xlabel('t',fontsize=14)
plt.ylabel('z',fontsize=14)
plt.xticks(fontsize=14)
plt.yticks(fontsize=14)
plt.legend(prop={'size': 14},loc='upper right')
plt.tight_layout()
plt.savefig('sc4_z.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
# plt.show()
# plt.savefig('sc4_z.png', bbox_inches='tight', pad_inches=0.0, dpi=300)
plt.show()

# if idx_start < pos.shape[0]:
# color = 'red' if prev_intersect else 'blue'
Expand Down
9 changes: 9 additions & 0 deletions minihawk/viewer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from verse.analysis import AnalysisTree
from verse.plotter.plotter2D import *
import plotly.graph_objects as go

res = AnalysisTree.load('sc1.json')

fig = go.Figure()
fig = reachtube_tree(res, None, fig, 0, 1)
fig.show()

0 comments on commit 246c437

Please sign in to comment.