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

crash when using traci.simulation.getDistanceRoad() #5114

Closed
sapirbm opened this issue Jan 28, 2019 · 3 comments
Closed

crash when using traci.simulation.getDistanceRoad() #5114

sapirbm opened this issue Jan 28, 2019 · 3 comments

Comments

@sapirbm
Copy link

@sapirbm sapirbm commented Jan 28, 2019

when using netconvert to import opendrive maps, sumo creates internal junctions and cuts some of the sublanes into 2 pieces. the problem is that traci's distance functions dont work from these lanes and crash the whole server. (simulation.getDistanceRoad and simulation.getDistance2D).
in addition, it seems that the sum of the two new sublanes lengths is larger than the original opendrive lane.

is there a flag in netconvert to disable this internal junction thing but keep the regular junction lanes?
this will solve my problem (i hope)

thanks.

opendrive:

<road name=":E_7" **length="11.87424980"** id="190" junction="8">
        <link>
            <predecessor elementType="road" elementId="129" contactPoint="end"/>
            <successor elementType="road" elementId="133" contactPoint="start"/>
        </link>

net.xml:

<connection from=":8_7" to="-133.0.00" fromLane="0" toLane="0" via=":8_9_0" dir="l" state="m"/> **length="8.41"**
<connection from=":8_9" to="-133.0.00" fromLane="0" toLane="0" dir="l" state="M"/>
**length="5.90"**
@namdre namdre self-assigned this Jan 28, 2019
@namdre
Copy link
Contributor

@namdre namdre commented Jan 28, 2019

The internal junctions are necessary to make vehicles behave correctly while passing certain types of intersection. If you manage to crash the server by calling getDistance then this Is a bug that needs fixing.
Please provide example data (network, traci commands) for reproducing the crash.

Having a length mismatch between the total length of internal lanes in .net.xml and opendrive can be caused by using generated internal lane geometry. Try setting option --opendrive.internal-shapes during netconvert import. If that does not solve the problem, please provide an example opendrive file and specify the problematic internal lane.

Loading

@sapirbm
Copy link
Author

@sapirbm sapirbm commented Jan 30, 2019

crash when using traci.simulation.getDistanceRoad()
the attached net.xml file was generated from the .xodr file attached using the following command:
netconvert --opendrive-files hood.xodr -o hood.net.xml
--output.original-names
--opendrive.advance-stopline 0
--default.junctions.radius 0
--junctions.small-radius 0
--opendrive.internal-shapes true
--junctions.limit-turn-speed 0

on junction 8, lane :8_7 (left turn from -129.0.00_0 to -133.0.00_0) is divided using internal junction into :8_7 + :8_9.
having a car on lane :8_9 (in the later part of the left turn) try to calculate it's driving distance from the beginning of lane -129.0.00_0.
distance = traci.simulation.getDistanceRoad('-129.0.00', 0, ':8_9', 0.2, isDriving=True)

this function call results in a sumo server crash.

maps.zip

Loading

@namdre namdre added the a:sumo label Jan 30, 2019
namdre added a commit that referenced this issue Jan 30, 2019
namdre added a commit that referenced this issue Jan 30, 2019
namdre added a commit that referenced this issue Jan 30, 2019
@namdre namdre closed this in 0799760 Jan 30, 2019
@namdre
Copy link
Contributor

@namdre namdre commented Jan 30, 2019

Thanks for the example scenario

Loading

@namdre namdre changed the title sumo server crash because import from opendrive creates "invisible" internal lanes crash when using traci.simulation.getDistanceRoad() Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants