diff --git a/demo/F16/F16_waypoint_scene.py b/demo/F16/F16_waypoint_scene.py index 5441f45f34939d4d0c287e64b362c6f9236eec51..5b0d16d6251a2bdca1c06d83d9f45dfbcb8cb45a 100644 --- a/demo/F16/F16_waypoint_scene.py +++ b/demo/F16/F16_waypoint_scene.py @@ -10,20 +10,17 @@ import numpy as np from scipy.integrate import ode from enum import Enum, auto -from dryvr_plus_plus.scene_verifier.agents.base_agent import BaseAgent +from demo.F16.aerobench.run_f16_sim import F16Agent from dryvr_plus_plus.scene_verifier.map.lane_map import LaneMap from dryvr_plus_plus.scene_verifier.code_parser.pythonparser import EmptyAst +from dryvr_plus_plus.scene_verifier.scenario.scenario import Scenario import math - from numpy import deg2rad import matplotlib.pyplot as plt - from aerobench.run_f16_sim import run_f16_sim - from aerobench.visualize import plot - from waypoint_autopilot import WaypointAutopilot @@ -76,13 +73,18 @@ def main(): ''' The main function defines and simulates a scene. Defining and using a scenario involves the following 5 easy steps: 1. creating a basic scenario object with Scenario() - 2. defining the agents that will populate the object, here we have two ball agents + 2. defining the agents that will populate the object. Here a single F16 agent. 3. adding the agents to the scenario using .add_agent() 4. initializing the agents for this scenario. Note that agents are only initialized *in* a scenario, not individually outside a scenario 5. genetating the simulation traces or computing the reachable states ''' F16waypointScene = Scenario() + F16Controller = './F16_waypoint_scene.py' + + # Resume here. This next line is the problem + # Fighter1 = F16Agent('Fighter1', file_name=F16Controller) + ### Initial Conditions ### power = 9 # engine power level (0-10) diff --git a/demo/F16/README.md b/demo/F16/README.md index d1cc352b13d48ec3069c2cf90d7420ca8df97911..b668344ea8baee8c6a13ff94b6d1f3dbb9c7f6bf 100644 --- a/demo/F16/README.md +++ b/demo/F16/README.md @@ -1,4 +1,6 @@ # Adaptation of F16 model This is an adaptation of the Python F16 model from [Stanley Bak](https://github.com/stanleybak/AeroBenchVVPython). -All the files are copied to make this example a standalone executable. +All the files are copied to make this example a standalone executable. Requires you to add ```/Users/mitras/Dpp/GraphGeneration/demo/F16``` to PYTHONPATH. + +Test by ```python3 F16_waypoint_scene.py```