Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help Request] Simulation freezes on episode 149 #2166

Open
dduro2020 opened this issue Dec 22, 2024 · 1 comment
Open

[Help Request] Simulation freezes on episode 149 #2166

dduro2020 opened this issue Dec 22, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@dduro2020
Copy link
Contributor

dduro2020 commented Dec 22, 2024

High Level Description

I am trying to use a customised scenario for an agent to learn how to park.

The scenario I'm using:

normal = TrafficActor(name="car", depart_speed=0)

traffic = {}
traffic["0"] = Traffic(
    trips=[
        Trip(
            vehicle_name=f"car_{i+1}",
            route=Route(
                begin=("gneE3", 1, (i+2) * 12),
                end=("gneE3", 1, "max")
            ),
            depart=0,
            actor=normal
        )
        for i in range(2)
    ],
    flows=[]
)

    
route = Route(begin=("gneE3", 1, 29), end=("gneE3", 1, 100))
ego_missions = [
    Mission(
        route=route,
        entry_tactic=TrapEntryTactic(
            start_time=0
        ),
    )
]

gen_scenario(
    scenario=Scenario(
        traffic=traffic,
        ego_missions=ego_missions,
    ),
    output_dir=Path(__file__).parent,
)

This is the xml:

<net version="1.9" junctionCornerDetail="5" limitTurnSpeed="5.50" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/net_file.xsd">

    <location netOffset="0.00,0.00" convBoundary="0.00,100.00,200.00,100.00" origBoundary="-10000000000.00,-10000000000.00,10000000000.00,10000000000.00" projParameter="!"/>

    <edge id="gneE3" from="gneJ4" to="gneJ6" priority="-1" spreadType="center">
        <lane id="gneE3_0" index="0" speed="0.000000000001" length="200.00" shape="0.00,96.80 200.00,96.80"/>
        <lane id="gneE3_1" index="1" speed="0" length="200.00" shape="0.00,100.00 200.00,100.00"/>
        <lane id="gneE3_2" index="2" speed="0" length="200.00" shape="0.00,103.20 200.00,103.20"/>
    </edge>

    <junction id="gneJ4" type="dead_end" x="0.00" y="100.00" incLanes="" intLanes="" shape="0.00,104.80 0.00,95.20"/>
    <junction id="gneJ6" type="dead_end" x="200.00" y="100.00" incLanes="gneE3_0 gneE3_1 gneE3_2" intLanes="" shape="200.00,95.20 200.00,104.80"/>

</net>

Version

Latest

Operating System

Ubuntu 22.04

Problems

When I use my scenario I get a freeze in episode 149 without any error. If I try a SMARTS scenario I don't have this problem.

Exit when killing:

^CTraceback (most recent call last):
  File "/home/duro/SMARTS/.venv/lib/python3.8/site-packages/direct/showbase/ShowBase.py", line 2145, in __garbageCollectStates
ERROR:Client:Connection to Envision terminated with: 
    RenderState.garbageCollect()
KeyboardInterrupt
:task(error): Exception occurred in PythonTask garbageCollectStates
Killed
@dduro2020 dduro2020 added the help wanted Extra attention is needed label Dec 22, 2024
@dduro2020
Copy link
Contributor Author

After several tests it seems that the problem has to do with setting the lane speeds to 0. My intention is for a vehicle to learn to park so I need other static vehicles, is there any other way to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant