Skip to content

Commit

Permalink
start working on p2 for mp
Browse files Browse the repository at this point in the history
  • Loading branch information
lyg1597 committed Mar 29, 2024
1 parent 610ff06 commit 8913850
Show file tree
Hide file tree
Showing 8 changed files with 787 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demo/dryvr_demo/rendezvous_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def decisionLogic(ego: State):

# assert (ego.craft_mode!=CraftMode.ProxB or\
# (ego.xp>=-105 and ego.yp>=0.57735*ego.xp and -ego.yp>=0.57735*ego.xp)), "Line-of-sight"
assert ego.craft_mode != CraftMode.Passive or (
ego.xp <= -0.2 or ego.xp >= 0.2 or ego.yp <= -0.2 or ego.yp >= 0.2
), "Collision avoidance"
# assert ego.craft_mode != CraftMode.Passive or (
# ego.xp <= -0.2 or ego.xp >= 0.2 or ego.yp <= -0.2 or ego.yp >= 0.2
# ), "Collision avoidance"
return output
4 changes: 2 additions & 2 deletions demo/dryvr_demo/rendezvous_demo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from origin_agent import craft_agent
from verse import Scenario
from verse import Scenario, ScenarioConfig
from verse.plotter.plotter2D import *
from verse.sensor.example_sensor.craft_sensor import CraftSensor

Expand All @@ -15,7 +15,7 @@ class CraftMode(Enum):

if __name__ == "__main__":
input_code_name = "./demo/dryvr_demo/rendezvous_controller.py"
scenario = Scenario()
scenario = Scenario(ScenarioConfig(parallel=False))

car = craft_agent("test", file_name=input_code_name)
scenario.add_agent(car)
Expand Down
Loading

0 comments on commit 8913850

Please sign in to comment.