-
Notifications
You must be signed in to change notification settings - Fork 190
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
Envision won't render custom scenario #1874
Comments
Thank you for the request @ajlangley, I am going to try this out to see what might be wrong. |
ErrorThe browser console notes the following issue: Uncaught TypeError: Cannot read properties of undefined (reading 'equalsWithEpsilon')
at Function.PolygonBuilder.CreatePolygon (polygonBuilder.js:116)
at Function.MeshBuilder.CreatePolygon (meshBuilder.js:456)
at mission_routes.js:64
at Array.forEach (<anonymous>)
at _loop (mission_routes.js:62)
at mission_routes.js:61
at commitHookEffectListMount (react-dom.development.js:19731)
at commitPassiveHookEffects (react-dom.development.js:19769)
at HTMLUnknownElement.callCallback (react-dom.development.js:188)
at Object.invokeGuardedCallbackDev (react-dom.development.js:237) mission_routes.js:64SMARTS/envision/web/src/components/mission_routes.js Lines 64 to 68 in c2edd5d
From that I note that somehow an empty array managed to make it into And appears to come from: Lines 1508 to 1515 in c2edd5d
It looks like one of the lanes generated is unexpectedly 0 length and thus would not have any geometry: <smarts.core.sumo_road_network.SumoRoadNetwork.Road object at 0x7ff192c76fa0>
(Pdb) route.roads[1].lanes
[<smarts.core.sumo_road_network.SumoRoadNetwork.Lane object at 0x7ff192c76f70>]
(Pdb) route.roads[1].lanes[0].lane_id
':J1_1_0'
(Pdb) route.roads[1].lanes[0].length
0.0 The generated file gives the lane which means the conversion is somehow reducing the length of the lane. It is not large enough to be decimal error but enough that inaccuracy could cause it. <edge id=":J1_1" function="internal">
<lane id=":J1_1_0" index="0" speed="13.89" length="0.10" shape="20.00,28.40 20.00,28.40"/>
</edge> Checking SUMO for underlying problems it appears that SUMO caused the issue because the sumo shape does not match the length both above and below: (Pdb) route.roads[1].lanes[0].lane_id
':J1_1_0'
(Pdb) route.roads[1].lanes[0].length
0.0
(Pdb) route.roads[1].lanes[0]._sumo_lane.getShape()
[(20.0, 28.4), (20.0, 28.4)]
(Pdb) route.roads[1].lanes[0]._sumo_lane.getLength()
0.1 It may be a rounding error within SUMO's shape generation.
|
I will have to think about what should be done about this issue. We did not anticipate 0 length lanes. |
I have applied a fix. |
Thank you for the help! |
High Level Description
I have made a custom road network using SUMO. The issue is that Envision won't render the scenario (the whole browser window goes black the instant an ego vehicle enters the scene).
Desired SMARTS version
1.0.3
Operating System
Ubuntu 20.04
Problems
I have the following custom road network. In
map.nod.xml
, I haveand in
map.edg.xml
I haveI built the map file,
map.net.xml
using the commandnetconvert --node-files=hello.nod.xml --edge-files=hello.edg.xml --output-file=map.net.xml
Finally, in my scenario file,
scenario.py
, I haveNow, when I run Envision and attempt to visualize this scenario with a single ego vehicle, the road network pops up, but then the entire browser window (everything under the search bar) goes completely black as soon as the vehicle enters the scene. This has something to do with the choice of mission, as when I replace the route with
t.Route(begin=('1to2', 0, 'random'),end=('2to3', 0, 'random')
it renders as expected. Basically, the only missions is will render are
1to2 -> 2to3
3to2 -> 2to1
5to2 -> 2to7
7to2 -> 2to5
Is there any idea what's going on?
P.S.: Thanks for all of the assistance recently.
The text was updated successfully, but these errors were encountered: